基本上 程式沒有錯呀,你覺得那裡應該有訊號而沒出現呢?
以下我把你的實體區改為 1 就有訊號出來了,應該是你本來的設定太嚴格了,剛好沒有符合條件的資料
vars:value1(0),value2(0),shortcount(0); if date<>date[1] then begin shortcount=0; end;
Value1= High - maxlist( Close, Open); Value2= absvalue( Close-Open ); Condition1= Close >= Open and Value1 > Value2*3 and absvalue(Open-Close)>1 and high=HighD(0) and time>0900 and time<1300 and shortcount=0 ;
if condition1 then begin value3=low; sellshort next bar at value3 stop; end; if marketposition=-1 then shortcount=1;
setexitonclose;
PS: 另外把停損及部位判定移到外層,它們才會生效