See attached code.
I'm using a Donchian Channel indicator in my strategy, and when I print the Donchian values to the output window for debugging, the values printed from the strategy do not match the Donchian values on the chart. I can have the strategy draw the Donchian on the chart, and the Donchian channel drawn from the strategy matches exactly a Donchian channel manually added to the chart, however the Donchian values called from the strategy do not match what is on the chart. I've got Calculate On Bar Close = true, and enough bars on my chart where I'm not overlapping trading sessions. I'm stuck why the values from the code don't match the indicator values on the chart.
Thanks for your help.

Comment