Hi,
I am looking for some assistance or examples of returning the upper and lower bands of bollinger bands when building 15 minute bars in python. So far my algo has been recording only the middle oving average band.
Thanks
QUANTCONNECT COMMUNITY
Hi,
I am looking for some assistance or examples of returning the upper and lower bands of bollinger bands when building 15 minute bars in python. So far my algo has been recording only the middle oving average band.
Thanks
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.
Link Liang
Hi Harrison,
UpperBand and LowerBand are both properties of Bollinger Band indicator. They can be accessed by your_bollinger_band.UpperBand and your_bollinger_band.LowerBand where the value of the last point is at your_bollinger_band.LowerBand.Current.Value. Hope this would help with your issue.
Here is an algorithm implementing Bollinger Band. More information regarding usage of indicators are here.
Feel free to share your code and discuss with more detailed problems!
Def returns
Old thread, but I'm having a similar issue with my Bollinger Bands off custom bar lengths.
I was originally creating the Bollinger Bands off the helper method, but saw here that that could be a cause of the issue. I've updated the code with the constructor method, but am still getting the same issue where the .MiddeBand, .UpperBand, and .LowerBand return the same values.
Any help would be greatly appreciated.
Def returns
I had forgotten to specify the standard deviations of the BB in the constructor method, so I was just getting the SMA value for each band.
was:
self.fiveBB = BollingerBands(20, MovingAverageType.Simple)
works with:
self.fiveBB = BollingerBands(20, 2, MovingAverageType.Simple)
Harrison Burdge
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!