通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
a:=IF(VOL REF(VOL,1)ANDC REF(C,1),2,IF(C REF(C,1)ANDVOL REF(VOL,1),1,
IF(C REF(C,1)ANDVOL REF(VOL,1),-2,-1)));
打分短:SUM(a,N1);
打分长:SUM(a,N2);
当前打分:a,NODRAW;
STICKLINE(a 1,0,a*2,5,0),COLOR0000FF;
STICKLINE(a -1,0,a*2,5,0),COLOR00FF00;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(买线 =卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
COLOR600020;
STICKLINE(买线 卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
COLOR404050;DRAWKLINE(H,O,L,C);
指导线:EMA((EMA(CLOSE,5)+EMA(CLOSE,10)+EMA(CLOSE,15)+EMA(CLOSE,24))/4,2),,COLORCYAN;
界:EMA((EMA(CLOSE,15)+EMA(CLOSE,20)+EMA(CLOSE,30)+EMA(CLOSE,45))/4,5),,COLORYELLOW;
底:EMA((EMA(CLOSE,60)+EMA(CLOSE,90)+EMA(CLOSE,120)+EMA(CLOSE,240))/4,1),,COLORLIMAGENTA;
B买:IF(CROSS(指导线,界)ORCROSS(买线,卖线),C,DRAWNULL),COLORMAGENTA,NODRAW;
持仓:IF(买线 =卖线,C,DRAWNULL),COLORRED,NODRAW;
S卖:IF(CROSS(界,指导线)ORCROSS(卖线,买线),C,DRAWNULL),COLORLIGRAY,NODRAW;
空仓:IF(买线 卖线,C,DRAWNULL),COLORGREEN,NODRAW;
DRAWICON(CROSS(买线,卖线),L,1);
DRAWICON(CROSS(卖线,买线),H,2);
顶:COST(95),COLORBLUE;
M55:EMA(CLOSE,55),POINTDOT,LINETHICK3,COLORWHITE;
M8:EMA(CLOSE,8),COLORYELLOW;
{周线寻马}
EMA7:EMA(C,7),COLOR00FF00;
EMA14:EMA(C,14),COLORWHITE;
EMA21:EMA(C,21),COLORYELLOW;
ZMA7:EMA(C,35),COLORFF00FF;
ZMA14:EMA(C,70),COLORFFCCCC;
ZMA34:EMA(C,170),COLORFFCC66;
VV0:=BARSLAST(CROSS(ZMA7,ZMA14)ANDZMA7 ZMA14);
VV1:=VV0ANDBARSLAST(CROSS(ZMA7,ZMA34));
VV2:=VV1ANDCROSS(ZMA14,ZMA34);
DRAWICON(VV2,L-0.20,9);{双跨越信号显示9号图标为钱袋子}
VV3:=ZMA7 ZMA34ANDZMA14 ZMA34;
VV4:=VV3ANDCROSS(ZMA7,ZMA14);
DRAWICON(VV4,L-0.20,5);{第二波信号显示5号图标为黄色笑脸};
J0:=(HIGH+LOW)/2;QJ:=WMA(J0,3);
J1:=IF(CLOSE QJ,VOL,0);J2:=IF(CLOSE QJ,VOL,0);
RV:=(qj-LLV(qj,144))/(HHV(qj,144)-LLV(qj,144))*100;
统计:SUM(J1-J2,5),LINETHICK0;
差:EMA(统计,7)-EMA(统计,340),COLORFFFFFF;:EMA(差,7),COLOR00FFFF;
结:2*(差-趋势),COLORSTICK;
GZ:=cross(差,趋势);
GG:=cross(趋势,差);
KZ:=COUNT(rv 15,3) =1andcross(RV,3);
KD:=COUNT(rv 80,3) =1andcross(98.5,RV);
DRAWICON(KZ,差,4);DRAWICON(KD,趋势,5);
DRAWICON(GZ,差,10);DRAWICON(GG,趋势,11);
DRAWTEXT(GZandKZ,差, 底 ),PXDN60,COLORYELLOW;
DRAWTEXT(GGandKD,趋势, 顶共振 ),PXUP60,COLOR00FF00;
VERTLINE(GZandKZ),COLORYELLOW,LINEDOT;
VERTLINE(GGandKD),COLOR00FF00,LINEDOT;
公式解读:
编写条件:
连续3天收阴线且跌幅小于2的公式。
编写方法:
XG:EVERY(C OANDRANGE(C/REF(C,1),0.98,1),3);