Getting RelativeStrengthIndex with multiple TimeFrames?

Created at 13 Dec 2018, 07:46
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!
AR

arron3@gmail.com

Joined 12.12.2018

Getting RelativeStrengthIndex with multiple TimeFrames?
13 Dec 2018, 07:46


So I am trying to figure out the code to get the currently RSI

rsi = Indicators.RelativeStrengthIndex(Source, Period);

but i also want to specify the timeframe for the RSI indicactor to look at,

for example:

rsim15 = Indicators.RelativeStrengthIndex(Source, Period, Minute15);

rsim30 = Indicators.RelativeStrengthIndex(Source, Period, Minute30);

how would i do something like that?

thanks!!!


@arron3@gmail.com
Replies

PanagiotisCharalampous
13 Dec 2018, 10:24

Hi arron3@gmail.com,

See an example below

            var rsim15 = Indicators.RelativeStrengthIndex(MarketData.GetSeries(TimeFrame.Minute15).Close, Period);

            var rsim30 = Indicators.RelativeStrengthIndex(MarketData.GetSeries(TimeFrame.Minute30).Close, Period);

Best Regards,

Panagiotis


@PanagiotisCharalampous

arron3@gmail.com
13 Dec 2018, 11:45

you sir are awesome, thank you!!!!!!!!


@arron3@gmail.com