I would like to set my candlesticks to Heiken Ashi by default, as when I calculate something like RSI its value will differ when using regular candlesticks vs. Heiken Ashi. Thank you!
QUANTCONNECT COMMUNITY
I would like to set my candlesticks to Heiken Ashi by default, as when I calculate something like RSI its value will differ when using regular candlesticks vs. Heiken Ashi. Thank you!
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.
Aayush Mishra
Any sort of basic code using heiken ashi as default and calculating something like RSI would be really appreciated! I learn best from example, and the university videos have been very helpful so far. Thanks all.
Alexandre Catarino
Please checkout the documentation under the Indicators section.
Indicators can be chained together to create unique combinations much like lego blocks:
public class IndicatorTests : QCAlgorithm { //Save off reference to indicator objects HeikinAshi _ha; RelativeStrengthIndex _haRsi; public override void Initialize() { //In addition to other initialize logic: // Creating Heikin Ashi _ha = heikinAshi = HeikinAshi(_spy) // Creating the RSI of Heikin Ashi _haRsi = new RelativeStrengthIndex("HA_RSI", 14).Of(_ha); } public override void OnData(Slice data) { Plot("RSI", _ha, _haRsi); } }
If we want to use TradeBar indicator (an indicator that needs bar properties: open, high, low) with Heikin Ashi, it is not as straight forward. We need to use Heikin Ashi properties to create a TradeBar object to pass it into the TradeBar indicator.
In the shared project below, we have implemented the RSI (data point indicator) and the ADX (trade bar indicator).
Mark Axmann
Can you post an example of how you would consolidate HeikinAshi to 30 minute bars? Thanks
Rahul Chowdhury
Hi Mark,
Here's an example of creating and using 30 minute HeikinAshi bars.
Aayush Mishra
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!