Sorry if this is a frequently asked question, I tried to search but couldn’t find the answer.
So if I for example do the following line in a indicator and in a strategy, and output the result,
myATR = AverageTrueRange[14](close)
I don’t get the same value in my indicator as outputted in my strategy with the graph command.
However, if I do an average,
myMA = Average[20](close)
and output it as above, I do get the same value in the indicator as in my strategy. Why is this?
Thanks!
I am returned the same values, both for ATR and SMA, using these snippets:
Avg = Average[10](close)
buy at -close limit //does nothing but preventing an error message
graph Avg
myATR = AverageTrueRange[14](close)
buy at -close limit //does nothing but preventing an error message
graph myATR
there can be some negligible differences, at times, due most likely to different rounding procedures, but they should not affect strategies.
Make sure you are not using custom trading hours on the current chart and with weekend data enabled.