Skip to main content

Exellent Trend Catching Indicator for Amibroker (AFL)

Muralikrishna over 13 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 7)
  • Tags:
    macd, amibroker, rsi, advanced

Hi friends,
This is early trend catching trading system. This formula creation idea credit goes to www.wisestocktrader.com/indicators/243-cowabunga System. iam adding some little changings.

I hope this is sutable for all time frames and all tipes of traders. enjoy…

Pls send Ur Comments and Suggestions

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Price");
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() ); 
_SECTION_END();

_SECTION_BEGIN("Krishna System");
R = RSI(3);
SK = StochK(8, 3);
SD = StochD(8, 3, 3);
MH = MACD(8, 21) - Signal(8, 21, 5);

//Conditions for Buying

Cond1 = ValueWhen(C,O<C);
Cond2 = R > 50;
Cond3 = SD < 80 AND SD > Ref(SD, -1);
Cond4 = MH > 0 OR (MH < 0 AND MH > Ref(MH, -1));

//Conditions for Selling

Cond5 = ValueWhen(C,O>C);
Cond6 = R < 50;
Cond7 = SD > 20 AND SD < Ref(SD, -1);
Cond8 = MH < 0 OR (MH > 0 AND MH < Ref(MH, -1));

Buy =  Cond1 AND Cond2 AND Cond3 AND Cond4 ;
Sell =  Cond5 AND Cond6 AND Cond7 AND Cond8 ;

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

PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,Low,-15);  
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorYellow, 0,High,-15);  


SetPositionSize(300,spsShares);
ApplyStop(0,1,10,1);
//-----------end--------------
Long=Flip(Buy,Sell); 
Shrt=Flip(Sell,Buy); 

BuyPrice=ValueWhen(Buy,C);
SellPrice=ValueWhen(Sell,C);


Edc=(
WriteIf (Buy AND Ref(shrt,-1), " BUY at "+C+"  ","")+ 
WriteIf (Sell AND Ref(Long,-1), " SEll at "+C+"  ","")+
WriteIf(Sell , "Last Trade Profit Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy  , "Last trade Profit Rs."+(SellPrice-C)+"",""));
_SECTION_END();

_SECTION_BEGIN("Background text");
C11=ParamColor("up panel",colorDarkOliveGreen );
C12=ParamColor("dn panel",colorDarkGrey );
C13=Param("fonts",20,10,30,1 );
C14=Param("left-right",2.1,1.0,5.0,0.1 );
C15=Param("up-down",12,1,20,1 );
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");
GfxSetBkMode( 0 ); 
GfxSetOverlayMode(1);
GfxGradientRect(0,0,pxwidth, pxheight, C11, C12 ); 
GfxSelectFont("Tahoma", Status("pxheight")/C13 );
GfxSetTextAlign( 6 );
GfxTextOut( "LTP "+WriteVal(C,1.2), Status("pxwidth")/C14, Status("pxheight")/C15);
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxTextOut( " Murali Krishna", Status("pxwidth")/C14, Status("pxheight")/C15*4 );
GfxSelectFont("MS Sans Serif", 10, 500, False, False, 0);
GfxSetTextColor(colorYellow);
GfxTextOut(""+edc+"", Status("pxwidth")/1.15, Status("pxheight")/C15*0.3 );

30 comments

over 13 years ago

hi kalyan
above formula lines from 8 to 11, cut and paste below code, no more signals are coming ok

R = RSI(9);
SK = StochK(10, 3);
SD = StochD(10, 3, 3);
MH = MACD(12, 26) - Signal(12, 26, 9);
over 13 years ago

need to develope some more..

Murali. nice work. but try to add some more accuracy…

excellent work.. after adding ur new modificatrion im missing good signals..

try to find one more good afl and combine both AFLS.

over 13 years ago

Add one more filter to remove unnecessary signals.
ur formula is excellent . but it giving more signals.

Thanks once again

over 13 years ago

thank u madhav,
iam seriously serching that filter, and adding Targets and Stoploss levels,
strong trend signals, consolidation signals, and more very soon,

and try this below code it is very fast detect the trend,
just change in my above original formula lines just 16 and 23, ok

line number 16

Cond2 = R > 20;

and line number 23

Cond6 = R < 80;

over 13 years ago

Hello Murali,

In the above code, parameter for RSI n MACD missing in ur 2nd and 5th line.

Thnx you

over 13 years ago

oh… yes sir, thank u, now correct it below

just change in my above original formula lines just 16 and 23, ok

line number 16

Cond2 = R > 20;

and line number 23

Cond6 = R < 80;

over 13 years ago

Hi Murali..

I want suggest 2 other afls.. u can use that 2 afls to filter unnecessary signals.

but here how can i suggest u.

over 13 years ago

Im ready to mail u.. or i will search for links.. and i will post here that links.

i hope Moderator dont have any problem if i post any link of other sites.. where i got that afl.

over 13 years ago

hi madhav my mail id krishna_vaastu@yahoo.com

All our friends waiting for that afls with good zeal, friends pls try this afl make perfect to suggest idea’s
We are all will be make maximum good afl as soon as posible,

Thanks
krishna_vaastu@yahoo.com

over 13 years ago

Ok guys im mailing to all our friends..

Plz see these afls and try to make good afl.

I dont know much about coding language.

Murali work with johney bhai. i know him very well. He is hard worker and talented person. We have relation from 2 years. He is technically also good.

over 13 years ago

Hi Madav bhai,

Thank You for your kind words. Words like this from u guys certainly give reasons to solve the problems of freinds. Will try my best

johnny

over 13 years ago

hi sudha, madhav suggested 3 afls
there are
1. Graphic Modify Bull & Bear Volume For Amibroker V.5.0 for Amibroker afl
2. Sini Macd
3. Bolinger band overlay

these are all have in this website, so serch and try…

over 13 years ago

hi friends, i made little modification in this system,
pls add this changes above my original code. it gives no more signals, it gives 40% less signals compare with my first code, so try this and send ur coments.

cut above code lines are 16,17,18, 23,24,25

line no. 16,17,18 changings are:

Cond2 = R > 20;
Cond3 = SD > 20 ;
Cond4 = MH > 0 ;

line No 23,24,25 changings are:

Cond6 = R < 80;
Cond7 = SD < 80;
Cond8 = MH < 0 ;

over 13 years ago

Hi Friends,

please use these 2 lines at 27 & 28 for more refined chart:

(delete only those earlier lines and add these)

Buy =  Cond1 AND Cond2 AND Cond3 AND Cond4 AND C > MA(H,5);
Sell =  Cond5 AND Cond6 AND Cond7 AND Cond8 AND C < MA(L,5);

You may use 5,10,12,20,24…

Contact me for further guidance

Best of Luck

srichakracharts@gmail.com

over 13 years ago

hi Jeevanlal, thank u very much ur suggestions,

very usefull that,

iam sharing with u my new afl codes, try these are also send ur suggestions, chek ur mail

thnk u

krishna_vaastu@yahoo.com

almost 13 years ago

Dear Krishna,
Thanks for ur afl. its really good. i need the entry and exit with the smaller profit. i need the afl with the following requirement. copper – .70paisa, zinc – .15 paisa , menthaoil – 2 , naturalgas – .60paisa. kindly advice me and send the afl to sriram251985@gmail.com

over 12 years ago

Good AFL for swing traders, options traders & small profit traders…
Thank you very much for posting this AFL.

28. raj32
over 7 years ago
// Downloaded From www.WiseStockTrader.com
_SECTION_BEGIN("Price");
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() ); 
_SECTION_END();

_SECTION_BEGIN("Krishna System");
R = RSI(3);
SK = StochK(5, 3);
SD = StochD(5, 3, 3);
MH = MACD(10, 20) - Signal(10, 20, 5);

//Conditions for Buying

Cond1 = ValueWhen(C,O<C);
Cond2 = R > 70;
Cond3 = SD > 70 ;
Cond4 = MH > 0 ;
//Conditions for Selling

Cond5 = ValueWhen(C,O>C);
Cond6 = R < 70;
Cond7 = SD < 70;
Cond8 = MH < 0 ;
Buy =  Cond1 AND Cond2 AND Cond3 AND Cond4 AND C > MA(H,10);
Sell =  Cond5 AND Cond6 AND Cond7 AND Cond8 AND C < MA(L,10);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,Low,-15);  
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorYellow, 0,High,-15);  


