2023/4/20 18:49 時,下列程式的規則應不符合,卻仍做多單了,可以麻煩幫我看一下哪裡有誤嗎?會是資料引用筆數不足的關係嗎
這是跑1分k並有開逐筆洗價的狀態,發現有開逐筆好像都會怪怪的。
//RSI
var:Rsi_D(0),Rsi_H(0),Rsi_m5(0),Rsi_m1(0);
//Rsi_D = xfMin_RSI("D",GetField("close","D"),10);
Rsi_H = xfMin_RSI("60",GetField("close","60"),10);
Rsi_m5 = xfMin_RSI("5",GetField("close","5"),10);
Rsi_m1 = xfMin_RSI("1",GetField("close","1"),10);
//→→多單進場:
if condition_pre = true
and position <= 0 and filled <= 0
and Rsi_H[1] > 60
and Rsi_m5[1] > 60
and Rsi_m1[1] cross Over 60
then begin
SetPosition( quantity, MARKET,label:="多單進場");
end;

7 評論