Category Trend  Published on 15/04/2020

PVSRA Dragon

Description

Dragon Lines of PVSRA


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

namespace cAlgo
{
    [Cloud("High", "Close", Opacity = 0.4, FirstColor = "#272E44", SecondColor = "#272E44")]
    [Cloud("Close", "Low", Opacity = 0.4, FirstColor = "#272E44", SecondColor = "#272E44")]
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class PVSRADragon : Indicator
    {
        [Parameter("Period", DefaultValue = 50)]
        public int Period { get; set; }

        [Parameter("Long Period", DefaultValue = 200)]
        public int LongPeriod { get; set; }

        [Output("Close", LineColor = "#272E44")]
        public IndicatorDataSeries CloseResult { get; set; }

        [Output("High", LineColor = "#272E44")]
        public IndicatorDataSeries HighResult { get; set; }

        [Output("Low", LineColor = "#272E44")]
        public IndicatorDataSeries LowResult { get; set; }

        [Output("Long", LineColor = "#FFFFCD", LineStyle = LineStyle.Lines, Thickness = 1)]
        public IndicatorDataSeries LongResult { get; set; }

        ExponentialMovingAverage CloseEma;
        ExponentialMovingAverage HighEma;
        ExponentialMovingAverage LowEma;
        ExponentialMovingAverage LongEma;

        protected override void Initialize()
        {
            CloseEma = Indicators.ExponentialMovingAverage(Bars.ClosePrices, Period);
            HighEma = Indicators.ExponentialMovingAverage(Bars.HighPrices, Period);
            LowEma = Indicators.ExponentialMovingAverage(Bars.LowPrices, Period);
            LongEma = Indicators.ExponentialMovingAverage(Bars.ClosePrices, LongPeriod);
        }

        public override void Calculate(int index)
        {
            CloseResult[index] = CloseEma.Result[index];
            HighResult[index] = HighEma.Result[index];
            LowResult[index] = LowEma.Result[index];
            LongResult[index] = LongEma.Result[index];
        }
    }
}


reyx's avatar
reyx

Joined on 16.02.2019

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: PVSRA Dragon.algo
  • Rating: 0
  • Installs: 2126
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
CT
ctid1566965 · 1 year ago

Thank you for the indicator. I use it very successfully. I also use your Dragon indicator. It's great that you're making your work available to the general public.
Now I have a question. Since I can't program myself, it would be possible for you to program the missing part of the PVSRA start strategy. It would be helpful if the PVSRA Zones still existed. That would be very helpful and I wouldn't always have to draw the zones myself. I trade on the 1M. The zones are constantly changing.
It shouldn't be too difficult for someone like you. This already exists for TradingView. Unfortunately not for cTrader. Or did I miss something? Willing to donate something indeed.
Greetings and thank you again!
Klaus

CA
casagabriel16 · 4 years ago

Boa tarde amigo,

cara que legal codificou pvsra... 

desculpa ignorancia, mas saberia auxiliar a colocar no profitchart ? 

leigo em codigos... obrigado