首页 > 编程语言 >通达信五彩MACD副图 副图指标源码

通达信五彩MACD副图 副图指标源码

时间:2024-03-10 10:55:21浏览次数:31  
标签:STICKLINE MACDSTICKLINE 通达信 源码 DIFF DEA REF MACD

{ 通达信五彩MACD副图 副图指标源码 }


DIFF:EMA(CLOSE,12)-EMA(CLOSE,29);
DEA:EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
STICKLINE(MACD>=0,MACD,0,4,1),COLORF00FF0;
STICKLINE(MACD<0,MACD,0,4,1),COLORWHITE;
STICKLINE(MACD<ref(macd,1)and macd="">0,0,MACD,4,0 ),COLOR00AAFF;
STICKLINE(MACD<ref(macd,1)and macd="">0,0,MACD,3.3,0 ),COLOR00BBFF;
STICKLINE(MACD<ref(macd,1)and macd="">0,0,MACD,2.2,0 ),COLOR00CCFF;
STICKLINE(MACD<ref(macd,1)and macd="">0,0,MACD,1.65,0 ),COLOR00DDFF;
STICKLINE(MACD<ref(macd,1)and macd="">0,0,MACD,1.1,0 ),COLOR00EEFF;
STICKLINE(MACD<ref(macd,1)and macd="">0,0,MACD,0.55,0 ),COLOR00FFFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,4 ,0 ),COLOR0000AA;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3.3 ,0 ),COLOR0011BB;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.2,0 ),COLOR0022CC;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.65 ,0 ),COLOR0033DD;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.1 ,0 ),COLOR0044EE;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0.55 ,0 ),COLOR0055FF;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,4,0 ),COLORAA00BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3.3 ,0 ),COLORBB11BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.2,0 ),COLORCC22BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.65,0 ),COLORDD33BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.1,0 ),COLOREE44BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0.55 ,0 ),COLORFF55BB;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,4,0 ),COLORFFAA00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3.3 ,0 ),COLORFFBB11;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.2,0 ),COLORFFCC22;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.65 ,0 ),COLORFFDD33;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.1 ,0 ),COLORFFEE44;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0.55 ,0 ),COLORFFFF55;
IF(DIFF<0,DIFF,0),COLORRED,LINETHICK1;
IF(DIFF<0,0,DIFF),COLORYELLOW,LINETHICK1;
IF(DIFF<dea,diff,dea),color00ff00,linethick1; <br="">IF(DIFF>DEA,DEA,DEA),COLORWHITE,LINETHICK1;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,-0.18,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,-0.1, 低位金叉),COLORYELLOW;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,-0.18,6,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*1.04,13) ;
DRAWTEXT(二次金叉,-0.1, 二次金叉),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.13,6,0),COLOR00FF00;
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
DRAWTEXT(底背离,0.1, 底背离),COLOR00FF00;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
 

 

标签:STICKLINE,MACDSTICKLINE,通达信,源码,DIFF,DEA,REF,MACD
From: https://www.cnblogs.com/zhibiao/p/18063842

相关文章

  • 通达信主升突破指标公式源码
    {通达信主升突破指标公式源码}MA线:=MA(CLOSE,3.1415926535*MA(C,5));STICKLINE(CLOSE>=OPENANDCLOSE>=MA线,OPEN,CLOSE,2,0),COLOR000077;STICKLINE(CLOSE>=OPENANDCLOSE>=MA线,H,L,0,0),COLOR000077;STICKLINE(OPEN>CLOSEANDCLOSE>=MA线,OPEN,CLOSE,2,0),COLO......
  • 通达信移动筹码三合一主图指标公式源码
    {通达信移动筹码三合一主图指标公式源码}HB:=COST(99.9);LB:=COST(0.1);B3:=(HB-LB)/50;B31:=HB-B3;B32:=HB-2*B3;B33:=HB-3*B3;B34:=HB-4*B3;B35:=HB-5*B3;B36:=HB-6*B3;B37:=HB-7*B3;B38:=HB-8*B3;B39:=HB-9*B3;B310:=HB-10*B3;B311:=HB-11*B3;B312:=HB-12*B3......
  • 通达信涨停阴阳绝杀主图指标公式源码
    {通达信涨停阴阳绝杀主图指标公式源码}DRAWGBK(C>0,RGB(20,10,60),RGB(350,60,150),0,'1',0);DRAWKLINE(H,O,L,C);涨停:=IF((C-REF(C,1))/REF(C,1)>0.097,1,0);STICKLINE(涨停,OPEN,CLOSE,3,0),COLORMAGENTA;BL:=MA(CLOSE,10);UB:=BL+2*STD(CLOSE,10);LB:=BL-2*STD(CLO......
  • 通达信红牛起爆主图指标公式
    {通达信红牛起爆主图指标公式}A:=(3*C+L+O+H)/6;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(......
  • 通达信股市抄底密码指标公式知
    {通达信股市抄底密码指标公式知}去ST:=NAMELIKE('ST')=0ANDNAMELIKE('*ST')=0ANDNAMELIKE('SST')=0ANDNAMELIKE('S*ST')=0;去除创业板:=IF(CODELIKE('300'),0,1);去除科创板:=IF(CODELIKE('688'),0,1);去除北交所:=IF(CODELIKE(&#......
  • 通达信强烈反转主图指标公式源码
    {通达信强烈反转主图指标公式源码}N1:=20;N2:=60;VAR1:=(LOW+HIGH+CLOSE)/3;X:MA(VAR1,5);A1:HHV(X,N1)COLORMAGENTA;A2:HHV(X,N2),COLORGREEN;A3:HHV(HIGH,N2)*0.98,COLOR0000FF;B1:LLV(X,N1);B2:LLV(LOW,N2)*1.02;DRAWICON(X>B1ANDREF(X,1)=REF(B1,1),B1*0......
  • 通达信狂风暴雨副图公式源码
    {通达信狂风暴雨副图公式源码}总亿:AMOUNT/100000000,COLORFF00FF,NODRAW;VAR1:=AMOUNT/((HIGH-LOW)*2-ABS(CLOSE-OPEN));流入亿:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<open,var1*((high-open)+(close-low)),amount=""2))=""100000000,colorred,nodraw;&l......
  • 通达信彗华量副图源码带有使用说明
    {通达信彗华量副图源码带有使用说明}{彗华量}彗华量副图,带有使用说明   虚:IF((CURRBARSCOUNT=1)AND(PERIOD=5),(VOL*240)/FROMOPEN,DRAWNULL),NODRAW;STICKLINE((CURRBARSCOUNT=1)AND(PERIOD=5),虚,0,-1,-1),COLOR00C0C......
  • 通达信涨停筹码指标公式源码
    {通达信涨停筹码指标公式源码}X_1:=90;当日换手:vol/CAPITAL*100,NODRAW;半年换手:SUM(当日换手,126),NODRAW;X_2:=(WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))/WINNER(HHV(HIGH,0));相对换手:VOL/(CAPITAL*X_2)*100,NODRAW;获利盘:WINNER(CLOSE)*100,NODRAW;X_3:=相对换手<......
  • 通达信强势主力资金指标公式源码
    {通达信强势主力资金指标公式源码}去ST:=NOT(NAMELIKE('ST')ORNAMELIKE('*ST')ORNAMELIKE('S'));去停牌:=DYNAINFO(4)>1;PC:=去STAND去停牌;AA05:=MA(C,5);BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;AA10:=MA(C,10);BB10:=ATAN((AA10/REF(......