Elite indicators :) - page 383

 

TepeFinans

Here you go

I would just like to explain why "generic" in name : I did not use the "default" indicator that is provided by metatrader but am using a version that allows different period of values and signals smoothing. Smoothing used both for values and signal is the triangular moving average (the "regular" triangular moving average not the centered one, so there is no recalculation whatsoever) and is set by default to be the same as the built in indicator but also allows you to experiment with different smoothing lengths.

Attaching a simple indicator as well as a version with mtf, alerts and divergence lines too. Attaching the "simple version in order to let that version be simply comparable to the default built in indicator. Also, when looking for divergences, it might be a good idea to turn rvi smoothing of (set the smooth period to 1) since that way the "raw rvi" value lag is minimal and that way peek identification is much more precise than in the smoothed mode, but be aware that it is a "raw rvi" then and not rvi (here is a comparison of a regular rvi (upper) and "raw rvi" (lower) divergences - as it is visible the raw is doing the job more precise when divergence is concerned and this way the "generic" version becomes a bit more useful

regards

Mladen

TepeFinans:
Hi Mladen

Relative Vigor Index

Divergence

???
Files:
 

Hi Mladen

Thanks

mladen:
TepeFinans

Here you go

I would just like to explain why "generic" in name : I did not use the "default" indicator that is provided by metatrader but am using a version that allows different period of values and signals smoothing. Smoothing used both for values and signal is the triangular moving average (the "regular" triangular moving average not the centered one, so there is no recalculation whatsoever) and is set by default to be the same as the built in indicator but also allows you to experiment with different smoothing lengths.

Attaching a simple indicator as well as a version with mtf, alerts and divergence lines too. Attaching the "simple version in order to let that version be simply comparable to the default built in indicator. Also, when looking for divergences, it might be a good idea to turn rvi smoothing of (set the smooth period to 1) since that way the "raw rvi" value lag is minimal and that way peek identification is much more precise than in the smoothed mode, but be aware that it is a "raw rvi" then and not rvi (here is a comparison of a regular rvi (upper) and "raw rvi" (lower) divergences - as it is visible the raw is doing the job more precise when divergence is concerned and this way the "generic" version becomes a bit more useful

regards

Mladen
 

QQE advanced

This is an attempt to make an already useful indicator a bit more useful


Things added to QQE : possibility to choose and smooth (filter) price before being used in calculation and possibility to use other than the built in metatrader rsi. Built in metatrader rsi differs from a original Welles Wilder's rsi and I decided to set the default rsi type used in QQE calculation Wilder's rsi for more than one reason. As usual, rsi methods can be

0 - "regular" rsi

1 - Wilder's rsi

2 - rsx

3 - Cuttler rsi

Also, even a very mild price pre-smoothing is giving rather interesting results : here is a comparison of a "regulr" QQE with a advanced QQE with Wilder's 3 period pre-smoothed (MaPeriodset to 3) rsi used in calculation

or same settings 1 hour indicator on a 15 minute chart (now days when people were looking for swings it seems that a look at something like this might have helped to avoid some mistakes)

Files:
qqe_adv_1.gif  24 kb
qqe_adv_2.gif  20 kb
 

Mladen, Kind request

dear Mladen,

Would mind converting the qqe indicator into colored bar ! As previous one.C

Thank you in advance

Yours,

khaliddxd

 
mladen:
TepeFinans

Here you go

I would just like to explain why "generic" in name : I did not use the "default" indicator that is provided by metatrader but am using a version that allows different period of values and signals smoothing. Smoothing used both for values and signal is the triangular moving average (the "regular" triangular moving average not the centered one, so there is no recalculation whatsoever) and is set by default to be the same as the built in indicator but also allows you to experiment with different smoothing lengths.

Attaching a simple indicator as well as a version with mtf, alerts and divergence lines too. Attaching the "simple version in order to let that version be simply comparable to the default built in indicator. Also, when looking for divergences, it might be a good idea to turn rvi smoothing of (set the smooth period to 1) since that way the "raw rvi" value lag is minimal and that way peek identification is much more precise than in the smoothed mode, but be aware that it is a "raw rvi" then and not rvi (here is a comparison of a regular rvi (upper) and "raw rvi" (lower) divergences - as it is visible the raw is doing the job more precise when divergence is concerned and this way the "generic" version becomes a bit more useful

