Hi there,
I am trying to find a way in C# to – as an example - store the Bollinger Bands values of a given security in a 100-period Rolling Window and then check if the current BollingerBands.StandardDeviation value is higher than the 80% percentiles within that Rolling Window.
I found this article which let me think this is possible to do in Python, but I am new to programming and I am struggling to make something that works in C#. I hope this will be an easy one for some of you!
Best
Link Liang
Hi Pi..R
There is no ready-to-use "percentile" method in C#. Here is my attempt to implement it with the feature you described, with simply comparing current StandardDeviation with all values stored in rolling windows.
You could also find more information about usage of rolling window and indicators. Hope it helps!
Pi..R
Hi Link,
Thank you very much for your help, this is a nice and efficent work around! This will perfectly make the trick for now, and I will try to expand that later to also be able to retrieve the [X] percentile value as well. I will share my solution here if I manage.
Thanks again!
Pi..R
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!