When the RSI is below the oversold zone, I save its value in the Series RSILow. I also save the value of the Low of the corresponding bar in the series BarLow.
The print function gives me the expected values on the output window.
The obtained values are then compared as shown in the line (a), but the print function is failing to pup up the result of the multiplication used to test if this condition is working. But when I comment the following section of the line (a)
&& BarLow[0] > BarLow[1];
For the line (a), why the comparison
RSILow[0] > RSILow[1]
&& BarLow[0] > BarLow[1];
I have the following code in OnBarUpdate()
myRSI[0] = RSI(Close, Amplitude, 3)[0];
if(myRSI[0] < Oversold)
{
RSILow[0] = MIN(myRSI, barBackwards)[0];
BarLow[0] = MIN(Low, barBackwards)[0];
Print("RSILow" + " Size " + ": " + RSILow[0] + " : " + Time[0]);
Print("BarLow" + " Size " + ": " + BarLow[0] + " : " + Time[0]);
if(RSILow[0] > RSILow[1] && BarLow[0] > BarLow[1]) // (a)
{
Print("Product" + " Size " + ": " + 1000*2 + " : " + Time[0]);
}
}
Thanks in advance!

Comment