regards

Mladen

arrows, please? (same for Mladen's new QQE please)

 

Request for another new indi

Mladen,

Here is a request for another new indicator called Mogalef bands

This code has gone public in May this year on a traders meeting

They are different versions on forums for it now: Ninja, PRT, GraphAT (see attached documents)etc.

but the GrapAT version seems OK

Could please make a Mql4 translation of this code, I think everybody will like it...

Please feel free to do your own modification if needed

Thank you

devinci

****************************************************************

//=======================

// Mogalef Bands - GrapAT

//=======================

//1---- Weighted prices "Mogalef"

//

CP(0)=(High+Low+Open+2*Close)/5

//2---- linear regression Weighted prices P1 periods

//

If RangHisto>=P1 Then

somx = 0

somy = 0

somxx = 0

somxy = 0

For P1 Prices

somx = somx+RangPour

somy = somy+CP

somxx = somxx+RangPour*RangPour

somxy = somxy+RangPour*CP

EndFor

a = (P1*somxy-somx*somy)/(P1*somxx-somx*somx)

b = (somy-a*somx)/P1

MogRegLin = b + a*P1

EndIf

//3---Standard deviation of linear regression on P2 periods

//

If RangHisto>= P1+P2-1 Then

StanDev(0)=StandarDeviation(MogRegLin,P2)

EndIf

//4---- "Mogalef" Bands

//

If RangHisto>=P1+P2 Then

If MogRegLinMogB(1) // NO LAG if Lin Reg is within inside bands

Then

StanDev=StanDev(1)

MogM=MogM(1)

MogH=MogH(1)

MogB=MogB(1)

IfNot // shift/lag when computing new band values

MogM=MogRegLin

MogH=MogRegLin+P3*StanDev

MogB=MogRegLin-P3*StanDev

EndIf

EndIf

//end of code

**************************************************************************

other version:

{*********************************************************

Mogalef Bands easy language Multicharts

**********************************************************}

variables: var0(0), var1(0), HighBand(0), LowBand(0), Mediane(0);

var0 = LinearRegValue((Open+High+Low+(2*Close))/5,3,0);

var1 = StandardDev(var0,7,1);

if currentbar=8 then

begin

HighBand = var0 + 2*var1;

LowBand = var0 - 2*var1;

Mediane = var0;

end

else

if var0 HighBand then

begin

HighBand = var0 + 2*var1;

LowBand = var0 - 2*var1;

Mediane = var0;

end;

Plot1(HighBand,"HighBand");

Plot2(LowBand,"LowBand");

Plot3(Mediane,"Mediane");

*********************************************************

other version:

**************************

Mogalef Bands Ninja trader

**************************

#region Using declarations

using System;

using System.ComponentModel;

using System.Diagnostics;

using System.Drawing;

using System.Drawing.Drawing2D;

using System.Xml.Serialization;

using NinjaTrader.Cbi;

using NinjaTrader.Data;

using NinjaTrader.Gui.Chart;

#endregion

// This namespace holds all indicators and is required. Do not change it.

namespace NinjaTrader.Indicator

{

///

/// Enter the description of your new custom indicator here

///

[Description("Enter the description of your new custom indicator here")]

public class MogalefBands : Indicator

{

#region Variables

// Wizard generated variables

// User defined variables (add any user defined variables below)

private DataSeries CPSerie, ESerie, FSerie;

private double nMedian = 0, nHigh = 0, nLow = 0;

private int LinRegPeriode = 3, StdDevPeriode = 7;

#endregion

///

/// This method is used to configure the indicator and is called once before any bar data is loaded.

///

protected override void Initialize()

{

Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "MMedian"));

Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MHigh"));

Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MLow"));

Overlay = true;

CPSerie = new DataSeries( this );

ESerie = new DataSeries( this );

FSerie = new DataSeries( this );

}

///

/// Called on each bar update event (incoming tick)

///

protected override void OnBarUpdate()

{

// Use this method for calculating your indicator values. Assign a value to each

// plot below by replacing 'Close[0]' with your own formula.

if (CurrentBar < 8)

{

CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5);

nMedian = CPSerie[0];

nHigh = 0;

nLow = 0;

return;

}

CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5);

