Optuma Divergence Script Unusable in Testing

Hi team,

I have recently used the signal tester and backtester to put together a strategy using the optuma Divergence Script (below). It appears to be cheating in the backtests. I understand from Darren’s previous answer this is due to the pivot script.

  1. My first query is can you please update the blog post script with a gann swing instead of the pivot script? Is this a viable solution here?
  2. Secondly is it possible to correct the pivot script (similar as to how you corrected the prior incorrect Gann scripts). with a "close() > 0" idea?
  3. I thinks its extremely important to clearly list out any Optuma functions / scripts which CANNOT be used in either the signal tester or backtester. A few other which I have previously flagged include RFE(), HBS(), ALPHA(), etc. I think this will really support the community avoid any time/resources invested in bad signal tests.
This is the script I am referring too:

//Positive RSI divergence
//Get the RSI value
RSI1 = RSI(BARS=14);
//calculate 15 pivot RSI low
P1 = PIVOT(RSI1, MIN=15, TYPE=Low);
//get value of the RSI low
V1 = VALUEWHEN(RSI1, P1 <> 0);
//Is RSI high 4% higher than previous?
Sig1 = V1 > V1[1]*1.04;
//get stock low value at RSI low
V2 = VALUEWHEN(LOW(), P1 <> 0);
//Is stock high 4% lower than at previous RSI low?
Sig2 = V2 < V2[1]*0.96;
//Show when RSI has higher low & price lower high
Sig1 and Sig2

cheers

 

Mandeep