SetPositionSize(300,spsShares);
ApplyStop(0,1,10,1);
//-----------end--------------
Long=Flip(Buy,Sell); 
Shrt=Flip(Sell,Buy); 

BuyPrice=ValueWhen(Buy,C);
SellPrice=ValueWhen(Sell,C);


Edc=(
WriteIf (Buy AND Ref(shrt,-1), " BUY at "+C+"  ","")+ 
WriteIf (Sell AND Ref(Long,-1), " SEll at "+C+"  ","")+
WriteIf(Sell , "Last Trade Profit Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy  , "Last trade Profit Rs."+(SellPrice-C)+"",""));
_SECTION_END();

_SECTION_BEGIN("Background text");
C11=ParamColor("up panel",colorDarkOliveGreen );
C12=ParamColor("dn panel",colorDarkGrey );
C13=Param("fonts",20,10,30,1 );
C14=Param("left-right",2.1,1.0,5.0,0.1 );
C15=Param("up-down",12,1,20,1 );
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");
GfxSetBkMode( 0 ); 
GfxSetOverlayMode(1);
GfxGradientRect(0,0,pxwidth, pxheight, C11, C12 ); 
GfxSelectFont("Tahoma", Status("pxheight")/C13 );
GfxSetTextAlign( 6 );
GfxTextOut( "LTP "+WriteVal(C,1.2), Status("pxwidth")/C14, Status("pxheight")/C15);
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxTextOut( " Murali Krishna", Status("pxwidth")/C14, Status("pxheight")/C15*4 );
GfxSelectFont("MS Sans Serif", 10, 500, False, False, 0);
GfxSetTextColor(colorYellow);
GfxTextOut(""+edc+"", Status("pxwidth")/1.15, Status("pxheight")/C15*0.3 );
30. amitgd777
almost 6 years ago

Hello dear friends…
please use these 2 lines at 27 & 28 for early movement signal:

(delete only those earlier lines and add these)

Buy = Cond1 AND Cond1 AND Cond2 AND Cond3 AND C > MA;
Sell = Cond4 AND Cond4 AND Cond5 AND Cond6 AND C < MA;

hope it will be helpfull for all of us… clear me if any problem

thanks, :-)

**use this formula with supply and demand zone formula… for correct/safe signal

Leave Comment

Please login here to leave a comment.