Skip to main content

Fishnet Improved for Amibroker (AFL)

k3325 over 12 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 4)
  • Tags:
    amibroker

It is a fishnet of multiple moving averages .
It gives clear indication of the trend (even in 5 minutes chart).
When yellow bunch of moving average cuts the red bunch of moving
averages from downward to upward and both moving averages are
sloping upside , then it is a buy signal and vice-versa.

Indicator / Formula

Copy & Paste Friendly
/*Plot EMA*/
Plot( EMA( Close,3), "3 EMA", colorYellow,styleLine);
Plot( EMA( Close,5), "5 EMA", colorYellow,styleLine);
Plot( EMA( Close,7), "7 EMA", colorYellow,styleLine);
Plot( EMA( Close,9), "9 EMA", colorYellow,styleLine);
Plot( EMA( Close,11), "11 EMA", colorYellow,styleLine);
Plot( EMA( Close,13), "13 EMA", colorYellow,styleLine);
Plot( EMA( Close,15), "15 EMA", colorYellow,styleLine);
Plot( EMA( Close,17), "17 EMA", colorYellow,styleLine);


Plot( EMA( Close,46), "46 EMA", colorRed,styleLine);
Plot( EMA( Close,48), "48 EMA", colorRed,styleLine);
Plot( EMA( Close,50), "50 EMA", colorRed,styleLine);
Plot( EMA( Close,52), "52 EMA", colorRed,styleLine);
Plot( EMA( Close,54), "54 EMA", colorRed,styleLine);
Plot( EMA( Close,56), "56 EMA", colorRed,styleLine);
Plot( EMA( Close,58), "58 EMA", colorRed,styleLine);
Plot( EMA( Close,60), "60 EMA", colorRed,styleLine);

10 comments

over 12 years ago

hi k3325 good work, thanks
@ kv_maligi
here is buy sell arrows for this afl,

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot(C,"\nPrice",IIf(C>O,ParamColor("Wick UP Color", colorBlue),IIf(C<=O,ParamColor("Wick Down Color", colorViolet),colorLightGrey)),64,0,0,0,0);
_SECTION_END();
_SECTION_BEGIN("Fishenet");

EMA3= EMA(C,3);			EMA46= EMA(C,46);
EMA5= EMA(C,5);			EMA48= EMA(C,48);
EMA7= EMA(C,7);			EMA50= EMA(C,50);
EMA9= EMA(C,9);			EMA52= EMA(C,52);
EMA11= EMA(C,11);			EMA54= EMA(C,54);	
EMA13= EMA(C,13);			EMA56= EMA(C,56);
EMA15= EMA(C,15);			EMA58= EMA(C,58);
EMA17= EMA(C,17);			EMA60= EMA(C,60);

Buy= Cross(EMA17, EMA60) ;
Sell= Cross(EMA60, EMA17) ;

Buy= ExRem(Buy, Sell) ;
Sell= ExRem(Sell, Buy) ;

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorBlue, 0, L, Offset=-20);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorBlue, 0,L, Offset=-30);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-25);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorBlue, 0, H, Offset=20);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorBlue, 0,H, Offset=30);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-25);

/*Plot EMA*/
Plot( EMA( Close,3), "3 EMA", colorYellow,styleLine);
Plot( EMA( Close,5), "5 EMA", colorYellow,styleLine);
Plot( EMA( Close,7), "7 EMA", colorYellow,styleLine);
Plot( EMA( Close,9), "9 EMA", colorYellow,styleLine);
Plot( EMA( Close,11), "11 EMA", colorYellow,styleLine);
Plot( EMA( Close,13), "13 EMA", colorYellow,styleLine);
Plot( EMA( Close,15), "15 EMA", colorYellow,styleLine);
Plot( EMA( Close,17), "17 EMA", colorYellow,styleLine);
 
Plot( EMA( Close,46), "46 EMA", colorRed,styleLine);
Plot( EMA( Close,48), "48 EMA", colorRed,styleLine);
Plot( EMA( Close,50), "50 EMA", colorRed,styleLine);
Plot( EMA( Close,52), "52 EMA", colorRed,styleLine);
Plot( EMA( Close,54), "54 EMA", colorRed,styleLine);
Plot( EMA( Close,56), "56 EMA", colorRed,styleLine);
Plot( EMA( Close,58), "58 EMA", colorRed,styleLine);
Plot( EMA( Close,60), "60 EMA", colorRed,styleLine);
_SECTION_END();
over 12 years ago

Hello murali ji,

kindly check ur above Code again. Lots of error in it(Using 5.6 amibroker)

thanx you

over 12 years ago

@anandnst

Ya the bove sems to be incorrect. just paste below give to the afl.

