Kpl swing indicator...need afl to convet in mt4

To add comments, please log in or register
ashishpurohit
114
ashishpurohit  

Hi...i am new in the system... do anyone knows about KPL swing (breakout trading system)...can anyone convert this afl into mt4...

//---- heikin ashi

HaClose = (O+H+L+C)/4;

HaOpen = AMA( Ref( HaClose, -1 ), .40);

HaHigh = Max( H, Max( HaClose, HaOpen ) );

HaLow = Min( L, Min( HaClose, HaOpen ) );

xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000);

barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed);

PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle );

// Plot(EMA(HaClose,9),"",colorWhite, styleLine);

// Plot(EMA(HaClose,18),"",colorBlack, styleLine);

_SECTION_BEGIN("KPL Swing");

//Copyright Kamalesh Langote. Email:kpl@vfmdirect.com. More details at KPL Swing (breakout trading system)

//Save indicator as "kplswing.afl" in C: program files > Amibroker > Formulas > Custom folder and then drap and drop on price chart

no=Param( "Swing", 20, 1, 55 );

tsl_col=ParamColor( "Color", colorCycle );

res=HHV(H,no);

sup=LLV(L,no);

avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));

avn=ValueWhen(avd!=0,avd,1);

tsl=IIf(avn==1,sup,res);

Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase); // or styleaArea

Buy=Cross(C,tsl);

Sell=Cross(tsl,C);

shape=Buy*shapeUpArrow + Sell*shapeDownArrow;

PlotShapes(shape,IIf(Buy,tsl_col,tsl_col),0,IIf(Bu y,Low,High));

_SECTION_END();

Files:
pateldivyesh
5
pateldivyesh  

please convert to mt4 code

Files:
kpl_afl.txt 2 kb
Sergey Golubev
Moderator
114248
Sergey Golubev  
To add comments, please log in or register