Back

Issue with Bollinger Brands Indicator Algorithm, also with the values printed out in the console and the ones that are compared with other charts

Hey I'm having an issue when I backtest my Bollinger Brands Strategy, I'm new to this site and I wanted to create an algorithm that would set holdings on EURUSD if it would be equal to the Middle Boillinger Brands and Liquidate when the price is equal to the Upper Bollinger Brands, the resolution of both the EURUSD and the Indicator is set to Hour, however every hour it goes either long or short, but what I want is to check constantly in a one hour chart if the price is equal to any of the former parameters, not that every hour it sets a position. Also when I go to the console in my backtest, I see the values for both the EURUSD price and the Upper and MiddleBands, however they dont match up when I go to a chart of EUR/USD using this indicator (Using the same parameters in all cases) and the values dont match up. For example when I debug here, it says that the 2018-4-23 at 20:00 the price was 1.2030 however when I go to some chart and I see that exact point, it says that the price was 1.2260. How could this be?

Update Backtest








hmm first check maybe the bootcamp. its a tab inside the algorithm lab.

what i think you want/need are consolidators.

you could consolidate minute data to hour taking a sample every hour. Ondata method gets called every minute.

you have to compare hourly candle and also the indicator is using hourly bars...you checked that too?

1

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