請問各位大大,我寫了一個警示策略,規則是希望能在盤中時價格從開盤價或是最高價下跌n%(或跌破開盤價)後,之後股價拉回並突破(希望能夠帶量突破或判斷是否有特大單)開盤價or最高價時進場,但目前遇到一些困難寫不出來...想請教一下我該如何修改
例如我想在下圖紅圈時進場
以下腳本是我網路上參考來稍做修改的,謝謝各位大大
input:sp(3,"回檔最大幅度");
input:opl(2,"開高最小幅度");
input:oph(6,"開高最大幅度");
condition1 = False;
//condition2 = False;
//是否成立V型 (先跌後漲)
if open>=close[1]*(1+opl/100) //開高最小幅度
and close<=close[1]*(1+oph/100) //開高最大幅度
and low>open*(1-sp/100) //回檔最大幅度
and close=high
//and close[1]<close[3]*1.08//前三天漲幅不到8%
then condition1 = True;
//是否帶量
//Value1 = GetField("買進特大單量", "1") - GetField("賣出特大單量", "1");
//if Value1 > 0 then condition2 = True;
if condition1 then ret=1;
15 評論