你好小幫手
想請問下面的語法,為什麼3-4%空單進場,使用日資料回測,價格到漲停都沒有回補的交易?
謝謝
var: intraBarPersist _stop(false);
var: lastdate (0);
value1 = (c - closeD(1) )/ closeD(1);
if lastdate <> date then begin
lastdate = date ;
_stop = false;
end;
condition1 = GetSymbolInfo("買賣現沖") and getField("成交量")[1] > 1000 ;
IF time < 115900 and condition1 = true and _stop = false and value1 > 0.03 and value1 < 0.04 then begin
setposition(-1, market) ;
_stop = true;
end;
if position < 0 and c >= getfield("漲停價", "D") * 0.99 and _stop = true
then begin
setposition(0,market);
end;
1 評論