if (CurrentBar > 8 + StdDevPeriode)

{

FSerie.Set(LinReg(CPSerie,LinRegPeriode)[0]);

ESerie.Set(StdDev(FSerie,StdDevPeriode)[0]);

}

else

{

FSerie.Set(CPSerie[0]);

ESerie.Set(0);

}

if (FSerie[0] nHigh)

{

nMedian = FSerie[0];

nHigh = nMedian + (2*ESerie[0]);

nLow = nMedian - (2*ESerie[0]);

}

MMedian.Set(nMedian);

MHigh.Set(nHigh);

MLow.Set(nLow);

}

#region Properties

// this line prevents the data series from being displayed in the indicator properties dialog, do not remove

[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove

public DataSeries MMedian

{

get { return Values[0]; }

}

// this line prevents the data series from being displayed in the indicator properties dialog, do not remove

[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove

public DataSeries MHigh

{

get { return Values[1]; }

}

// this line prevents the data series from being displayed in the indicator properties dialog, do not remove

[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove

public DataSeries MLow

{

get { return Values[2]; }

}

[Description("")]

[Category("Parameters")]

[Gui.Design.DisplayName("LinReg periode")]

public int LinRegPERIODE

{

get { return LinRegPeriode; }

set { LinRegPeriode = Math.Max(1, value); }

}

[Description("")]

[Category("Parameters")]

[Gui.Design.DisplayName("StdDev periode")]

public int StdDevPERIODE

{

get { return StdDevPeriode; }

set { StdDevPeriode = Math.Max(1, value); }

}

#endregion

}

}

******************************************************************

******************************************************************
Files:
example1.png  37 kb
 

devinci

Here you go Used default parameters they are using and added the price they are using (the (High+Low+Open+2*Close)/5 which does not exist in metatrader) Use 8 in BandsPrice parameter to get that price.

PS: I edited your post in order to make it "visually shorter". Nothing else was altered in it. Hope you don't mind

regards

Mladen

devinci:
Mladen,

Here is a request for another new indicator called Mogalef bands

This code has gone public in May this year on a traders meeting

They are different versions on forums for it now: Ninja, PRT, GraphAT (see attached documents)etc.

but the GrapAT version seems OK

Could please make a Mql4 translation of this code, I think everybody will like it...

Please feel free to do your own modification if needed

Thank you

devinci

****************************************************************

//=======================

// Mogalef Bands - GrapAT

//=======================

//1---- Weighted prices "Mogalef"

//

CP(0)=(High+Low+Open+2*Close)/5

//2---- linear regression Weighted prices P1 periods

//

If RangHisto>=P1 Then

somx = 0

somy = 0

somxx = 0

somxy = 0

For P1 Prices

somx = somx+RangPour

somy = somy+CP

somxx = somxx+RangPour*RangPour

somxy = somxy+RangPour*CP

EndFor

a = (P1*somxy-somx*somy)/(P1*somxx-somx*somx)

b = (somy-a*somx)/P1

MogRegLin = b + a*P1

EndIf

//3---Standard deviation of linear regression on P2 periods

//

If RangHisto>= P1+P2-1 Then

StanDev(0)=StandarDeviation(MogRegLin,P2)

EndIf

//4---- "Mogalef" Bands

//

If RangHisto>=P1+P2 Then

If MogRegLinMogB(1) // NO LAG if Lin Reg is within inside bands

Then

StanDev=StanDev(1)

MogM=MogM(1)

MogH=MogH(1)

MogB=MogB(1)

IfNot // shift/lag when computing new band values

MogM=MogRegLin

MogH=MogRegLin+P3*StanDev

MogB=MogRegLin-P3*StanDev

EndIf

EndIf

//end of code

**************************************************************************

other version:

{*********************************************************

Mogalef Bands easy language Multicharts

**********************************************************}

variables: var0(0), var1(0), HighBand(0), LowBand(0), Mediane(0);

var0 = LinearRegValue((Open+High+Low+(2*Close))/5,3,0);

var1 = StandardDev(var0,7,1);

if currentbar=8 then

begin

HighBand = var0 + 2*var1;

LowBand = var0 - 2*var1;

Mediane = var0;

end

else

if var0 HighBand then

begin

HighBand = var0 + 2*var1;

LowBand = var0 - 2*var1;

Mediane = var0;

end;

Plot1(HighBand,"HighBand");

Plot2(LowBand,"LowBand");

Plot3(Mediane,"Mediane");

*********************************************************

other version:

**************************

Mogalef Bands Ninja trader

**************************

#region Using declarations

using System;

using System.ComponentModel;

using System.Diagnostics;

using System.Drawing;

using System.Drawing.Drawing2D;

using System.Xml.Serialization;

using NinjaTrader.Cbi;

using NinjaTrader.Data;

using NinjaTrader.Gui.Chart;

#endregion

// This namespace holds all indicators and is required. Do not change it.

namespace NinjaTrader.Indicator

{

///

/// Enter the description of your new custom indicator here

///

[Description("Enter the description of your new custom indicator here")]

public class MogalefBands : Indicator

{

#region Variables

// Wizard generated variables

// User defined variables (add any user defined variables below)

private DataSeries CPSerie, ESerie, FSerie;

private double nMedian = 0, nHigh = 0, nLow = 0;

private int LinRegPeriode = 3, StdDevPeriode = 7;

#endregion

///

/// This method is used to configure the indicator and is called once before any bar data is loaded.

///

protected override void Initialize()

{

Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "MMedian"));

Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MHigh"));

Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MLow"));

Overlay = true;

CPSerie = new DataSeries( this );

ESerie = new DataSeries( this );

FSerie = new DataSeries( this );

}

///

/// Called on each bar update event (incoming tick)

///

protected override void OnBarUpdate()

{

// Use this method for calculating your indicator values. Assign a value to each

// plot below by replacing 'Close[0]' with your own formula.

if (CurrentBar < 8)

{

CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5);

nMedian = CPSerie[0];

nHigh = 0;

nLow = 0;

return;

}

CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5);

