Info Oscilator v 1.3 free

by josefxgijon in category Oscilator at 04/08/2022
Description

·Actualización 1.2.1: Corrección de errores. También se han modificado las flechas cuando el stoch es alcista y se han añadido cuando es bajista.

·Actualización 1.2.2: Corrección de errores.

·Actualización 1.3: Corrección de errores. Los títulos RSI y Stoch, no cambian de color, solo cambia de color la información.

Este indicador, nos muestra el estado de RSI y Estocástico en forma de texto, indicándonos:

-SobreCompra en ambos osciladores.

-SobreVenta en ambos osciladores.

-Movimiento alcista en estocástico.

-Movimiento bajista en estocástico.

Qué más te gustaría que aportara este indicador? Déjalo en los comentarios para tenerlo en cuenta cuando lo actualice!

Si te gusta mi trabajo y esfuerzo, considere hacer una amable donación a través de PayPal para ayudarme a crecer y mejorar: DONA

 

 

 

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 System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo
{
    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class Signal_RSI_Stoch : Indicator
    {
        [Parameter("Ver RSI", DefaultValue = true, Group = "Vista")]
        public bool vistaRSI { get; set; }
        [Parameter("Ver Stoch", DefaultValue = true, Group = "Vista")]
        public bool vistaStoch { get; set; }
        
        
        [Parameter("RSI Periodo", DefaultValue = 14, Group = "RSI")]
        public int rsiPeriod { get; set; }
        [Parameter("RSI Nivel SobreCompra", DefaultValue = 70, Group = "RSI")]
        public int rsiSobreCompra { get; set; }
        [Parameter("RSI Nivel SobreVenta", DefaultValue = 30, Group = "RSI")]
        public int rsiSobreVenta { get; set; }


        [Parameter("Stoch K Periodo", DefaultValue = 9, Group = "Stoch")]
        public int stochKPeriod { get; set; }
        [Parameter("Stoch D Periodo", DefaultValue = 9, Group = "Stoch")]
        public int stochDPeriod { get; set; }
        [Parameter("Stoch Slowing", DefaultValue = 3, Group = "Stoch")]
        public int stochSlowing { get; set; }

        [Parameter("Stoch Nivel SobreCompra", DefaultValue = 70, Group = "Stoch")]
        public int stochSobreCompra { get; set; }
        [Parameter("Stoch Nivel SobreVenta", DefaultValue = 30, Group = "Stoch")]
        public int stochSobreVenta { get; set; }


        private RelativeStrengthIndex rsi;
        private StochasticOscillator stoch;

        //-----------------------------------------------------------------------Inicio

        protected override void Initialize()
        {
            rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, rsiPeriod);
            stoch = Indicators.StochasticOscillator(stochKPeriod, stochSlowing, stochDPeriod, MovingAverageType.Simple);
        }

        public override void Calculate(int index)
        {
        
        //-----------------------------------------------------------------------InfoRSI
        
            if (vistaRSI == true && vistaStoch == false)
            {
                if (rsi.Result.Last(1) > rsiSobreCompra)
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);
                }
        
                else if (rsi.Result.Last(1) < rsiSobreVenta)
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                
                }
            
                else
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "         " + rsi.Result.Last(1), VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);                
                }
            }
                
        //-----------------------------------------------------------------------InfoStoch
                
            else if (vistaRSI == false && vistaStoch == true)
            {
                if (stoch.PercentD.Last(1) > stochSobreCompra && stoch.PercentK.Last(1) > stochSobreCompra)
                {
                    Chart.DrawStaticText("Stoch", "Stoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "           SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                    
                }  
                
                else if (stoch.PercentD.Last(1) < stochSobreVenta && stoch.PercentK.Last(1) < stochSobreVenta)
                {
                    Chart.DrawStaticText("Stoch", "Stoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "           SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                
                }
                
                else if (stoch.PercentD.Last(1) < stoch.PercentK.Last(1))
                {
                    Chart.DrawStaticText("Stoch", "Stoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "           Alcista ▲", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Green);                
                }
                
                else if (stoch.PercentD.Last(1) > stoch.PercentK.Last(1))
                {
                    Chart.DrawStaticText("Stoch", "Stoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "           Bajista ▼", VerticalAlignment.Top, HorizontalAlignment.Left, Color.DarkRed);                                
                }
            }

        //-----------------------------------------------------------------------InfoCompl

            else if (vistaRSI == true && vistaStoch == true)
            {
                if (rsi.Result.Last(1) > rsiSobreCompra && stoch.PercentD.Last(1) > stochSobreCompra && stoch.PercentK.Last(1) > stochSobreCompra)
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                
                }
                
                else if (rsi.Result.Last(1) > rsiSobreCompra && stoch.PercentD.Last(1) < stochSobreVenta && stoch.PercentK.Last(1) < stochSobreVenta)
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                                
                }
                
                else if (rsi.Result.Last(1) > rsiSobreCompra && stoch.PercentD.Last(1) < stoch.PercentK.Last(1))
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           Alcista ▲", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Green);                                
                }
                
                else if (rsi.Result.Last(1) > rsiSobreCompra && stoch.PercentD.Last(1) > stoch.PercentK.Last(1))
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           Bajista ▼", VerticalAlignment.Top, HorizontalAlignment.Left, Color.DarkRed);                
                }
                
                else if (rsi.Result.Last(1) < rsiSobreVenta && stoch.PercentD.Last(1) > stochSobreCompra && stoch.PercentK.Last(1) > stochSobreCompra)
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                                    
                }
                
                else if (rsi.Result.Last(1) < rsiSobreVenta && stoch.PercentD.Last(1) < stochSobreVenta && stoch.PercentK.Last(1) < stochSobreVenta)
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                                                
                }
                
                else if (rsi.Result.Last(1) < rsiSobreVenta && stoch.PercentD.Last(1) < stoch.PercentK.Last(1))
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           Alcista ▲", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Green);                                                
                }
                
                else if (rsi.Result.Last(1) < rsiSobreVenta && stoch.PercentD.Last(1) > stoch.PercentK.Last(1))
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "        SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           Bajista ▼", VerticalAlignment.Top, HorizontalAlignment.Left, Color.DarkRed);                                
                }
                
                else if (rsi.Result.Last(1) > rsiSobreVenta && stoch.PercentD.Last(1) > stochSobreCompra && stoch.PercentK.Last(1) > stochSobreCompra)
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "         " + rsi.Result.Last(1), VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);                
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           SobreCompra", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                                                    
                }
                
                else if (rsi.Result.Last(1) > rsiSobreVenta && stoch.PercentD.Last(1) < stochSobreVenta && stoch.PercentK.Last(1) < stochSobreVenta)
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "         " + rsi.Result.Last(1), VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);                
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           SobreVenta", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Red);                                                                
                }
                
                else if (rsi.Result.Last(1) > rsiSobreVenta && stoch.PercentD.Last(1) < stoch.PercentK.Last(1))
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "         " + rsi.Result.Last(1), VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);                
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           Alcista ▲", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Green);                                                                
                }
                
                else if (rsi.Result.Last(1) > rsiSobreVenta && stoch.PercentD.Last(1) > stoch.PercentK.Last(1))
                {
                    Chart.DrawStaticText("RSI", "RSI: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("RSI So", "         " + rsi.Result.Last(1), VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);                
                    Chart.DrawStaticText("Stoch", "\nStoch: ", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Black);
                    Chart.DrawStaticText("Stoch So", "\n           Bajista ▼", VerticalAlignment.Top, HorizontalAlignment.Left, Color.DarkRed);                                                
                }
            }
        }
    }
}
Comments

jorgearteaga - August 04, 2022 @ 20:25

Hey, veo 

jorgearteaga - August 04, 2022 @ 20:27

Veo que lo describes tu indicador en español, hay que ponernos en contacto yo tambien soy algorithmic trader

josefxgijon - August 04, 2022 @ 20:46

Te enviaré un correo cuando pueda jorgearteaga!

anna.stark266 - August 08, 2022 @ 05:38

Thank you for providing this information. I am delighted to come on this fantastic article . Retro Bowl game 

among012a - August 22, 2022 @ 10:08

Playing redactle game is something I encourage. This is an excellent game for de-stressing and relaxing.

otis.schamberger89 - August 26, 2022 @ 09:48

I've learned the hard way that it's not a good idea to construct high-frequency circuits on stripboard or veroboard, so I thought I'd add that warning for anyone reading this who wants to try building circuits like these. Due to the inherent capacitance between the fnf mod tracks, the circuit will be unstable. Wood is a good idea for beginners.

junealexis001 - September 12, 2022 @ 12:03

Great site i love it keep posting more!   https://fencingspokanewa.com

0