Hey everyone,
I am a day trader who has recently (within the past month) decided to take the plunge into automated trading using Python and QuantConnect to scale my efforts. It's been a huge learning curve to say the least, but I'm learning a ton and am in love with the QuantConnect platform!
My current goal is to fully automate one of my simpler strategies. I have access to every indicator I need except for one: Williams Fractals. Is there a way to access this indicator with the QC API?
If it's helpful, I did see one other post in the community about Williams Fractals, but the code was written in C# which I know very little of. Here's the link to that community post:
https://www.quantconnect.com/forum/discussion/1322/Simple+scalping+with+Williams+Fractals
If it's as simple as copying and pasting his code to access the indicator, I apologize for my ignorance! Any answers are much appreciated. Thanks! :)
Vladimir
Isaac Rochester,
Bill Williams Fractal Indicator is pretty simple and you can get it easily using self.History()
    H = self.History(self.stock, 5, Resolution.Daily)['high']
    L = self.History(self.stock, 5, Resolution.Daily)['low']    Â
    upFractal = (L[-5] > L[-3] < L[-4]) and (L[-2] > L[-3] < L[-1])
    dnFractal = (H[-5] < H[-3] > H[-4]) and (H[-2] < H[-3] > H[-1])
Isaac Rochester
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!