抱歉本身很菜才剛接觸~
想請問一下移動停利的寫法,我是看XS內建的腳本然後把它放進去我的策略當中,但好像編譯失敗所以想詢問該怎麼修改,謝謝!
var:intraBarPersist intoFirst(false); //KD多
input: profit_point(30, "停利(點)");
input: profit_drawback_point(8, "停利回跌(點)");
if currentTime>084959
and K_Value(9,3)>D_Value(9,3)
and K_Value(9,3)[1]<20
and K_Value(9,3)>K_Value(9,3)[1]
then
begin
once setposition(1);
end;
if position>0
and (enterMarketCloseTime(20) or (K_Value(9,3)<K_Value(9,3)[1]) then setposition(0);
if profit_point = 30 then raiseruntimeerror
if profit_drawback_point = 8 then raiseruntimeerror
if profit_drawback_point > profit_point then raiseruntimeerror
3 評論