請問 當 停損條件
如 condition18 狀況發生時(盤中一觸發)不立即停損出場,
而是 condition18 成立後 再觀望 3 分鐘 仍然滿足 condition18 時
或 condition19 ? Close > FilledAvgPrice*(1+0.01*loss_percent)
試編譯如下,各方豪傑要是你會如何撰寫? 感謝指教
var: intrabarpersist _time(0);
input:losss_percent(0.6, "小停損(%)"),loss_percent(1.6, "大停損(%)");
condition18 =
currentTime>110540 and GetField("收盤價","5")>GetField("均價","D")
and Close > FilledAvgPrice*(1+0.01*losss_percent);
if filled<=-1 then begin
if condition18 and _time = 0 then _time = currenttime;
if AbsValue(timediff(currenttime, _time, "M")) >= 3 and condition18
then SetPosition(0,label:="空錯回補");
1 評論