Thank you very much I appreciate that a lot.
I'm trying to make an EA for a fairly simple strategy, based on the direction of SMA (50) and sticastic ... the conditions for entering a buy order are:
1.- SMA (50) pointing up (This is what I don't have the slightest idea of how to do it)
2.- Stocastic below 50
3.- Market order on close of the candle after the stochastic indicator turns in the direction of the trend (turns up). (I did this with two conditions comparing the 3 previous bars: if the stocastic values are Bar1> bar2 and Bar2< Bar3, I assume that stochastic changed direction by closing up; but if it exists a better way to do it, I would like to change it too)
If all 3 conditions are met, it is buy order with:
Take profit: 2 ATR (14)
Stop loss: 1 ATR (14)
I share the little I have ...
https://fxdreema.com/shared/sbWLsHuRd
and 100% sure, the condition 1 is missing
Thank you!!!