Back

Rolling Window spewing nonsense

Just writing some simple code to get previous OHLC of daily EURUSD candles, but it seems that when the algo hits the weekend it starts spewing out giberish. For example:

2017-02-23 00:00:00   preh  1.054745  curh  1.056275  prel 1.05437
2017-02-24 00:00:00   preh  1.056275  curh  1.05858  prel 1.05604
2017-02-25 00:00:00   preh  1.05858  curh  1.061825  prel 1.058065

If you check these values you can see that they dont make sense and the previous high (preh) is almost identical to the previous low (prel)

Any insight into why this is happening?

Update Backtest








Those values look right to me:

2017-02-23 00:00:00   preh  1.054745  curh  1.056275  prel 1.05437
2017-02-24 00:00:00   preh  1.056275  curh  1.05858  prel 1.05604
2017-02-25 00:00:00   preh  1.05858  curh  1.061825  prel 1.058065

I used the following statement to make it clearer to me:

self.Log('H[0]: {:.6f} H[1]: {:.6f} L[0]: {:.6f} L[1]: {:.6f}'
.format(curh, preh, curl, prel))
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed