Can anyone please find me this afl for amibroker.......if anyone has it plz post it.

#11
Re: Can anyone please find me this afl for amibroker.......if anyone has it plz post

It totally a different system, you cannot just see the BandStop indicator can asume that it is the same.
The main indicator is the so called "TriggerLine". I got it in another forum, i do a parameter match with fibo num 55,144 and it tally the line quite well.
Hellow Mr.KelvinHand, could you please share with us this system?if not no problem...thanks for all your hard works...:thumb:
 
#14
Re: Can anyone please find me this afl for amibroker.......if anyone has it plz post

finally found this code of MT4 in our forum itself........can someone please convert this for amibroker it will really be very helpful......can somenone plz check this code in mt4 and tell if this the same code that I'm in search of.......


//+-------------------------------------------------------------------+
//| Trigger Line |
//| Copyright 2005 dwt5 and adoleh2000 |
//| http://www.metaquotes.net |
//| Modified by Kelvinhand |
//+-------------------------------------------------------------------+
#property copyright "Copyright 2005 dwt5 and adoleh2000 "
#property link "http://www.metaquotes.net/"

//---- indicator settings
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Red
#property indicator_color3 DeepSkyBlue
#property indicator_color4 DeepSkyBlue

//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double wt[];
double lsma_ma[];

extern int Rperiod = 55;
extern int LSMA_Period = 144;

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- 7 additional buffers are used for counting.
IndicatorBuffers(6);

//---- drawing settings

SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);

SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);

SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,1);

SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,1);

SetIndexBuffer(4,wt);
SetIndexBuffer(5,lsma_ma);

//---- initialization done
return(0);
}

int start()
{

//***** Modified by Kelvinhand ***********************
int counted_bars = IndicatorCounted();
//---- check for possible errors
if (counted_bars<0) return(-1);

//---- last counted bar will be recounted
if (counted_bars>0) counted_bars--;

int i,j;
double lengthvar;
double sum ;

int limit = Bars - counted_bars - Rperiod;


for(i = limit; i >= 0; i--) // MAIN For Loop
{
sum = 0;
for(j = Rperiod; j >= 1 ; j--) //LSMA loop
{
lengthvar = (Rperiod + 1)/3.0; //lengthvar = 21
sum+= ( j - lengthvar)*Close[Rperiod-j+i]; //tmp = 20 - 7 * close[20-j+i]
}
wt = sum*6/(Rperiod*(Rperiod+1));
lsma_ma = wt[i+1] + (wt-wt[i+1])* 2/(LSMA_Period+1);

ExtMapBuffer1 = wt;
ExtMapBuffer2 = lsma_ma;
ExtMapBuffer3 = wt;
ExtMapBuffer4 = lsma_ma;

if (wt < lsma_ma)
{
ExtMapBuffer4 = EMPTY_VALUE;
ExtMapBuffer3 = EMPTY_VALUE;
}

}
}
//+------------------------------------------------------------------+
 

rnls

New Member
#15
Re: Can anyone please find me this afl for amibroker.......if anyone has it plz post

Can anyone please find me this afl for amibroker....



pls ERRoR FIX me sir pls this error pls



{
PlotText(""+sig+"@"+entry, BarCount+1,entry,Null,colorBlue);
PlotText("T1@"+tar1,BarCount+3,tar1,Null,Clr);Plot Text("T2@"+tar2,BarCount+3,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount+3,tar3,Null,Clr);PlotText ("T4@"+tar4,BarCount+3,tar4,Null,Clr);
}
 

Attachments

Last edited:
#16
Re: Can anyone please find me this afl for amibroker.......if anyone has it plz post

Dont' Go any where...
Here it is... Enjoy...


_SECTION_BEGIN("Price");

upbar = C > Ref( C, -1 );
downbar = C < Ref( C, -1 );

/* Colourized price bars drawn here */
Graph0 = Close;
Graph0Style = 128;

barcolor = IIf( downbar, 4, IIf( upbar, 5, 1 ) );
Graph0BarColor = ValueWhen( barcolor != 0, barcolor );
SetBarFillColor( IIf( Close > Open, colorGreen, colorDarkRed ) );

SetChartOptions(0,chartShowArrows|chartShowDates);
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
//_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

