Accessing standard indicators in cAlgo

Created at 02 Aug 2015, 12:06
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!
BBalazs's avatar

BBalazs

Joined 13.07.2015

Accessing standard indicators in cAlgo
02 Aug 2015, 12:06


Hi guys!

I'd like to access to the standard RSI's source code (the one that comes with cTrader) through cAlgo, but unable to do so. Is there a way to modify the code?

Thanks for the answers in advance.

Balazs


@BBalazs
Replies

Spotware
03 Aug 2015, 14:28

Dear Trader,

We do not provide source codes of the indicators.

However if you want to modify the RSI output you can create an IndicatorDataSeries in a custom Indicator, add the RSI DataSeries to it and perform the modifications you want. The following code snippet illustrates it:

        private RelativeStrengthIndex rsi;

        protected override void Initialize()
        {
            rsi = Indicators.RelativeStrengthIndex(MarketSeries.Close, Period);
        }

        public override void Calculate(int index)
        {
            //make modifications
            Result[index] = rsi.Result[index];
        }

Additionally we invite you to take a look at the indicators uploaded on the Indicators section of cTDN.


@Spotware