stpb=iLow(SSSR_sym,0,i)-(StopLoss*ATR(i)); tpb=iLow(SSSR_sym,0,i)+(iClose(SSSR_sym,0,i)-iLow(SSSR_sym,0,i))+TakeProfit*ATR(i);You are basing your stops off the previous candle; that has no relation to your entry.

TP is the close[1] plus n*ATR SL is Low[1] minus n*ATR
Hello WHRoeder, thank you very much for your help!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello guys im coding my first EA and im with some problems with the stop loss.
So, in the 1 minute time frame it wroked perfectly, but i tryed to test the EA in higher time frames
than i got an error about unmatched data, i downloaded from de history center data from the pairs and it runs the EA ok.
But in some of my orders it does not place the stops, my doubt is if the problem is with my code or it could be some unmatched data?
Thanks for your attention, sorry for my poor english.