如標題,有時有成功抓到,有時沒有,不知哪裡出問題,再麻煩幫健檢一下了....感謝
如下圖 6245立端,
紫色箭頭日期(2022/11/24)要抓到此股,但失敗。
橘色箭頭日期(2022/12/09)要抓到此股,成功。
腳本如下:
value1=close[3];
//飆股判定驗收條件日期,設在前三天
condition1=
value1 > close[4] and
value1 > close[5] and
value1 > close[6] and
value1 > close[7] and
value1 > close[8] ;// and
//value1 > close[7] and
//value1 > close[8] and
//value1 > close[9] and
//value1 > close[10] and
//value1 > close[11];
//Condition2=Condition20 and Not Condition20[1];
//Condition10=Condition1 and Not Condition1[1];
if condition1 then begin
value2 = close[3]*0.97; //不跌破價格
value3 = close[3]*1.03; //不漲超過高點3%
end;
condition2 = trueall(close > value2, 3) and trueall(close < value3, 3);
//這邊配合上方條件1,寫死trueall3
if condition2 then begin //當條件2滿足時重置 value1 和 value2
value2 = 0;
value3 = 0;
end;
//if condition10 then ret =1;
if condition1 and condition2 then ret =1;



7 評論