I have created a custom indicator which plots two moving averages.
I took the code that is used to calculate the plots from the indicator and put it into a strategy. After adding some debug prints to the output window, I find that the indicator as displayed on the chart does not line up with the indicator calculations within the strategy I'm trying to build with it. I'm not sure why but it seems to be a few bars off.
Any ideas?

Comment