你好,我用逐筆洗價,請教下,
var:intrabarpersist condition_buy_firstorder(true);
Print("condition_buy_firstorder " , condition_buy_firstorder );
//多單第1次下單
if position <= 0 and filled <= 0
and condition_buy_firstorder = true
and conditon1
then begin
SetPosition(1, MARKET,label:="多單進場1");
condition_buy_firstorder = false ;
end;
//多單第2次下單
if position <= 0 and filled <= 0
and condition_buy_firstorder = false
and conditon2
then begin
SetPosition(1, MARKET,label:="多單進場2");
end;
以上,我的問題是,多單進場1的條件未符合(當然也未觸發下單),但Print("condition_buy_firstorder " , condition_buy_firstorder )時,condition_buy_firstorder的值為何已被改成是「false」了呢?
百思不解~~~
14 評論