HH LL HL LH can anyone pls convert this ami afl to mt4 .tpl or Indicator

#1
My old mahadev afl i want ea or indicator to run on mt4

can anyone pls convert this ami afl to mt4 .tpl or Indicator

sorry for wrong thread name it was by mistake entered dont know why i put wrong name of this thread :p
 
Last edited:
#2
Hi

Code:
_SECTION_BEGIN("Mahadev");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );


A = Wilders( H,89 );
B = Wilders( L,89 );


x= Ref(A,-89);
y= Ref(B,-89);

D=.0009;
xt=x+x*D;
xb=x-x*D;

yt=y+y*D;
yb=y-y*D;

/* Buy or Sell Condition */
Buy = Cross(Close,xt);
Sell = Cross(yt,Close);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

AlertIf( Buy, "SOUND C:\\Windows\\Media\\notify.wav", "Audio alert", 2);
AlertIf( Sell, "SOUND C:\\Windows\\Media\\tada.wav", "Audio alert", 2 );

Filter = Buy OR Sell;
/* Exploration Parameters */
AddTextColumn( FullName(), "Company Name" );
AddColumn( Buy, "Buy", 1 );
AddColumn( Sell, "Sell", 1 );
AddColumn( C, "Close", 1.3 );
AddColumn( H, "High", 1.3 );

Title = EncodeColor(colorWhite)+ "Mahadev" + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) +
" - " + Date() +" - "+"\n" +EncodeColor(colorRed) +"Op-"+O+" "+"Hi-"+H+" "+"Lo-"+L+" "+
"Cl-"+C+" "+ "Vol= "+ WriteVal(V)+"\n"+ 
EncodeColor(colorLime)+
WriteIf (Buy , " GO LONG / Reverse Signal at "+C+" ","")+
WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+" ","")+"\n"+EncodeColor(colorWhite)+
WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy , "Total Profit/Loss for the Last trade Rs."+(SellPrice-C)+"","");

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50); 
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); 
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
_SECTION_END();
 

Similar threads