I think the below image explains the issue, I want a long entry when the close is below the close of the x bars minus ATR.
Please check also the calculations when we use i.e. log(close) < 0.5 because on the other day I notice a issue with this SQx is rounding up the values...
Status changed from New to Fixed
Attachment image-0.png added
Attachment image-1.png added
Attachment Strategy.sqx added
Hi MM1,
I can the strategy you sent to us is in MT5.
Close[0] is the Open of the candle due to 0 is the latest candle in MT.
Refer the Pic(1), When you use Close[0] during the bar open and want the Close[0] to be larger than the Lowest.
Refer the Pic(2), expecting Close[0] to be smaller than the lowest.
Due to Close[0] being the Open of the candle when executing, there is a chance that Close[0] can be similar to the last low which makes both conditions doesn't work.
I'm not sure am I understand you correctly. Please let me know if I don't
I also attached a strategy that enters a long entry when the close is lower than the last X Low minus ATR. I hope it helps.