[原創(chuàng)]
作者:金字塔 來源:cxh99.com 發(fā)布時間:2016年10月09日
- 咨詢內(nèi)容:
老師幫看一下、這代碼是不是哪里寫錯了,開倉能執(zhí)行、平倉達(dá)到條件了也沒平倉思路是這樣的:1、最新價比開盤價高5個點(diǎn)、開多,賺5個點(diǎn)平倉、虧8個點(diǎn)平倉、反之;這是后臺的
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
- 用戶回復(fù):
謝謝、我再試試