I've developped an indicator that draws a green UpArrow under a candle when certain criteria for a long entry are met. In order to avoid having two (or more) arrows in a row for the same entry when all criteria are met in a multi-candle sequence, I'm using a Bool Flag that specifies that the prior candle must be a bearish (red) one. This works fine.
What I'm trying to do is to allow a Signal to appear also if the prior candle was a bullish (green) one, but only if the high of the candle that gives the signal (High[0]) is lower than the high of the prior candle (High[1]). I think that my code is correct (see below) but for some reason it doesn't work the way I want it to. Any pointer as to why would be much appreciated.
Thanks
if (my conditions here && myBoolFlag)
{DrawArrowUp etc
myBoolFlag= false;
}
if (Open[1]>Close[1] || Open[1]<Close[1] && High[0]<High[1])
{
myBoolFlag= true;
}
Comment