Hello, I'm new to QuantConnect and this is my first community post. I'm working on building a strategy that needs to identify when a high high or a low low trend is identified. The system needs to be able to look back to a certain number of candles and ensure that there is enough distance between point a and point b in order for it to be considered valid. See attached.
I've been doing some research and came across a python library called argrelextrema which I'm pretty sure I need to use but I can't figure out how it works exactly. I'm hoping someone can give me an example of this being implemented in a backtest.
Thanks in advance :)
Vladimir
Fahmad91,
You can use for your strategy QC DonchianChannel Indicator.
For that you just need to specify data resolution, symbol and period.
Fahmad91
Vladimir Thanks for your answer. I've been playing around with this indicator but still can't seem to figure out how I would capture the event when a low / upper band drops / rises a certain amount. I'm trying to capture the event I highlighted in this screenshot.
Example: if point_a drops 50% from point_b: then do something…
Vladimir
-> if point_a drops 50% from point_b: then do something…
It may never happen, and depends on what instruments are you going to use.
I would prefer to use crossover of middle line (HH + LL)/2 with slightly smoothed price.
It would also be helpful to search the QC forum for the keyword "Donchian Channel".
Fahmad91
Vladimir Hmm… I see what you mean.
You included SMA in your backtest. Would it be better to check for cross over with SMA or the actual price?
Vladimir
Fahmad91,
Here is "Trading Donchian Channel"
Enjoy.
If you are happy with any of my answers please accept it.
Fahmad91
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!