我希望在尾盘某个时间回撤一定幅度就平仓,并且记录下平仓时间,目的是在此时刻之后,不再开新仓。
请帮忙看一下,下面的写法有什么问题?平仓后没有记录下平仓时间。
if TT and THolding>0 and cXLV and TDAMT<>0 then begin
TSell(1,TDAMT,mkt);
if islastbar then begin
EXTGBDATASET('CT',currenttime);
PT:=EXTGBDATA('CT');
CT:=currentTIME<=PT;
end
end
用这个试试
尾盘平仓:=TSell(1,TDAMT,mkt);
valuewhen(尾盘平仓,currenttime)