如何實現(xiàn)對日內(nèi)損失進行限制?
當(dāng)日內(nèi)損失達到總資產(chǎn)的N%時,當(dāng)日就平倉不再交易。
variable:m=0;
asset_1:=valuewhen(date<>ref(date,1),asset);
if (asset_1-asset)/asset>0.01*n then begin
sellshort();
sell();
m:=1;
end
if time=closetime(0) then m:=0;
普通的開平倉條件加上m=0的判斷
[此貼子已經(jīng)被作者于2013/11/22 10:30:43編輯過]