Rex Oscillator for NNFX with cTrader free

by xabbu in category Oscilator at 14/09/2020

in case you need a rex indicator for your NNFX strategy with cTrader, and you want one with source code available, I have good news for you... ;-)


The Rex indicator / oscillator (or oscilator) lays a moving average over the True Value of a Bar (TVB).


Play around with it, give feedback, make additions and share your enhancements to the community...


Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
´╗┐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 REXindicatorforNNFX : Indicator

        [Parameter("Periods", DefaultValue = 10)]
        public int _signalPeriod { get; set; }
        [Parameter("Ma Type", DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType _movingAverageType { get; set; }

        [Output("TVB", LineColor = "Green")]
        public IndicatorDataSeries _tvb { get; set; }
        [Output("Signal", LineColor = "Red", Thickness = 1)]
        public IndicatorDataSeries _signalSeries { get; set; }

        private MovingAverage _signal;

        protected override void Initialize()
            _signal = Indicators.MovingAverage(_tvb, _signalPeriod, _movingAverageType);

        public override void Calculate(int index)
            _tvb[index] = 3 * Bars.ClosePrices[index] - (Bars.LowPrices[index]) + (Bars.OpenPrices[index] + Bars.ClosePrices[index]);
            _signalSeries[index] = _signal.Result[index];