Can cTrader show Full Scale Indicators?

07 Jan 2018, 03:18Can cTrader show Full Scale Indicators?#1
ngocnguyen.uonposts: 2since: 07 Jan 2018

Hi, I want to make my trading chart looks like mine in MT4 here, but when I try to do it on cTrader, I cannot combine RSI and Stochastic Oscillator and RSI in one chart and the charts of RSI and SO are not in full-scaled. Can anyone help me pls? Thank you.

07 Jan 2018, 16:20#2
ngocnguyen.uonposts: 2since: 07 Jan 2018

Here is my chart on cTrader, RSI and Stoch windows only show the range between 70 and 30

08 Jan 2018, 11:11#3
Panagiotis Charalampousposts: 3718since: 13 Jan 2017

Hi ngocnguyen.uon,

There is no built in way to do this but you can combine the two indicators in a custom one. See a code example below

using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewIndicator : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        [Output("RSI", Color = Colors.Blue)]
        public IndicatorDataSeries Result { get; set; }
        [Output("K", Color = Colors.Green)]
        public IndicatorDataSeries K { get; set; }
        [Output("D", Color = Colors.Red)]
        public IndicatorDataSeries D { get; set; }

        private RelativeStrengthIndex _rsi;
        private StochasticOscillator _stochasticOscillator;

        protected override void Initialize()
        {
            _rsi = Indicators.RelativeStrengthIndex(MarketSeries.High, 14);
            _stochasticOscillator = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);
        }

        public override void Calculate(int index)
        {
            Result[index] = _rsi.Result[index];
            K[index] = _stochasticOscillator.PercentK[index];
            D[index] = _stochasticOscillator.PercentD[index];
        }
    }
}

Let me know if this helps

Best Regards,

Panagiotis


Head of Community Management at cTrader -Join us on Telegram - https://t.me/cTrader_Official
09 Nov 2019, 09:28scale fix#4
dreytoth@gmail.composts: 1since: 09 Nov 2019

how can i program a scal fix like in mt4?

i need an indicator to stay in the middle of the channel

11 Nov 2019, 08:42#5
Panagiotis Charalampousposts: 3718since: 13 Jan 2017

Hi dreytoth@gmail.com,

Thanks for posting in our forum. You can check the values before adding them to the output series and make sure they do not cross the limits. If they cross the limits then use the limit values instead.

 Result[index] = Math.Min(Math.Max(value,-350),350);

Best Regards,

Panagiotis


Head of Community Management at cTrader -Join us on Telegram - https://t.me/cTrader_Official