Title = EncodeColor(colorWhite)+ Name() + " - " + EncodeColor(colorYellow)+ Interval(2) + EncodeColor(colorYellow) +
" - " + Date() +" - "+ EncodeColor(colorYellow) + "Open = "+EncodeColor(colorWhite)+WriteVal(O,8.2) + EncodeColor(colorYellow) + ", High = "+EncodeColor(colorWhite)+ WriteVal(H,8.2)+ EncodeColor(colorYellow) + ", Low= "+EncodeColor(colorWhite)+ WriteVal(L,8.2)+ EncodeColor(colorYellow) + ", Close= "+EncodeColor(colorWhite)+ WriteVal(C,8.2)+ EncodeColor(colorYellow) + ", Vol= "+EncodeColor(colorWhite)+ WriteVal(V,1)+("\n");

Plot( C, "Close", ParamColor("Color", colorYellow ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() );


Plot( O, "Open", ParamColor("Color", colorBlack ), styleNoDraw);
Plot( H, "High", ParamColor("Color", colorBlack ), styleNoDraw);
Plot( L, "Low", ParamColor("Color", colorBlack ),styleNoDraw);
Plot( C, "Close", ParamColor("Color", colorBlack ),styleNoDraw, ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
//Comments:




////////////////////////////////////////// DAY GRID ///////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------------------------------------------------------------

grid_day = IIf(Day()!=Ref(Day(),-1),1,0);
Plot(grid_day,"",colorWhite,styleHistogram|styleDashed|styleNoLabel|styleOwnScale);


///////////////////////////////////////////////////////////////////////////////



_SECTION_BEGIN("swing1");

messageboard = ParamToggle("Message Board","Show|Hide",0);
showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0);


no=20;
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);
supres=IIf(avn==1,sup,res);
//s5d=IIf(avn==1,sup,res);
a=Cross(C,supres);
b=Cross(supres,C);

if (showsl == 0)
{
Plot(supres,"Stop Loss",colorCustom8,styleDots);
}


//Plot(supres,"Swing",colorYellow,styleStaircase);
//Plot(supres,"Swing",colorLightBlue,styleDots);

//SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )),ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 )));



prev=AMA2(C,1,0);
//d=IIf(C>( Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1) ),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(C<Ref(Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))),-1),Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),PREV));

d=IIf(C>( Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1) ),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(C<Ref(Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))),-1),Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),PREV));

Buy=Cross(Close,d);
//a = Cross)Close,d);

Sell=Cross(d,Close);
//b=Cross(d,Close);
//state=IIf(BarsSince(a)<BarsSince(b),1,0);


Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
//Short = ExRem(Short, Cover);
//Cover = ExRem(Cover, Short);
AlertIf( Buy, "", "BUY @ " + C, 1 );
AlertIf( Sell, "", "SELL @ " + C, 2);



for(i=BarCount-1;i>1;i--)
{
if(Buy == 1)
{
entry = C;
sig = "BUY";
sl = supres;
tar1 = entry + (entry * .0050);
tar2 = entry + (entry * .0092);
tar3 = entry + (entry * .0125);
tar4 = entry + (entry * .0192);

bars = i;
i = 0;
}
if(Sell == 1)
{
sig = "SELL";
entry = C;
sl = supres;

tar1 = entry - (entry * .0050);
tar2 = entry - (entry * .0112);
tar3 = entry - (entry * .0152);
tar4 = entry - (entry * .0212);

/*tar1 = entry - 22;
tar2 = entry - 38;
tar3 = entry - 55;*/

bars = i;
i = 0;
}
}

Offset = 3;
Clr = IIf(sig == "BUY", colorLime, colorRed);
ssl = IIf(bars == BarCount-1, supres[BarCount-1], Ref(supres, -1));
sl = ssl[BarCount-1];

Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar4, BarCount, tar4,1), "", Clr, styleLine|styleDots, Null, Null, Offset);

Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset);

for (i=bars; i <BarCount;i++)
{
PlotText(""+sig+"@"+entry, BarCount+1,entry,Null,colorBlue);
PlotText("T1@"+tar1,BarCount+3,tar1,Null,Clr);PlotText("T2@"+tar2,BarCount+3,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount+3,tar3,Null,Clr);PlotText ("T4@"+tar4,BarCount+3,tar4,Null,Clr);
}



state=IIf(BarsSince(Buy)<BarsSince(Sell),1,0);
s=state>Ref(state,-1);
ss=state<Ref(state,-1);
sss=state==Ref(state,-1);
col=IIf(state == 1 ,51,IIf(state ==0,4,1));

