f4f
翠鸟科
Ciao a tutti,
tempo fa ero riuscito a trovare in rete un famoso TS chiamato R-BREAKER...pare che sia un top ten trading system ..ma purtroppo per me è in linguaggio EL x tradestation.
Io mastico solo metastock e un pò di VT.....e quindi pongo a tutti una domanda:
non è che qualche volenteroso voglia tradurlo in visual trader ?????
Così vediamo se è bbono oppure ....è una ciofeca !!!!
Grazie
R-BREAKER TRADING SYSTEM (EASY LANGUAGE)
input: revers2(0.50) , exit2(0.40),begBARS(3), endbars(5), f1(.45), f2(0.1), f3(.25), TrueHL(true),
rangemin(0.01), xdiv(3),
typeStop(2), exit1(280),
typeRev(2), revers1(280),
hold(11), holdper(11) ;
vars: notbef(0), NotAft(0),
ATR3(0), Mystop(0), reverse(0),
DATEGO(TRUE),
ssetup(0),bsetup(0),senter(0),benter(0),bbreak(0),sbreak(0),
ltoday(0), htoday(9999), startnow(0), div(0),
rfilter(false),
S1(0),S2(0),S3(0),B1(99999),B2(99999),B3(99999);
VARS: Sellstop(0), buystop(0) ,
DayCl2(0), trueLo(0), TrueHi(0),
DayOp(0), DayLo(0), DayHi(0), DayCl(0),
OpToday(0), OpenLow(0), OpenHigh(0) ,
DayTRange(0), DayRange(0) ;
if D>D[1] then
begin
htoday=h;
ltoday=l;
end;
if h > htoday then htoday=h;
if l < ltoday then ltoday=l;
if t >= Sess1FirstBarTime and date > date[1] and C > 0 and L>0 and H > 0 then
begin
OpToday = open;
OpenLow = low;
OpenHigh = high ;
end;
if d > d[1] and t[1] = sess1endtime then
begin
DayCl = C[1]; DayOp = OpToday[1];
Dayhi = htoday[1]; DayLo = Ltoday[1];
end;
TrueLo = DayLo ;
TrueHi = Dayhi ;
dayTrange = TrueHi - TrueLo ; dayRange = DayHi - DayLo ;
DayCl2= CloseD(2) ;
If TrueHL then
begin
if DayCl2 < Daylo then
TrueLo = DayCL2 ;
if DayCl2 > Dayhi then
TrueHi = DayCl2 ;
end;
If typeStop = 1 then MyStop = exit1 ;
If typeStop = 2 then MyStop = exit2 * DayTrange ;
If typeRev = 1 then reverse = revers1 ;
If typeRev = 2 then Reverse = revers2 * DayTrange ;
if currentbar=1 then startnow=0;
div=maxlist(xdiv,1);
notbef = Sess1FirstBarTime + begBARS* BarInterval ;
notaft= Sess1EndTime - endbars * BarInterval ;
if D>D[1] then begin
startnow=startnow+1;
ssetup=htoday[1]+f1*(c[1]-ltoday[1]);
senter=((1+f2)/2)*(htoday[1]+c[1])-(f2)*ltoday[1];
benter=((1+f2)/2)*(ltoday[1]+c[1])-(f2)*htoday[1];
bsetup=ltoday[1]-f1*(htoday[1]-c[1]);
bbreak=ssetup+f3*(ssetup-bsetup) {(1.3625*htoday[1]+.45*c[1])-.8125*ltoday[1]};
sbreak=bsetup-f3*(ssetup-bsetup) {(1.3625*ltoday[1]+.45*c[1])-.8125*htoday[1]};
rfilter=htoday[1]-ltoday[1]>=rangemin * Close ; end;
S1=0;S2=0;S3=0;B1=99999;B2=99999;B3=99999;
PRINT (D,T , benter, bsetup, bbreak, S1,S2, S3, B1, B2, B3) ;
if t>=notbef and t<notaft and
startnow>=2 and
rfilter and
date>entrydate(1) then begin
if marketposition = - 1 then
B1=entryprice+reverse; {BUY("RbUP LE") entryprice+reverse stop;}
if ltoday<=bsetup and marketposition<1 then
B2=benter-(bsetup-ltoday)/div; {BUY("Rlev LE") benter-(bsetup-ltoday)/div stop;}
if marketposition=1 then
S1=entryprice-reverse; {SELL("RbDN SE") entryprice-reverse stop;}
if htoday>=ssetup and marketposition>-1 then
S2=senter+(htoday-ssetup)/div; {SELL("Rlev SE") senter+(htoday-ssetup)/div stop;}
if marketposition=0 then
B3=bbreak; {BUY("Break LE") bbreak stop;}
if marketposition =0 then
S3=sbreak; {SELL("Break SE") sbreak stop;}
end;
IF MAXLIST (S1,S2,S3) > 0 then begin
IF S1>=S2 AND S1>=S3 then begin
SELL ("RbDN SE") S1 stop;
end else begin
IF S2>=S3 then begin
SELL ("Rlev SE") S2 stop;
end else begin
SELL ("Break SE") S3 stop;
END;
END;
END;
IF MINLIST (B1,B2,B3) < 99999 then begin
IF B1 <= B2 AND B1<=B3 then begin
BUY ("RbUP LE") B1 stop;
end else begin
IF B2<=B3 THEN BEGIN
BUY ("Rlev LE") B2 stop;
end else begin
BUY ("Break LE") B3 stop;
END;
END;
END;
if t>=notaft and t<>sess1endtime then begin
if marketposition=-1 then
EXITSHORT("exit SX") entryprice+ MyStop stop;
if marketposition=1 then
EXITLONG("Exit LX") entryprice- MyStop stop;
EXITSHORT("Late SX") high + 0.05 stop;
EXITLONG("Late LX") low - 0.05 stop;
end;
ma cosa è?? un breakout ??