Hi,
Does anyone have any examples that show the usage of candle stick patterns like doji, hammer etc that are used on say, a rolling window of bars, ie bars[10]?
There are good examples such as :
but those seem only to check for current bars.
Thanks
Ben Wong
For people who stumble upon this in future, I managed to solve this by adding
self.Hammer = self.CandlestickPatterns.Hammer(self.eurusd)
into my initialize.
and then
self.HammerWindow.Add(self.Hammer.Current.Value)
into a rollingwindow i had created earlier. so basically i can do a self.HammerWindow[5] to check if the 6th bar from last was a hammer.
dont forget to create the rolling window itself in initialize.
Derek Melchin
Hi Ben,
Thanks for providing the solution. For completeness, I've attached a backtest which demonstrates how this can be done in a full algorithm.
Best,
Derek Melchin
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.
Ben Wong
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!