通达信——高级红色趋势黑马指标副图公式源...
通达信——高级红色趋势黑马指标副图公式
源码:
ee1:EMA(CLOSE,12) - EMA(CLOSE,26);
ee2:EMA(ee1,9);
MACD:2*(ee1-ee2),COLORSTICK;
{升i:ee1>0 AND ee1>ee2,COLOR0000FF,POINTDOT,LINETHICK0;}
DRAWBAND(ee2,DRAWNULL,ee1,RGB(250,0,0));
DIFF:ee1,COLORWHITE;{财神指标网财神指标网-通达信指标公式-股票指标公式-选股公式}
DEA:ee2,COLORYELLOW;
ee3:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,ee3+1)>C AND REF(DIFF,ee3+1)<DIFF AND CROSS(DIFF,DEA);
QQ9:=BARSLAST(REF(CROSS('KDJ.K'(9,3,3),'KDJ.D'(9,3,3)),1));
QQ8:=REF(C,QQ9+1)>C AND REF('KDJ.K'(9,3,3),QQ9+1)<'KDJ.K'(9,3,3) AND CROSS('KDJ.K'(9,3,3),'KDJ.D'(9,3,3));
QQ7:=BARSLAST(REF(CROSS('RSI.RSI1'(6,12,24),'RSI.RSI2'(6,12,24)),1));
QQ6:=REF(C,QQ7+1)>C AND REF('RSI.RSI1'(6,12,24),QQ7+1)<'RSI.RSI1'(6,12,24) AND CROSS('RSI.RSI1'(6,12,24),'RSI.RSI2'(6,12,24));
QQ5:=BARSLAST(REF(CROSS(DEA,DIFF),1));
QQ4:=REF(C,QQ5+1)<C AND REF(DIFF,QQ5+1)>DIFF AND CROSS(DEA,DIFF);
QQ3:=BARSLAST(REF(CROSS('KDJ.D'(9,3,3),'KDJ.K'(9,3,3)),1));
D2:=REF(C,QQ3+1)<C AND REF('KDJ.K'(9,3,3),QQ3+1)>'KDJ.K'(9,3,3) AND CROSS('KDJ.D'(9,3,3),'KDJ.K'(9,3,3));
QQ2:=BARSLAST(REF(CROSS('RSI.RSI2'(6,12,24),'RSI.RSI1'(6,12,24)),1));
QQ1:=REF(C,QQ2+1)<C AND REF('RSI.RSI1'(6,12,24),QQ2+1)>'RSI.RSI1'(6,12,24) AND CROSS('RSI.RSI2'(6,12,24),'RSI.RSI1'(6,12,24));
VQW1:IF(MACD>0,-0.1,0),COLORRED,POINTDOT;
VQQ8:IF(QQ8>0,-0.1,0),COLORFF00FF,POINTDOT;
VQQ6:IF(QQ6>0,-0.1,0),COLORYELLOW,POINTDOT;
VB4:IF(QQ4>0,0.1,0),COLOR00FF00,POINTDOT;
VB5:IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;
VB6:IF(QQ1>0,0.1,0),COLORWHITE,POINTDOT;
STICKLINE(MACD>0,-0.04,0,3,0),COLORRED,LINETHICK3;
STICKLINE(QQ8>0,-0.04,0,3,0),COLORFF00FF,LINETHICK5;
STICKLINE(QQ6>0,-0.04,0,3,0),COLORYELLOW,LINETHICK5;
STICKLINE(QQ4>0,0.04,0,3,0),COLOR00FF00,LINETHICK5;
STICKLINE(D2>0,0.04,0,3,0),COLORFFCC66,LINETHICK5;
STICKLINE(QQ1>0,0.04,0,3,0),COLORWHITE,LINETHICK5;