區間專做多專做空策略源碼[金字塔模型]
//區間多,專做多
input:N(18,1,100,1);
開盤K線數:barslast(day<>ref(day,1))+1,linethick0;
開盤價:ref(c,開盤K線數-1),colorwhite;
上軌:開盤價+N,colorred;
long:=cross(c,上軌);
longend:=cross(開盤價,c);
if holding=0 then buy(long,1,thisclose);
if holding>0 then sell(longend,1,thisclose);
if holding>0 and enterprice-c>=20 then sell(1,1,thisclose);
if time>150500 and holding>0 then sell(1,1,thisclose);
?
//區間空,專做空
input:N(10,1,100,1);
開盤K線數:barslast(day<>ref(day,1))+1,linethick0;
開盤價:ref(c,開盤K線數-1),colorwhite;
下軌:開盤價-N,colorred;
short:=cross(下軌,c);
shortend:=cross(c,開盤價);
if holding=0 then buyshort(short,1,thisclose);
if holding<0 then sellshort(shortend,1,thisclose);
if time>150500 and holding<0 then sellshort(1,1,thisclose);
?
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容