How to insert two indicators using two timeframes
Created at 23 Jul 2020, 15:56
How to insert two indicators using two timeframes
23 Jul 2020, 15:56
Hi,
I want two moving averages. I trigger chart and 1 higher timeframe. Example:
protected override void OnStart()
{
_sma1HR = Indicators.SimpleMovingAverage(SourceSma, 8); //For 1 Hour timeframe
_sma4HR = Indicators.SimpleMovingAverage(SourceSma, 8); //For 4 Hour timeframe
}
Thanks
PanagiotisCharalampous
23 Jul 2020, 16:11
Hi ac15x,
You can use GetBars() to get data from other timeframes and use them as sources for your indicators.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous