BKPRICE
SKPRICE
CLOSEOUT
这3个是什么意思?
BKPRICE 返回数据合约最近一次买开信号价位
SKPRICE 返回数据合约最近一次卖开信号价位
CLOSEOUT 清仓指令
交易k线是几分钟周期?
用的固定时间间隔还是走完一根k线?
在金字塔里最近一次买开信号价位和最近一次卖开信号价位都是用enterprice表示,不分多空
N:=BARSLAST(TIME=0900)+1;
NN1:=BARSLAST(DATE<>REF(DATE,1))+1;
if N=1 and ISUP and holding=0 then buy(1,1,market);//开多
if N=1 and C<=O and holding=0 then buyshort(1,1,marketr);//开空
if (C<=enterprice-15 or C>=enterprice+65) and holding>0 then sell(1,holding,marketr);//多头止盈或止损
if (C>=enterprice+15 or C<=enterprice-65) and holding<0 then sellshort(1,holding,marketr);//空头止盈或止损
if TIME>=1451 then begin //清仓
sell(holding>0,holding,marketr);
sellshort(holding<0,holding,marketr);
end