Category Oscilators  Published on 14/09/2020

Rex Oscillator for NNFX with cTrader

Description

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...

 


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];

        }
    }

}


xabbu's avatar
xabbu

Joined on 20.07.2020

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: REX indicator for NNFX.algo
  • Rating: 0
  • Installs: 1802
Comments
Log in to add a comment.
JA
jacknews · 2 years ago

Brilliant, thank you

xabbu's avatar
xabbu · 3 years ago

Hey duketv, I know the website and don't use REX as C1 in my cTrader NNFX system...

DU
duketv · 3 years ago

Thanks for sharing Xabbu.
You use it as an entry indicator? And did you find this website already?
https://nononsensetrader.com/top-100-indicators/