1.日頻率逐筆,觸發時進行進場,獲利時出場
2.安控設定,單一商品最多進場次數設>1時,希望出場後才進行第二次進場
以下是否有誤? (在沒有FB1變數時,獲利達標但都沒出場動作)
input: A1(2,"短均線"), B1(4,"長均線") ;
var: intraBarPersist FB1(true);
value23=average(getField("均價"),A1);
value24=average(getField("均價"),B1);
if value23 > value23[1]
and close >= value23
and volume >=2500
and FB1=true
then begin
setposition(1,getField("收盤價", "Tick"),label:="買1");
FB1=false;
end;
if filled > 0 and getField("收盤價", "Tick") >= filledAvgPrice*1.015
then begin
setposition(0,getField("收盤價", "Tick"),label:="賣1");
FB1=true;
end;
4 評論