Hi All,

I've created a simple application to calculate the simple moving average of a leveraged etf. While the stock price is correct, I believe that the simple moving average is inconsitent with historical data. I've tested the algorithm by setting the simple moving average to 1.0. This resulted in the simple moving average and the stock price converging, which is what is expected. However when larger averages like 25 or 50 are used, the calculations are inconsistent with data from other providers. 

Am I doing something incorrect? Can someone provide a little insight into any issues with my implementation.

Author