two RSI in the same robot

Created at 31 Jul 2020, 09:02
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!
SA

samuel.jus.cornelio

Joined 19.03.2020

two RSI in the same robot
31 Jul 2020, 09:02


 

Can someone tell me how to put two RSI in the same code. The idea is to place two RSI with different configurations,


@samuel.jus.cornelio
Replies

... Deleted by UFO ...

firemyst
03 Aug 2020, 06:21

RE:

samuel.jus.cornelio said:

 

Can someone tell me how to put two RSI in the same code. The idea is to place two RSI with different configurations,

Declare two RSI objects and then create them with the specific parameters.

Example concept below using MovingAverages:

MovingAverage _ma1;
MovingAverage _ma2;

_ma1 = Indicators.MovingAverage(Bars.ClosePrices, MA1Period, MA1Type);
_ma2 = Indicators.MovingAverage(Bars.ClosePrices, MA2Period, MA2Type);

 


@firemyst