I have a CCI5 indicator using daily data
var cci = CCI(symbol, 5,MovingAverageType.Simple,Resolution.Daily);
but would like to use minute data to update the cci before the market closes to make a buy decision using the updated value of cci.
How would I do that?
Christoffer Sí¸rensen
Jared Broad
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.
Christoffer Sí¸rensen
var consolidator = consolidators [symboldata.Symbol]; cci.Update (consolidator.WorkingBar);
but it turned out the cci was already updated with the values from the day I was looking at? The question is when does a daily indicator get updated when we are also using minute data coming in in OnData? I thought it would have been updated at the end of day?Michael Handschuh
Christoffer Sí¸rensen
var dailyConsolidator = new TradeBarConsolidator(TimeSpan.FromHours(6.75));
I will dig further into this because there seems to an issue with the value of the indicator compared to historical values.Nicholas Stein
if (this.Time.Hour == 15 && this.Time.Minute > 49 || this.Time.Hour == 16) { cci.Update data[symbol]; }
Don't register your indicator. Granted you do not get the automatic behavior you get by registering the indicator, but that is your issue: registering the indicator does not give you the behavior you want. You will have to check that the 9:31AM value does not change your manual update.Michael Handschuh
Christoffer Sí¸rensen
Michael Handschuh
Christoffer Sí¸rensen
CCI5.Update (bar);
where bar is a TradeBar actually works. I think I got confused because my historical data was not up to date. One thing: can one clone an indicator.var clone = CCI5.Clone()
? Because then I would be sure this clone was just temporary and not saving any state that the CCI5 should keep.Michael Handschuh
Christoffer Sí¸rensen
Christoffer Sí¸rensen
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!