if (CurrentBar > 8 + StdDevPeriode)

{

FSerie.Set(LinReg(CPSerie,LinRegPeriode)[0]);

ESerie.Set(StdDev(FSerie,StdDevPeriode)[0]);

}

else

{

FSerie.Set(CPSerie[0]);

ESerie.Set(0);

}

if (FSerie[0] nHigh)

{

nMedian = FSerie[0];

nHigh = nMedian + (2*ESerie[0]);

nLow = nMedian - (2*ESerie[0]);

}

MMedian.Set(nMedian);

MHigh.Set(nHigh);

MLow.Set(nLow);

}

#region Properties

// this line prevents the data series from being displayed in the indicator properties dialog, do not remove

[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove

public DataSeries MMedian

{

get { return Values[0]; }

}

// this line prevents the data series from being displayed in the indicator properties dialog, do not remove

[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove

public DataSeries MHigh

{

get { return Values[1]; }

}

// this line prevents the data series from being displayed in the indicator properties dialog, do not remove

[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove

public DataSeries MLow

{

get { return Values[2]; }

}

[Description("")]

[Category("Parameters")]

[Gui.Design.DisplayName("LinReg periode")]

public int LinRegPERIODE

{

get { return LinRegPeriode; }

set { LinRegPeriode = Math.Max(1, value); }

}

[Description("")]

[Category("Parameters")]

[Gui.Design.DisplayName("StdDev periode")]

public int StdDevPERIODE

{

get { return StdDevPeriode; }

set { StdDevPeriode = Math.Max(1, value); }

}

#endregion

}

}

******************************************************************

******************************************************************
Files:
 

Mogalef bands

Mladen,

Thanks a lot , this is perfect

Have a good day

devinci

 

And now a histo if possible please

Hi Mladen,

Can you please make from 2 QQE advanced in different time frames the same histogram you made before with the simple QQE (with red green and grey bars)

Thanks in advance

 

Mogalef Bands

BTW Nice description of Mogalef Bands and how to use them here http://www.whselfinvest.com/en/trading_strategies_26_Mogalef_Bands.php Enjoy.

Reason: