COCO研究院

 找回密碼
 註冊
搜索
查看: 2034|回復: 0

[教學] 掛單之後又刪單 <求助>

[複製鏈接]
發表於 18-10-17 10:44 | 顯示全部樓層 |閱讀模式
附上程式碼

條件符合就掛單
但掛單後又會馬上刪單
為什麼會馬上刪單 (刪單後又掛單 又刪單 又掛單 又刪單 ..... )
是程式碼有問題還是下單機設定有問題??

(使用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);

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-4-20 10:07

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook