走完k提前下單需要在代碼里怎么寫才能實現 [金字塔]
-
咨詢內容:
請教:這個功能,需要在代碼里怎么寫才能實現,
我的代碼是這樣的,提前3秒下單,成功了,然后K線走完,又重復下了一次
此主題相關圖片如下:1.png
此主題相關圖片如下:2.png?
-
金字塔客服:
?1.重復下單了?這個K是不是當天的第一個K啊。然后昨天最后一個K是不是有信號?如果是這種情況可能是勾選了“啟動時重復交易檢測”導致的。
2.也有代碼實現的。但是需要用固定輪詢模式。有個范例:
ma5:=ma(c,5);
ma10:=ma(c,10);
input:tq(5,3,60,1);
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);if abb then begin
? if holding>0 and ma5<ma10 then sell(1,1,thisclose);
? if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
? if holding=0 and ma5>ma10 then buy(1,1,thisclose);
? if holding=0 and ma5<ma10 then buyshort(1,1,thisclose);end
[此貼子已經被作者于2020/7/10 10:10:20編輯過]
有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友
可聯系技術人員 QQ: 262069696 或微信號:cxh99cxh99 進行 有償收費 編寫!
(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
相關文章
-
沒有相關內容