I am very impressed with this system. I always believed that if u plan to do big volumes, u need a mechanical method as the pressure of big lots gets to everyone.
It is a momentum based method needs a method to filter pure sideways days. Two losses in a row is a good filter, but why pay the market to know when not to trade. A filter will remove a few positive trades but will get rid of many bad ones. If we can get the strike rate to above 60..then the RR ratio of 1:2 will take care of the over all profit.
I tried coding the basic system and am searching for a good filter...! I am a bit surprised that there are fewer post in the past few days. I wonder if the all the discussion / improvement have shifted to the chat room.
It is a momentum based method needs a method to filter pure sideways days. Two losses in a row is a good filter, but why pay the market to know when not to trade. A filter will remove a few positive trades but will get rid of many bad ones. If we can get the strike rate to above 60..then the RR ratio of 1:2 will take care of the over all profit.
I tried coding the basic system and am searching for a good filter...! I am a bit surprised that there are fewer post in the past few days. I wonder if the all the discussion / improvement have shifted to the chat room.
Code:
/////SH Intraday Statregy - ELH5/////////////////
_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 ) ) ));
GraphXSpace = 10;
eh = EMA(H,5);
el = EMA(L,5);
Plot(eh,"",colorYellow);
Plot(el,"",colorYellow);
Buytrigger = C > eh+1 AND Ref(C,-1) > Ref(eh, -1)+1;
selltrigger = C < el-1 AND Ref(C,-1) < Ref(el, -1)-1;
Buytrigger=ExRem(Buytrigger,Selltrigger);
selltrigger=ExRem(selltrigger,buytrigger);
Col = IIf(BarsSince(Buytrigger) > BarsSince(selltrigger),colorRed,colorGreen);
Plot( C, "Close", Col, styleBar );
Buy = Cross(eL,L) AND Col==colorGreen;
PlotShapes(Buy*shapeUpArrow,colorBrightGreen,0,L);
Sell = Cross(H,eh) AND Col==colorRed;
PlotShapes(Sell*shapeDownArrow,colorRed,0,H);
BuyPrice = ValueWhen(Buy,el,1);
SellPrice = ValueWhen(Sell,eh,1);
sl_buy = BuyPrice-20;
tgt_buy = BuyPrice+20;
sl_sell = SellPrice+20;
tgt_sell = SellPrice-20;
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );
Plot(IIf(Long AND NOT Buy AND Ref(L,-1) > sl_buy,sl_buy,Null),"",colorWhite,styleThick);
Plot(IIf(Long AND NOT Buy AND Ref(L,-1) > sl_buy ,tgt_buy,Null),"",colorBrightGreen,styleThick);
Plot(IIf(shrt AND NOT Sell AND Ref(H,-1) < sl_sell,sl_sell,Null),"",colorWhite,styleThick);
Plot(IIf(shrt AND NOT Sell AND Ref(H,-1) < sl_sell,tgt_sell,Null),"",colorRed,styleThick);
Title = EncodeColor(colorWhite)+ "SH's EH5 " + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2)+ EncodeColor(colorWhite) +
" - " + Date() +
"\n"+
WriteIf(Ref(H,-1) > Ref(H,-2),EncodeColor(colorBrightGreen),EncodeColor(colorRed))+"ex "+Ref(H,-1)+WriteIf(H > Ref(H,-1),EncodeColor(colorBrightGreen),EncodeColor(colorRed))+" Hi "+H+
EncodeColor(colorYellow)+
"\n"+
EncodeColor(colorWhite)+"Op "+O+WriteIf(C > O, EncodeColor(colorBrightGreen),EncodeColor(colorRed))+" Cl : " +C+
EncodeColor(colorYellow)+
"\n"+
WriteIf(Ref(L,-1) < Ref(L,-2),EncodeColor(colorRed),EncodeColor(colorBrightGreen))+"ex "+Ref(L,-1)+WriteIf(L < Ref(L,-1),EncodeColor(colorRed),EncodeColor(colorBrightGreen))+" Lo "+L+
"\n"+"\n"+
EncodeColor(colorYellow)+"TRADE : "+
WriteIf(Col==colorGreen,EncodeColor (colorBrightGreen)+"Long triggered.","")+
WriteIf(Col==colorGreen AND BarsSince(Buytrigger)==0,"\nExit Short @ "+ C,"")+
WriteIf(Col==colorRed,EncodeColor (colorRed)+"short triggered.","")+
WriteIf(Col==colorRed AND BarsSince(Selltrigger)==0,"\nExit long @ "+C,"")+
"\n"+
WriteIf(Buy,EncodeColor(colorBrightGreen)+"Buy triggered @ "+BuyPrice+ "\n Sl @ "+sl_buy+ " tgt @ "+tgt_buy,"")+
WriteIf(Sell,EncodeColor(colorRed)+"sell triggered @ "+SellPrice+ "\n Sl @ "+sl_sell+ " tgt @ "+tgt_sell,"")+
WriteIf(Long AND NOT Buy AND Col==colorGreen,EncodeColor(colorBrightGreen)+"Buy triggered @ "+BuyPrice+ "\n Sl @ "+sl_buy+ " tgt @ "+tgt_buy,"")+
WriteIf(shrt AND NOT Sell AND Col==colorRed,EncodeColor(colorRed)+"sell triggered @ "+SellPrice+ "\n Sl @ "+sl_sell+ " tgt @ "+tgt_sell,"")+
"\n"+"\n"+
EncodeColor(colorBrightGreen)+"EMAH : "+ eh+
"\n"+
EncodeColor(colorRed)+
"EMAL : "+ el+
"\n"+
"\n"
;
I am using metastock can u provide the same Indicator Bulider language for the above intraday strategy.
thanks in advance
Bhavesh Gelani