I've developed a very simple strategy that plots
-a dot below a green candle (n) if the previous candle (n-1) was red
-a dot above a red candle (n) if the previous candle (n-1) was green
The dot is automatically removed if the next candle (n+1) doesn't make a tick higher than the high of (n) (for longs) or a tick lower than the low of (n) (for shorts).
The code is attached below and it works on many candles that meet the criteria but not on all. I'm at a loss on why it is behaving like that.
Any suggestions on how to fix this issue are very welcome.
Thanks

Comment