Buy= Cross(EMA(C,17), EMA(C,60)) ;
Sell= Cross(EMA(C,60), EMA(C,17)) ;

Buy= ExRem(Buy, Sell) ;
Sell= ExRem(Sell, Buy) ;

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorBlue, 0, L, Offset=-20);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorBlue, 0,L, Offset=-30);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-25);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorBlue, 0, H, Offset=20);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorBlue, 0,H, Offset=30);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-25);
over 12 years ago

hi anandji and jahnyji
There are no errors here, I’ve checked it first then after post here, I am also using the Ami 5.60, it works very well. Once again, pls take a look at what’s coming through the lines of Errors write here.

thank u

over 12 years ago
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot(C,"\nPrice",IIf(C>O,ParamColor("Wick UP Color", colorBlue),IIf(C<=O,ParamColor("Wick Down Color", colorViolet),colorLightGrey)),64,0,0,0,0);
_SECTION_END();
_SECTION_BEGIN("Fishenet");

EMA17= EMA(C,17);			EMA60= EMA(C,60);

Buy= Cross(EMA17, EMA60) ;
Sell= Cross(EMA60, EMA17) ;

Buy= ExRem(Buy, Sell) ;
Sell= ExRem(Sell, Buy) ;

PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-25);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-25);

/*Plot EMA*/

Plot( EMA( Close,17), "17 EMA", colorYellow,styleLine);
Plot( EMA( Close,60), "60 EMA", colorRed,styleLine);
over 12 years ago

@ Muralikrishna

ur given code is working well in A.B 5.6

Thank u very much.

9. k3325
over 12 years ago

Here is the formula with buy and sell signals —

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot(C,"\nPrice",IIf(C>O,ParamColor("Wick UP Color", colorBlue),IIf(C<=O,ParamColor("Wick Down Color", colorViolet),colorLightGrey)),64,0,0,0,0);
_SECTION_END();
_SECTION_BEGIN("Fishenet");

EMA3= EMA(C,3);			EMA46= EMA(C,46);
EMA5= EMA(C,5);			EMA48= EMA(C,48);
EMA7= EMA(C,7);			EMA50= EMA(C,50);
EMA9= EMA(C,9);			EMA52= EMA(C,52);
EMA11= EMA(C,11);			EMA54= EMA(C,54);	
EMA13= EMA(C,13);			EMA56= EMA(C,56);
EMA15= EMA(C,15);			EMA58= EMA(C,58);
EMA17= EMA(C,17);			EMA60= EMA(C,60);

Buy= Cross(EMA17, EMA60) ;
Sell= Cross(EMA60, EMA17) ;

Buy= ExRem(Buy, Sell) ;
Sell= ExRem(Sell, Buy) ;

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorBlue, 0, L, Offset=-20);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorBlue, 0,L, Offset=-30);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-25);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorBlue, 0, H, Offset=20);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorBlue, 0,H, Offset=30);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-25);

/*Plot EMA*/
Plot( EMA( Close,3), "3 EMA", colorYellow,styleLine);
Plot( EMA( Close,5), "5 EMA", colorYellow,styleLine);
Plot( EMA( Close,7), "7 EMA", colorYellow,styleLine);
Plot( EMA( Close,9), "9 EMA", colorYellow,styleLine);
Plot( EMA( Close,11), "11 EMA", colorYellow,styleLine);
Plot( EMA( Close,13), "13 EMA", colorYellow,styleLine);
Plot( EMA( Close,15), "15 EMA", colorYellow,styleLine);
Plot( EMA( Close,17), "17 EMA", colorYellow,styleLine);
 
Plot( EMA( Close,46), "46 EMA", colorRed,styleLine);
Plot( EMA( Close,48), "48 EMA", colorRed,styleLine);
Plot( EMA( Close,50), "50 EMA", colorRed,styleLine);
Plot( EMA( Close,52), "52 EMA", colorRed,styleLine);
Plot( EMA( Close,54), "54 EMA", colorRed,styleLine);
Plot( EMA( Close,56), "56 EMA", colorRed,styleLine);
Plot( EMA( Close,58), "58 EMA", colorRed,styleLine);
Plot( EMA( Close,60), "60 EMA", colorRed,styleLine);
_SECTION_END();




_SECTION_BEGIN("Swing");
no=Param( "Swing", 20, 1, 55 );
tsl_col=ParamColor( "Color", colorYellow );
 
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(Buy,Low,High));
_SECTION_END();
about 10 years ago

Murali Sir will you add necessary command for automatic buy sell indicators in this formula.I would like to put into use this afl in my robo system

Leave Comment

Please login here to leave a comment.