區(qū)間專做多專做空策略源碼[金字塔模型]
//區(qū)間多,專做多
input:N(18,1,100,1);
開(kāi)盤(pán)K線數(shù):barslast(day<>ref(day,1))+1,linethick0;
開(kāi)盤(pán)價(jià):ref(c,開(kāi)盤(pán)K線數(shù)-1),colorwhite;
上軌:開(kāi)盤(pán)價(jià)+N,colorred;
long:=cross(c,上軌);
longend:=cross(開(kāi)盤(pán)價(jià),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);
?
//區(qū)間空,專做空
input:N(10,1,100,1);
開(kāi)盤(pán)K線數(shù):barslast(day<>ref(day,1))+1,linethick0;
開(kāi)盤(pán)價(jià):ref(c,開(kāi)盤(pán)K線數(shù)-1),colorwhite;
下軌:開(kāi)盤(pán)價(jià)-N,colorred;
short:=cross(下軌,c);
shortend:=cross(c,開(kāi)盤(pán)價(jià));
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);
?
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容