@xfire Hi. I have already found the mistake. I was testing in the SP500 and the spread is 15 pips, therefore the level of the close of the candle with the MA will be 500 pips instead of 50 pips. I have modified and instead of using a condition I have used Check Distance in this way:

I've tested in MT4 and works well and the results are positive in T=15m.
I will try to put another indicator to improve the inputs. Could you recommend me something?
Thanks.


