get the ATR value from other currency with that the cBot is running

Created at 18 Dec 2020, 16:16
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!
xabbu's avatar

xabbu

Joined 20.07.2020

get the ATR value from other currency with that the cBot is running
18 Dec 2020, 16:16


Dear Panagiotis,

how do I get access to the ATR value of another currency than that the actual instance is running on?

Say that the instance is EURUSD but I want to check the actual ATR value for GBPCHF?

Can I please ask you again for a little assistance? What is the correct line of code to get it?

Kindest regards,

 


@xabbu
Replies

firemyst
19 Dec 2020, 15:30

AverageTrueRange _atr = Indicators.AverageTrueRange(MarketData.GetBars(TimeFrame.Daily, "GBPCHF"), 13, MovingAverageType.Exponential);

 

Change the parameter values as desired


@firemyst

xabbu
19 Dec 2020, 19:41

thank you very much, FireMyst, for your hind - I will implement and test it, kindest regards


@xabbu

... Deleted by UFO ...