通达信【均线突破战法】利用移动平均线来捕捉市场趋势的变化 主图 源码


N:=10;
M := 3;
M5:MA(CLOSE,5);
M10:MA(CLOSE,10),COLORCYAN;
M20:MA(CLOSE,20);
M30:MA(CLOSE,30),COLORYELLOW,LINETHICK2;
M60:MA(CLOSE,60),COLORLIMAGENTA,LINETHICK2;
MA120:=MA(CLOSE,120),COLOR80FF00;
MA250:=MA(CLOSE,250),COLORFF0080;
MA10:=MA(CLOSE,N);
VOLUME:=VOL;
MACD:=MACD.MACD;
KDJ_K:=KDJ.K;
KDJ_D:=KDJ.D;
RSI:=RSI.RSI1;
XG:=CROSS(C,M20) AND VOLUME>REF(VOLUME,1)*1.5 AND MACD>0 AND KDJ_K>KDJ_D AND RSI>50;
STICKLINE(XG,OPEN,CLOSE,2.5,0)COLORYELLOW;
DRAWICON(XG, L, 1);
DRAWTEXT(XG,L*0.97,'↖均线突破战法'),LINETHICK1,COLORYELLOW;
突破颈线:IF(EXIST(CROSS(MA(C,40),MA(C,60)),60) AND HHV(C,20)=REF(HHV(C,20),1),HHV(C,20),DRAWNULL),COLORYELLOW,LINETHICK3;
STICKLINE(CURRBARSCOUNT=1,REF(突破颈线,5),REF(突破颈线,5),10,0),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=1,REF(突破颈线,5)*1.003,'注意突破口'),COLORMAGENTA;
A1:=EMA(C,14),COLORWHITE,LINETHICK1;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
突破:=REF(EMA(C,14),1),NODRAW;
距离:=(C-突破)/突破*100,NODRAW;
入场:=IF(A1X>=0,REF(EMA(C,14),BARSLAST(CROSS(A1X,0))+1),DRAWNULL)COLORRED,LINETHICK1;
出逃:=IF(A1X< 0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1),DRAWNULL)COLORGREEN,LINETHICK1;
钱袋子:=DRAWICON(CROSS(A1X,0) AND C>=REF(HHV(H,7),1) AND C>REF(C,1)*1.097,L,9);
起爆点:=DRAWTEXT(CROSS(A1X,0) AND C>=REF(HHV(H,7),1) AND C>REF(C,1)*1.097 ,H*1.018,'←起爆')COLORBLUE;
DRAWTEXT(CROSS(A1X,0) AND C>=REF(HHV(H,7),1) AND C>REF(C,1)*1.097 AND C=H,H*1.008,'←打首板')COLOR4080FF;
STICKLINE(CROSS(A1X,0),(C+O)/2,O,1,0),COLORRED;
STICKLINE(CROSS(0,A1X),(C+O)/2,O,1,0),COLORYELLOW;
WYZB1:=EMA(CLOSE,7);
WYZB2:=EMA(CLOSE,21);
WYZB3:=10;
WYZB4:=CONST(HHVBARS(VOL,WYZB3));
WYZB5:=WYZB3;
WYZB6:=CONST(REF(HHVBARS(VOL,WYZB5),WYZB4+1)+WYZB4+1);
突破天数:WYZB6,NODRAW,COLOR40FF00;
WYZB7:=IF(CURRBARSCOUNT<=WYZB4+WYZB5+3 AND CURRBARSCOUNT>=WYZB4+1,CONST(REF(MAX(CLOSE,OPEN),WYZB6)),DRAWNULL);
DRAWTEXT(突破天数,L*1.02,'突破天数'),COLORYELLOW;
突破价格:WYZB7,COLOR40FF00;
WYZB8:=IF(CURRBARSCOUNT<=WYZB4+WYZB5+3 AND CURRBARSCOUNT>=WYZB4+1,CONST(REF(HIGH,WYZB6)),DRAWNULL);
WYZB9:=DRAWICON(CURRBARSCOUNT=WYZB6+1,WYZB7,25);
WYZB10:=CONST(LLVBARS(VOL,WYZB5));
WYZB11:=WYZB6+1;
WYZB12:=REF(MAX(CLOSE,OPEN),WYZB6);
WYZB13:=IF(CURRBARSCOUNT<=WYZB4+WYZB5+3 AND CURRBARSCOUNT>=WYZB4+1,CONST(REF(VOL,WYZB6)),DRAWNULL);
WYZB14:=CROSS(CLOSE,WYZB7) AND CROSS(VOL,WYZB13) AND REF(MAX(CLOSE,OPEN),WYZB4+1)=HHV(MAX(REF(CLOSE,1),REF(OPEN,1)),WYZB4+1) AND WYZB11>=5 AND WYZB11<=11;
WYZB15:=CROSS(CLOSE,WYZB7) AND CROSS(VOL,WYZB13) AND LAST(MAX(REF(CLOSE,1),REF(OPEN,1))<=REF(MAX(CLOSE,OPEN),1),WYZB11,1) AND WYZB11>=4 AND WYZB11<=11 AND CLOSE>OPEN;
WYZB16:=CROSS(CLOSE,WYZB7) AND CROSS(VOL,WYZB13) AND LAST(MAX(CLOSE,OPEN)<WYZB8,WYZB11-2,1) AND WYZB11>=5 AND WYZB11<=11 AND CLOSE>OPEN;
WYZB17:=WYZB16 AND CROSS(WYZB1,WYZB2);
DRAWTEXT(WYZB17,L*0.962,'突破'),LINETHICK1,COLORYELLOW;
STICKLINE(CURRBARSCOUNT=WYZB6+1,CLOSE,OPEN,2,0),COLORYELLOW;
STICKLINE(WYZB17,WYZB7,OPEN,2,0),COLORMAGENTA;



来函数检测结果如下:
该公式没有未来函数

解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网仅为互联网文章,所有指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。指标公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图