//Plot(C,"",Col,64);
PlotShapes( shapeUpArrow * s ,colorWhite,0,L, Offset=s);
PlotShapes( shapeHollowCircle * s ,colorPink,0,L, Offset=s-12);


PlotShapes( shapeHollowCircle *ss ,colorPink,0,H, Offset=s);
PlotShapes( shapeDownArrow *ss ,colorWhite,0,H, Offset=s+12);


_SECTION_END();





if (messageboard == 0 )
{


if ( sig =="BUY")
{
GfxSelectSolidBrush( colorBrightGreen ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorRed ); // this is the box background color
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 5;
x2 = 290;

y = pxHeight;

GfxSelectPen( colorGreen, 1); // broader color
GfxRoundRect( x, y - 200, x2, y , 7, 7 ) ;

GfxSetTextColor(colorWhite);
GfxTextOut( ( " VaiSan's Trading System "),55,y-195);

GfxTextOut( (" "),27,y-190);
GfxSetTextColor(colorWhite);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 13, y-170) ; // The text format location
GfxSetTextColor(colorBlack);
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 13, y-150);
GfxSetTextColor(colorWhite);
GfxTextOut( ("Trailing SL : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 13, y-130);
GfxSetTextColor(colorYellow);
GfxTextOut( ("TGT:1 : " + tar1), 13, y -110);
GfxTextOut( ("TGT:2 : " + tar2), 13,y-90);
GfxTextOut( ("TGT:3 : " + tar3), 13,y-70);
GfxTextOut( ("TGT:4 : " + tar4), 13,y-50);
GfxSetTextColor(colorDarkGreen);
GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 65, y-29);;

}
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////

if ( sig =="BUY")
{
//GfxSelectSolidBrush( colorBrightGreen ); // this is the box background color
//_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,30,100,1);
GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite);
GfxSetTextColor( ParamColor("Color",colorGreen) );
Hor=Param("Horizontal Position",750,800,800,800);
Ver=Param("Vertical Position",27,27,27,27);
GfxTextOut(""+C,Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorGreen) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
//_SECTION_END();


}
else
{
//_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,30,100,1);
GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite);
GfxSetTextColor( ParamColor("Color",colorRed) );
Hor=Param("Horizontal Position",750,800,800,800);
Ver=Param("Vertical Position",27,27,27,27);
GfxTextOut(""+C,Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorRed) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
//_SECTION_END();
}


////////////////////////////////////////////////////////////////////////////////


/*Plot EMA*/
Plot( EMA( Close,13), "13 EMA", colorRed,styleLine);
Plot( EMA( Close,34), "34 EMA", colorBlue,styleLine);
Plot( EMA( Close,55), "55 EMA", colorBlack,styleLine);
Plot( EMA( Close,89), "89 EMA", colorYellow,styleLine);
 

rnls

New Member
#17
Re: Can anyone please find me this afl for amibroker.......if anyone has it plz post

pls ERRoR FIX me sir pls this error pls



{
PlotText(""+sig+"@"+entry, BarCount+1,entry,Null,colorBlue);
PlotText("T1@"+tar1,BarCount+3,tar1,Null,Clr);Plot Text("T2@"+tar2,BarCount+3,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount+3,tar3,Null,Clr);PlotText ("T4@"+tar4,BarCount+3,tar4,Null,Clr);
}
 
Last edited:

rnls

New Member
#18
Re: Can anyone please find me this afl for amibroker.......if anyone has it plz post

hello sir pls error fix pls help me
 
Last edited:

KelvinHand

Well-Known Member
#19
Re: Can anyone please find me this afl for amibroker.......if anyone has it plz post

Hellow Mr.KelvinHand, could you please share with us this system?if not no problem...thanks for all your hard works...:thumb:
Already shared in "TriggerLines" and code given by the forum member
 

rnls

New Member
#20
Re: Can anyone please find me this afl for amibroker.......if anyone has it plz post

pls ERRoR FIX me sir pls this error pls



{
PlotText(""+sig+"@"+entry, BarCount+1,entry,Null,colorBlue);
PlotText("T1@"+tar1,BarCount+3,tar1,Null,Clr);Plot Text("T2@"+tar2,BarCount+3,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount+3,tar3,Null,Clr);PlotText ("T4@"+tar4,BarCount+3,tar4,Null,Clr);
}