Category Other  Published on 01/12/2020

RSI_STOCH_together

Description

Hello, in this indicator I have combined the RSI panel and the STOCHASTIC OSCILLATOR  into one. I like to have more space for the chart. Hope it helps you ;)

You can change/add/delete  default levels. Also RSI and STOCH have grouped parameters so you can change them for yours.

I will make also something like coloured clouds for overbought and oversold  in next version.

If you have any ideas feel free to contact me through my youtube channel -> In profile description. I will do also videos about this indicator on my youtube channel.

Parameters:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


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

namespace cAlgo
{
    [Levels(30, 70)]

    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Rsi_Stoch_v0 : Indicator
    {
        // PARAMETRY RSI
        // rsi
        [Parameter("Period", Group = "RSI", DefaultValue = 14)]
        public int rsiPeriod { get; set; }
        [Output("RSI", LineColor = "Gray", PlotType = PlotType.Line, Thickness = 1)]
        public IndicatorDataSeries RSI_Result { get; set; }
        // stoch
        [Parameter("Period", Group = "STOCH", DefaultValue = 14)]
        public int Period_stoch { get; set; }
        [Parameter("%K", Group = "STOCH", DefaultValue = 3)]
        public int kPeriods_D { get; set; }
        [Parameter("%D", Group = "STOCH", DefaultValue = 3)]
        public int kSlowing_K { get; set; }
        private StochasticOscillator _stoch;
        [Output("%D", LineColor = "Red", PlotType = PlotType.DiscontinuousLine, Thickness = 1)]
        public IndicatorDataSeries Percent_D { get; set; }
        [Output("%K", LineColor = "Green", PlotType = PlotType.Line, Thickness = 1)]
        public IndicatorDataSeries Percent_K { get; set; }
        // var
        private RelativeStrengthIndex _rsi;
        protected override void Initialize()
        {
            DataSeries _ds = Bars.TypicalPrices;
            _rsi = Indicators.RelativeStrengthIndex(_ds, rsiPeriod);
            _stoch = Indicators.StochasticOscillator(14, 3, 3, MovingAverageType.Simple);
        }

        public override void Calculate(int index)
        {
            RSI_Result[index] = _rsi.Result[index];
            Percent_K[index] = _stoch.PercentK.LastValue;
            Percent_D[index] = _stoch.PercentD.LastValue;
        }

    }
}


PI
piotrcieadv

Joined on 26.11.2020

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Rsi_Stoch_v0.algo
  • Rating: 0
  • Installs: 2969
Comments
Log in to add a comment.
No comments found.