WI
indicator results for position
08 Dec 2023, 02:20
i have a function with positions :
foreach (var position in Positions){….
is there a way to get indicator data for said position? like ATR?
eg i would like to get the Indicators.AverageTrueRange(….); but for the current position in the loop not the current opened chart?

Winmillion
08 Dec 2023, 02:21
Bars bars = MarketData.GetBars(TimeFrame.Daily, position.SymbolName);ATR = Indicators.AverageTrueRange(bars, 14, MovingAverageType.Simple);found the above to work
@Winmillion