Vous êtes sur la page 1sur 1

/*-----------------------------------------------------------

ADXxBollinger - www.marketcalls.in

Inspired from Waddah Attar ADXxBollinger Indicator MQL4 code


-------------------------------------------------------------*/

_SECTION_BEGIN("ADXxBollinger");

ADXPar = Param( "ADX Param", 13, 2, 100, 1 );


BBPar = Param( "BB Param", 20, 2, 100, 1 );
P = ParamField("Price field",-1);
Width = Param("Width", 2, 0, 10, 0.05 );

ADX0 = ADX(ADXPar);
PDI0 = PDI(ADXPar);
MDI0 = MDI(ADXPar);

Bbup = BBandTop(P,BBpar,width);
Bbdown = BBandBot(P,BBpar,width);

Diff = Bbup - Bbdown;

PT=IIf(PDI0>=MDI0,Diff*ADX0,Null);
NT=IIf(PDI0<=MDI0,Diff*ADX0,Null);

Plot( PT, "Positive Trend", colorGreen , styleHistogram | styleThick );


Plot( NT, "Negative Trend", colorRed , styleHistogram | styleThick );

_SECTION_END();