RSI-O-MA

by cysecsbin.01 in category Oscilator at 11/09/2019
Description

Follow my cTrader Telegram group at https://t.me/cTraderCommunity; everyone can talk about cTrader indicators and algorithm without restrictions, though it is not allowed to spam commercial indicators to sell them. There's also a Discord Server now @ https://discord.gg/5GAPMtp and an Instagram page https://www.instagram.com/ctrader_community/

This is a RSI applied to a moving average, with trigger.

Signals from this indicator are much different from the classic RSI

Download
85 downloads
How to install
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 cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
{
    [Levels(0, 30, 70, 100)]
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, ScalePrecision = 1, AccessRights = AccessRights.None)]
    public class RSIOMA : Indicator
    {

        [Parameter("RSI Periods", Group = "RSI", DefaultValue = 14)]
        public int RSIPeriods { get; set; }

        [Parameter("Trigger Period", Group = "RSI", DefaultValue = 8)]
        public int TPeriods { get; set; }

        [Parameter("MA Period", Group = "MA", DefaultValue = 14)]
        public int MAPeriods { get; set; }

        [Parameter("MA Type", Group = "MA", DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType MaType { get; set; }

        [Parameter("MA Source", Group = "MA")]
        public DataSeries Source { get; set; }

        [Output("Rsi", LineColor = "Blue")]
        public IndicatorDataSeries Rsi { get; set; }

        [Output("Trigger", LineColor = "B500FFB3")]
        public IndicatorDataSeries Trigger { get; set; }

        private RelativeStrengthIndex _rsi;
        private MovingAverage _ma;
        private ExponentialMovingAverage _ema;

        protected override void Initialize()
        {
            _ma = Indicators.MovingAverage(Source, MAPeriods, MaType);
            _rsi = Indicators.RelativeStrengthIndex(_ma.Result, RSIPeriods);
            _ema = Indicators.ExponentialMovingAverage(_rsi.Result, TPeriods);
        }

        public override void Calculate(int index)
        {
            Rsi[index] = _rsi.Result[index];
            Trigger[index] = _ema.Result[index];
        }

    }
}
Comments
0