AverageDirectionalMovementIndexRating needs to be able to pass timeframe/bars in

Created at 08 Nov 2024, 12:55
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AN

andrewtatham

Joined 11.10.2024

AverageDirectionalMovementIndexRating needs to be able to pass timeframe/bars in
08 Nov 2024, 12:55


I only seem to be able to get the ADX for the default timeframe e.g.

Indicators.AverageDirectionalMovementIndexRating(14);

But I want to be able to get it for a different timeframe e.g.

var bars = MarketData.GetBars(tf);
var adx = Indicators.AverageDirectionalMovementIndexRating(14, bars);

Please can you add this overload?

Thanks


cTrader
@andrewtatham
Replies

masedir
08 Jan 2025, 22:01

try using the DirectionalMovementSystem indicator, its similar to the ADX but doesn't have the rating line

public Bars _bars;

public DirectionalMovementSystem _dms;

_bars = MarketData.GetBars(tf);

_dms = Indicators.DirectionalMovementSystem(_bars,14); 

 

 

 


@masedir