Hi,
My strategy is calculating wrong values for long period (i.e 200) moving averages (sma, kama, mama etc...) - what is the problem? The values are always different by a large amount from the values I can see on the chart.
Example of the code: double smaSlow = indicators.sma(instrument, Period.FIFTEEN_MINS, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 200, 0);
For example, on EUR/GBP on 2010-08-05 at 11:15 on-the-screen sma is at around 0.83088 while the one calculated as above in the strategy code is at 0.83254 - this is a huge difference.
Do you know what might be the problem?
By the way - I double checked - both the instrument and time frame are set correctly in the strategy and the chart i.e. EURGBP / 15M. This problem is persisent on all currency pairs / timeframes / currencies.
Please help! Thanks
|