How to use GetBars as a 2nd TimeFrame Source for Indicators
Created at 23 Jul 2020, 19:36
How to use GetBars as a 2nd TimeFrame Source for Indicators
23 Jul 2020, 19:36
Hi,
I want two indicators for two different time frames:
protected override void OnStart()
{
_emaLow = Indicators.ExponentialMovingAverage(SourceSma, 9); //current timeframe 1HR
var dataSeries = MarketData.GetBars(TimeFrame.Hour4, SymbolName);
_emaHigh = Indicators.ExponentialMovingAverage(dataSeries , 9); //timeframe 4HR
}
I was told to use GETBars but it is not a valid type to pass on the indicator.
Thanks
PanagiotisCharalampous
24 Jul 2020, 08:12
Hi ac15x,
Here is the correct way to do it
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous