[原創]
作者:金字塔 來源:cxh99.com 發布時間:2016年10月09日
- 咨詢內容:
老師幫看一下、這代碼是不是哪里寫錯了,開倉能執行、平倉達到條件了也沒平倉思路是這樣的:1、最新價比開盤價高5個點、開多,賺5個點平倉、虧8個點平倉、反之;這是后臺的
if DYNAINFO2(7, PZ1)<=enterprice-8*MINDIFF then begin//多損tsell(1,1,MKT,0); end;if DYNAINFO2(7, PZ1)>=enterprice+5*MINDIFF then begin//多盈tsell(1,1,MKT,DYNAINFO2(7, PZ1),0);end
if DYNAINFO2(7, PZ1)>=enterprice+8*MINDIFF then begin//空損tsellshort(1,1,MKT,DYNAINFO2(7, PZ1),0);endif DYNAINFO2(7, PZ1)<=enterprice-5*MINDIFF then begin //空盈tsellshort(1,1,MKT,DYNAINFO2(7, PZ1),0);endif DYNAINFO2(7, PZ1)<=o-4*mindiff and tbuyholdingex(ZH,pz1,0)=0 and tsellholdingex('',pz1,0)=0 then begin//開空tbuyshort(1,1,MKT,DYNAINFO2(7, PZ1),0);end
if DYNAINFO2(7, PZ1)>=o+4*mindiff AND tbuyholdingex('',pz1,0)=0 and tsellholdingex('',pz1,0)=0 then begin //開多tbuy(1,1,MKT,DYNAINFO2(7, PZ1),0);end
- 金字塔客服:
后臺是用tenterprice,不是enterprice
- 用戶回復:
謝謝、我再試試