The code is apparently correct.
Anyway in my personal opinion it's far from having a logic. Checking which was the ATR value on the time on which the trade is placed seems beautiful to talk about, but have no sense in the reality.
Use ATR of bigger time-frames, like daily, use the last candle value which do not change, take a portion of it and use it.
Fabio Cavalloni #:
The code is apparently correct.
The code is apparently correct.
Anyway in my personal opinion it's far from having a logic. Checking which was the ATR value on the time on which the trade is placed seems beautiful to talk about, but have no sense in the reality.
Use ATR of bigger time-frames, like daily, use the last candle value which do not change, take a portion of it and use it.
Thanks for feedback, I fully expect to be driving a Ferrari in two weeks.
Jokes aside since I keep swing trading more to forex and lower timeframe stuff for futures I already use ATR values from Daily and 4H. I'll probably code your recommendation eventually.
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
This is an ATR step based trailing stop and it works fine in the strategy tester but would like feedback on the SERIES_SYNCHRONIZED and iBarShift checking. Did I do it correctly or am I missing something crucial? Originally I was storing the ATR value in the trade comment since my broker never modified it but now I decided to change that because I may be using a different broker soon. Is there anything else I should add/am forgetting?