附上程式碼
條件符合就掛單 但掛單後又會馬上刪單 為什麼會馬上刪單 (刪單後又掛單 又刪單 又掛單 又刪單 ..... ) 是程式碼有問題還是下單機設定有問題??
(使用30分K 條件符合後 下一根K棒開盤進場掛LIMIT單) if time_S >= 084501 and time <= 1244 AND marketposition = 0 and EntriesToday(date) < 5 then begin
if value1 > 0 then begin
If (condition1 And condition2 ) OR (condition3 and condition4)then sellshort next bar at open + E1 limit
Else if (value14 = G and condition6 And condition7) then sellshort next bar at open + E1 limit
Else buy next bar at open - E1 limit;
end ;
if value1 < 0 then begin
If (condition13 And condition14) OR (condition15 and condition16)then sellshort next bar at open + E1 limit
Else if (value15 = R and condition9 And condition12) then BUY next bar at open - E1 limit
Else sellshort next bar at open + E1 limit;
end;
end;
//---------------------------------------------------------------------------------------------------------------------------------------//
value10=Range[1]*tpp;//tp
value11=Range[1]*sll;//sl
Setprofittarget((value10)*bigpointvalue);
Setstoploss((value11)*bigpointvalue);
|