請問如何當天出場後要再突破當天高低點再進場呢
請問如何當天出場後要再突破當天高低點再進場呢?以下引用阿政大大寫的{Action switch...start}var:BB(99999),SS(0);var:MP(0),lastWay(0);var:toDO(true);MP= marketposition;if time_s>=091000 and time_s<=125000 and condition6 and EntriesToday(D)<1 and c>TR1[0]+10 then begin BB = highD(0); SS = lowD(0);end;if time_s>=091000 and time_s<=125000 and condition7 and EntriesToday(D)<1 and c<TR2[0]-10 then begin BB = highD(0); SS = lowD(0);end;if MP[1]<>0 and MP=0 then begin toDo = false; if MP[1]>0 then lastWay=1; if MP[1]<0 then lastWay=-1;end;if C<BB and lastWay>0 then toDO= true;if C>SS and lastWay<0 then toDO= true;{Action switch...end}請問以下的程式如何修改才能達到當天出場後要再突破當天高低點再進場呢?if (minlist(TR2[0],varL)-TR21]])>(opend(0)*0.009) and (c<varL) then begin sellshort("S") next barat LL-1 stop; end elseif (minlist(TR2[0],varL)-TR21]])<(opend(0)*0.009) and (c<varL) and (c<TR2-15) then begin sellshort("S1") next barat (TR2-15)[1]-1 stop; end;最好多看前後幾根K棒
if date >= 1040429 and date <= 1040502 then
messagelog(date,time,marketposition,exitstoday(date)) ;
把EntriesToday(D)<1 拿掉,試試看.
koopa 發表於 16-12-13 10:13
把EntriesToday(D)
大大你好~~主要是以下這段
if (minlist(TR2,varL)-TR2])>(opend(0)*0.009) and (c<varL) then begin sellshort("S") next barat LL-1 stop; end elseif (minlist(TR2,varL)-TR2])<(opend(0)*0.009) and (c<varL) and (c<TR2-15) then begin sellshort("S1") next barat (TR2-15)-1 stop;end;
我想要的是如果當天沒有出場的情況下,他會按照上面的方式進場但如果當天有出場的情況下,若要買進就要突破當天的高點才會買進,如果要放空就要跌破當天的低點才會進場 不知道為何改成ExitsToday(D)=0 這樣後,當天明明有buytocover出場過1次,S1這個訊號還是會觸發....請問有人知道哪裡有問題嗎?
if ExitsToday(D)=0 and (minlist(TR2,varL)-TR2])>(opend(0)*0.009) and (c<varL) then begin
sellshort("S") next bar at LL-1 stop;
end else
if ExitsToday(D)>0 and toDo=true and (minlist(TR2,varL)-TR2])>(opend(0)*0.009) and (c<varL) then begin
sellshort("SS") next bar at SS-1 stop;
end;
if ExitsToday(D)=0 and (minlist(TR2,varL)-TR2])<(opend(0)*0.009) and (c<varL) and (c<TR2-15) then begin
sellshort("S1") next bar at (TR2-15)-1 stop;
end else
if ExitsToday(D)>0 and toDo=true and (minlist(TR2,varL)-TR2])<(opend(0)*0.009) and (c<varL) and (c<TR2-15) then begin
sellshort("SS1") next bar at SS-1 stop;
end;
用print(date,time,market position,exitstoday(date));檢查S1會進場當根是否符合條件限制 easytrader788 發表於 16-12-13 14:34
用print(date,time,market position,exitstoday(date));檢查S1會進場當根是否符合條件限制
用print(date,time,market,position,exitstoday(date));檢查S1會進場當根是否符合條件限制
大大請問一下,我是要檢查2004/04/30這天的11:25分這根S1怎麼會進場
是否是用以下這樣呢? 這樣會跑出錯誤{:4_93:}
Messagelog(1040430,1125,market,position,exitstoday(date));
Marketposition中間不需逗點 我用手機打字,沒注意 easytrader788 發表於 16-12-14 19:44
最好多看前後幾根K棒
if date >= 1040429 and date
感謝大大的幫助~~問題已經解決了{:4_199:}
頁:
[1]