Category Oscilators  Published on 15/11/2021

Waddah Attar Explosion

Description

Description:

Waddah Attar Explosion is a indicator and the essence of the forex indicator is to transform the accumulated history data.

Waddah Attar Explosion provides for an opportunity to detect various peculiarities and patterns in price dynamics which are invisible to the naked eye.

Based on this information, traders can assume further price movement and adjust their strategy accordingly.

This indicator based on MetaTrader 4 and it has been rewrote for cTrader.

 

Screenshots:

 

Github: GitHub - Doustzadeh/cTrader-Indicator


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

namespace cAlgo
{
    [Indicator(IsOverlay = false, AccessRights = AccessRights.None)]
    public class WaddahAttarExplosion : Indicator
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter("Periods", Group = "Bollinger Bands", DefaultValue = 20)]
        public int BollingerPeriods { get; set; }

        [Parameter("Standard Dev", Group = "Bollinger Bands", DefaultValue = 2, MinValue = 0)]
        public double StDeviation { get; set; }

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

        [Parameter("Long Cycle", Group = "MACD", DefaultValue = 40)]
        public int LongCycle { get; set; }

        [Parameter("Short Cycle", Group = "MACD", DefaultValue = 20)]
        public int ShortCycle { get; set; }

        [Parameter("Signal Periods", Group = "MACD", DefaultValue = 9)]
        public int SignalPeriods { get; set; }

        [Parameter("Sensetive", DefaultValue = 150)]
        public int Sensetive { get; set; }

        [Parameter("Dead Zone Pip", DefaultValue = 30)]
        public int DeadZonePip { get; set; }

        [Output("Trend", LineColor = "Lime", PlotType = PlotType.Histogram, Thickness = 4)]
        public IndicatorDataSeries Trend { get; set; }

        [Output("iTrend", LineColor = "Red", PlotType = PlotType.Histogram, Thickness = 4)]
        public IndicatorDataSeries iTrend { get; set; }

        [Output("Explosion", LineColor = "Yellow", Thickness = 2)]
        public IndicatorDataSeries Explosion { get; set; }

        [Output("Dead", LineColor = "DodgerBlue", Thickness = 2)]
        public IndicatorDataSeries Dead { get; set; }

        private MacdCrossOver iMACD;
        private BollingerBands iBands;

        private double TrendDir;

        protected override void Initialize()
        {
            iMACD = Indicators.MacdCrossOver(Source, LongCycle, ShortCycle, SignalPeriods);
            iBands = Indicators.BollingerBands(Source, BollingerPeriods, StDeviation, MaType);
        }

        public override void Calculate(int index)
        {
            TrendDir = (iMACD.MACD[index] - iMACD.MACD[index - 1]) * Sensetive;

            if (TrendDir >= 0)
            {
                Trend[index] = TrendDir;
            }

            if (TrendDir < 0)
            {
                iTrend[index] = -1 * TrendDir;
            }

            Explosion[index] = iBands.Top[index] - iBands.Bottom[index];
            Dead[index] = Symbol.TickSize * DeadZonePip;
        }

    }
}


Doustzadeh's avatar
Doustzadeh

Joined on 20.03.2016

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Waddah Attar Explosion.algo
  • Rating: 5
  • Installs: 5082
  • Modified: 14/11/2021 16:29
Comments
Log in to add a comment.
TB
tbrbde · 8 years ago

I mean TrendPower.

TB
tbrbde · 8 years ago

and also ExplosionPower.  This is strange. The formula for MT4 looks much more complex.

TB
tbrbde · 8 years ago

also ExplosionPower...

 

TB
tbrbde · 8 years ago

The calculation of Trend2 and Explo2 seems to have no sense...