大三浪源碼:
N:=65;
MA5:=MA(CLOSE,5);
MA21:=MA(CLOSE,21);
MA65:=MA(CLOSE,N);
多頭:=COUNT(MA21》MA65,10)=10;
GX:=MAX(MA5,MAX(MA21,MA65));
DX:=MIN(MA5,MIN(MA21,MA65));
粘合:=ABS(GX/DX-1)*100《=15;
多頭粘合:IF(多頭 AND 粘合,5,0),COLORFF00FF,LINETHICK2;
{,POINTDOT,NODRAW;}
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
莊股:(COUNT(MACD《0,10)=10)*3,COLORFFFF00,LINETHICK1;
{,POINTDOT,NODRAW;}
目標(biāo):IF(多頭 AND 粘合 AND 莊股,12.8,0)文章來源sfzzp.cn,COLORFFFFFF,LINETHICK2;
跟蹤:IF(目標(biāo),(BARSLAST(CROSS(目標(biāo),0))+1)*8,0),COLOR00FF00{,POINTDOT},LINETHICK2;
出擊:IF(CROSS(0.1,目標(biāo)) AND CROSS(MACD,0),16.8,0),COLOR00FFFF,LINETHICK2;
MJSJ:=BARSLAST(出擊》0);
漲幅:IF(MJSJ《=120,(C/REF(C,MJSJ)-1)*100,0),COLOR0000FF,LINETHICK1;
{,POINTDOT,NODRAW;}
日漲:IF(MJSJ《=120,漲幅/MJSJ,0),COLORFFFFFF,LINETHICK0;
{,POINTDOT,NODRAW;}
TPX:=MIN(MA65*1.15,MA21*1.13);
突破:IF(CROSS(C,TPX) AND 粘合 AND MA65》REF(MA65,1),20.8,0),COLOR0000F9,LINETHICK2;
{以下設(shè)置副圖顯示方式}
{FILLRGN(漲幅》0,漲幅,0),Color222282;}
STICKLINE(漲幅》0,漲幅,0,0,0),Color222282;
STICKLINE(多頭粘合,0,1,3,0),COLORFF00FF;
STICKLINE(莊股,0,MACD*10,3,0),COLOR99FF00;
DRAWTEXT(出擊》0,15.8,‘★買’),COLOR00FFFF;
STICKLINE(CROSS(漲幅,20) AND COUNT(CROSS(漲幅,20),MJSJ)=1,-5,10,0,0),COLOR0000FF;
這是用均線,macd等指標(biāo)進(jìn)行松散型組合。如果設(shè)置適當(dāng)會(huì)有好的效果。
其中有兩點(diǎn)我有想法:
1.)均線系統(tǒng)應(yīng)選用ema函數(shù),這可以縮小離散度,提高準(zhǔn)確性。
2.)指標(biāo)本意是在股價(jià)橫盤均線粘合過程中尋求機(jī)會(huì),應(yīng)當(dāng)設(shè)置限制條件,將頂部橫盤的情況排除。
3.)“多頭”設(shè)置可以修改“多頭:=COUNT(MA10》MA20,30)》=5”,即前期有上漲過程,因?yàn)榫粘合過程中ma21》ma60的情況不多。
(南方財(cái)富網(wǎng)SOUTHMONEY.COM)