Here is the basic code for implementing a day trading system based on a setup in one of my older thread about one and and a half years back.
This is not a full implementation of the system but it is a starting point for developing the system. This code as it is presented here is very profitable generating 80-100 percent annually over the last 2 years. There were 30-40 trades a year. This is back tested on Nifty Future.
Back test it with a 20 point SL, if SL not hit then exit is on the bar after 3:15.
Back test it at your end, you can use it as it is ore modify it for better results. Data quality is important because it uses the open tick of the day forms the most important logic.
The original setup was discussed here.
http://www.traderji.com/advanced-tr...-day-trading-strategy-seems-well-working.html
This is not a full implementation of the system but it is a starting point for developing the system. This code as it is presented here is very profitable generating 80-100 percent annually over the last 2 years. There were 30-40 trades a year. This is back tested on Nifty Future.
Code:
SetPositionSize(50,4);
newday=Day() != Ref(Day(), -1);
DayH = HighestSince(newday,H);
DayL = LowestSince(newday,L);
lngB1 = newday AND C > ValueWhen(newday, Ref(DayH,-1)) AND C > O AND (H-L) > ATR(20) AND (H-C)< (C-O) AND (O-L) < (C-O);
lngB2 = BarsSince(newday) == 1 AND (H-L) < Ref(H-L,-1)*0.7 AND C <= Ref(H,-1) + ATR(20);
lngSetup = Ref(lngB1,-1) AND lngB2;
Buy = lngSetup;
Sell = TimeNum()>151500 ;
shB1 = newday AND C < ValueWhen(newday, Ref(DayL,-1)) AND C < O AND (H-L) > ATR(20) AND (C-L) < (O-C) AND (H-O) < (O-C);
shB2 = BarsSince(newday) == 1 AND (H-L) < Ref(H-L,-1)*0.7 AND C >= Ref(L,-1)- ATR(20);
shSetup = Ref(shB1,-1) AND shB2;
Short = shSetup;
Cover = TimeNum()>151500 ;
Back test it at your end, you can use it as it is ore modify it for better results. Data quality is important because it uses the open tick of the day forms the most important logic.
The original setup was discussed here.
http://www.traderji.com/advanced-tr...-day-trading-strategy-seems-well-working.html