Here’s the approach I’ve taken using AddDataSeries():
- In the OnStateChange() method, under (State == State.Configure), I added:
AddDataSeries(Instrument.FullName, new BarsPeriod { BarsPeriodType = BarsPeriodType.Renko, Value = 50 }); - To initialize the EMA indicators for the 50 Renko chart, I added this under (State == State.DataLoaded) of OnStateChange():
ema20_50Renko = EMA(BarsArray[1].Close, 20);
ema50_50Renko = EMA(BarsArray[1].Close, 50);
'Bars' does not contain a definition for 'Closes' and no accessible extension method 'Closes' accepting a first argument of type 'Bars' could be found (are you missing a using directive or an assembly reference?)
I believe the issue lies in how I’m referencing the data from the Renko chart, but I’m not sure how to proceed.
Could anyone guide me on how to properly reference the Renko chart and retrieve the correct data to make this filter work?
Thanks in advance for your help!
Comment