如附件 畫面及print檔

1. 觸發B買入、觸發S賣出

但發生

部分出場訊息標示為 觸發B

部分進場訊息標示為 觸發S

2. 設當日最大進場次數1次,實際卻有進場1次以上

 

主要交易程式碼如下

var: intraBarPersist BT1P(False),  intraBarPersist ST1P(False);

if filled > 0  

and condition1  

and close > filledAvgPrice*1.0045 

and ST1P=false  

then begin 

 setposition(position-1,addSpread(value8,0),label:="觸發S"); 

 //ST1P=true; //為何加入後會導致無交易?

 end; 

  

if  position<=2 

and condition2  

and BT1P=false  

then begin 

 setposition(position+1,addSpread(value7,0),label:="觸發B"); 

 //BT1P=true;  //為何加入後會導致無交易?

 end; 

 print("P",position,"F",Filled, "DATE",DATE,"time",currentTime);