[求助]在一分鐘周期下,開平怎么寫?
作者:金字塔 來源:cxh99.com 發(fā)布時間:2014年09月08日
- 咨詢內(nèi)容:
每根K線都交易
開盤價做多 收盤價平多
請老師寫下
- 金字塔客服:
用開盤價下單,還是在開盤的時候下單?
- 用戶回復(fù):
開盤的時候 開盤價下單 這個K的收盤價平倉
- 網(wǎng)友回復(fù):
t1:time0;
t2:timetot0(dynainfo(207));
d:=t1-t2;
if islastbar and t1-t2>=58 or not(islastbar) then buy(holding=0,1,market);
if islastbar and t1-t2<=2 or not(islastbar) then sell(1,0,market);
- 網(wǎng)友回復(fù):
t1:=time0;t2:=timetot0(dynainfo(207));d:=t1-t2; if islastbar and t1-t2>=58 or not(islastbar) then buy(holding=0 AND O<C,1,market);if islastbar and t1-t2<=2 or not(islastbar) then sell(HOLDING>0,0,market);
if islastbar and t1-t2>=58 or not(islastbar) then buySHORT(holding=0 AND O>C,1,market);if islastbar and t1-t2<=2 or not(islastbar) then sellSHORT(HOLDING<O,0,market);
寫完測試 怎么出現(xiàn)倉位有 多 空單 都出現(xiàn)的情況?
這個怎么解決 老師