How can i use adx indicator as multi timeframe in one chart. there is only moving averages have multi timeframe mode
Created at 17 Jun 2022, 08:45
MO
How can i use adx indicator as multi timeframe in one chart. there is only moving averages have multi timeframe mode
17 Jun 2022, 08:45
How can i use adx indicator as multi timeframe in one chart. there is only moving averages have multi timeframe mode
amusleh
17 Jun 2022, 10:53
Hi,
You can pass another time frame Bars to ADX indicator:
using cAlgo.API; using cAlgo.API.Indicators; namespace cAlgo.Robots { [Robot(AccessRights = AccessRights.None)] public class ADXOtherTimeFrame : Robot { private DirectionalMovementSystem _adx; private Bars _otherTimeFrameBars; [Parameter("Other Time Frame")] public TimeFrame OtherTimeFrame { get; set; } [Parameter("Periods")] public int Periods { get; set; } protected override void OnStart() { _otherTimeFrameBars = MarketData.GetBars(OtherTimeFrame); _adx = Indicators.DirectionalMovementSystem(_otherTimeFrameBars, Periods) } } }
@amusleh