【股票指标公式下载】-【通达信】主力动向(分时、MACD定位顶底、MACD趋势)
【股票指标公式下载】-【通达信】分时操盘手(涨幅、大趋势、资金流、逃顶)
【通达信】分时操盘手(涨幅、大趋势、资金流、逃顶)-指标公式源码TA:=IF(TIME>093000 AND TIME<094000 ,1,0);TT:=IF(TIME>=093000 AND TIME<=093300 ,1,0);T0:=IF(TIME>093600 AND TIME<095900 ,1,0);T1:=IF(TIME>093300 AND TIME<145900 ,1,0);T2:=IF(TIME>095500 AND TIME<145900 ,1,0);T3:=IF(TIME>142500 AND TIME<145900 ,1,0);T4:=IF(TIME>111000 AND TIME<145900 ,1,0);T5:=IF(TIME>110000 AND TIME<145900 ,1,0);T6:=IF(TIME>104200 AND TIME<145900 ,1,0);T7:=IF(TIME>103000 AND TIME<131000 ,1,0);T8:=IF(TIME>130000 AND TIME<155900 ,1,0);T9:=IF(TIME>095500 AND TIME<131000 ,1,0);T10:=IF(TIME>130500 AND TIME<143500 ,1,0);T11:=IF(TIME>094500 AND TIME<102500 ,1,0);T12:=IF(TIME>095000 AND TIME<140000 ,1,0);T13:=IF(TIME>093000 AND TIME<143500 ,1,0);DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);VARY1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));SD:=(C>60 AND C<100,200,100);SF:=IF(C<40 AND C<=60,300,SD);SG:=IF(C>10 AND C<=28,1000,IF(C>29 AND C<40,500,SF));SH:=IF(C<5,5000,IF(C>=5 AND C<=10,2000,SG));SJ:=IF(C>=6000,5,SH);SK:=IF(C>1000 AND C<6000,25,SJ);MACD:=(DIF-DEA)*SK,COLORSTICK;STICKLINE((MACD>=0),0,MACD,3,1),COLOR0000FF;STICKLINE(((MACD>=0) AND (MACD < REF(MACD,1))),0,MACD,3,0),COLORCYAN; STICKLINE((MACD<0),0,MACD,3,0),COLORFFFF00;STICKLINE(((MACD<0) AND (MACD > REF(MACD,1))),0,MACD,3,1),COLORRED; JS1:=100000*(CLOSE-REF(CLOSE,5))/(5*REF(CLOSE,5));JS2:=IF(JS1>110,110,JS1);JS:=IF(JS2<-20,-20,JS2);RSV2:=(CLOSE-LLV(LOW,120))/(HHV(HIGH,120)-LLV(LOW,120))*100;K2A:=SMA(RSV2,33,1);K2:=IF(TT=1,REF(K2A,1),K2A);D2:=SMA(K2,3,1);OK:=K2;RSV:=(CLOSE-LLV(LOW,89))/(HHV(HIGH,89)-LLV(LOW,89))*100;K89A:=SMA(RSV,33,1);K89:=IF(TT=1,REF(K89A,1),K89A);RSVC2:=(CLOSE-LLV(LOW,140))/(HHV(HIGH,120)-LLV(LOW,120))*100;KC2:=SMA(RSVC2,46,1);DC2:=SMA(KC2,46,1);大趋势:DC2,LINETHICK1,CIRCLEDOT{POINTDOT},COLORYELLOW{COLORC6C600}; TYPP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYPP-MA(TYPP,14))/(0.015*AVEDEV(TYPP,14));GG:=(C-REF(C,210))/REF(C,210)*55;WG:=BARSSINCE(V>0)+1;GGJX:=((SUM(C*V,WG)/SUM(V,WG)+WG*0)/REF((SUM(C*V,WG)/SUM(V,WG)+WG*0), 0)-1)*55;DPX:=0.3*(3*SMA((C-LLV(L,105))/(HHV(H,105)-LLV(L,105)),5,1)-2*SMA(SMA ((C-LLV(L,105))/(HHV(H,105)-LLV(L,105)),5,1),3,1))*0.9,,COLOR5AFF99; GBC:=CROSS(GG,GGJX);GBK:=-CROSS(GGJX,GG);GBD:=SUM(GBC,0)+SUM(GBK,0);涨幅:=DYNAINFO(14)*100;STS:=FINANCE(32)>=0 AND FINANCE(34)>0 AND DYNAINFO(7)>0 ;CK:=IF(DYNAINFO(8)>0 AND STS=0 AND 涨幅<4.91 OR DYNAINFO(8)>0 AND STS=1 AND 涨幅<9.91,1,0);CCT:=DYNAINFO(8);PPP:= FILTER(CCT=0,500) ;DRAWTEXT(PPP,45,'★今日该股票未开盘,不能分析★'),COLORFF00FF;TDSA:=5+3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA( (C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);TDSB:=IF(TA=1 AND TDSA=105,70,TDSA);WH:=TDSB;WE:=FILTER(WH>90,16);TDCJ:=(7*SMA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1)-3 *SMA(SMA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1),3, 1),2,1)),COLORFF9933;WL:=TDCJ;VM1:=(C*2+H+L)/4*10;VM2:=EMA(VM1,13)-EMA(VM1,34);VM3:=EMA(VM2,5);VM4:=2*(VM2-VM3)*5.5;A:=EMA(WINNER(CLOSE),10);B:=EMA(WINNER(CLOSE),34);BA:=100*(CLOSE-REF(CLOSE,12))/REF(CLOSE,12);BD:=MA(ROC,6)*100;VAR67:=(LOW+HIGH+CLOSE)/3;VAR80:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,3,0);VAR81:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR83:=ZIG(3,22)>REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)<=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR82:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR84:=ZIG(3,22)<REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)>=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR85:=ZIG(3,51)>REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)<=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR87:=ZIG(3,72)>REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)<=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VARF:=100-3*SMA((CLOSE-LLV(LOW,65))/(HHV(HIGH,80)-LLV(LOW,65))*100,20 ,1)+2*SMA(SMA((CLOSE-LLV(LOW,65))/(HHV(HIGH,80)-LLV(LOW,65))*100,20,1 ),15,1);VAR9A:=100-3*SMA((OPEN-LLV(LOW,65))/(HHV(HIGH,80)-LLV(LOW,65))*100,20 ,1)+2*SMA(SMA((OPEN-LLV(LOW,65))/(HHV(HIGH,80)-LLV(LOW,65))*100,20,1) ,15,1);VAR86:=ZIG(3,51)<REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)>=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR88:=ZIG(3,72)<REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)>=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VARX1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);VARX2:=( MA((CLOSE-VARX1)/VARX1,1));NN1:=VAR80;VARM1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;VARM2:=SMA(VARM1,3,1);NN2:=(VAR81+VAR83+VAR85+VAR87);MM1:=(VAR82+VAR84+VAR86+VAR88);MM2:= IF(MM1>0,-500,0);MM:= IF(C>1000,MM2*100,MM2),COLORRED,LINETHICK3;CT:=SUM(MM,0) AND T1=1;{统计}CL1:=EMA(IF(WH<15 AND WL<5 AND OK<55 AND L<=LLV(L,27),SMA(ABS(L-REF(L,1)),27,1)/SMA(MAX(L-REF(L,1),0),27,1),0),3) *100;CL2:=IF(CL1>80,80,CL1);CHH1:=SUM(WE OR CL2,0);CHH:=IF(CT=0 AND CHH1>110,110,CHH1);五指山:TDSB,COLORFF00FF;VAS1:=(2*C+H+L)/4;VAS2:=LLV(L,34);VAS3:=HHV(H,34);AAD:=MA(CLOSE,32);BAD:=MA(CLOSE,12);DDD:=CROSS(B,A);RSVR:= (CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR1:=HHV(HIGH,9)-LLV(LOW,9);VAR2:=HHV(HIGH,9)-CLOSE;VAR4:=VAR2/VAR1*100-70;VAR6:=(2*CLOSE+HIGH+LOW)/4;VAR8:=LLV(LOW,34);VAR11:=HHV(HIGH,34);VAR12:=EMA((VAR6-VAR8)/(VAR11-VAR8)*100,13);VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,2);万泉河:VAR12,COLORGREEN;{STICKLINE(VAR12-VAR13>0,VAR12,VAR13,10,0),COLORRED;STICKLINE(VAR12-VAR13<0,VAR12,VAR13,10,0),COLORGREEN;}RSV1:=(CLOSE-LLV(LOW,35))/(HHV(HIGH,35)-LLV(LOW,35))*100;K1:=SMA(RSV1,8,1);D1:=SMA(K1,8,1);资金流:D1,,NODRAW;STICKLINE(EMA(D1,3)>REF(EMA(D1,3),1) ,EMA(D1,3) ,REF(EMA(D1,3),1) ,11 ,0),COLORRED;STICKLINE(EMA(D1,3)<REF(EMA(D1,3),1) ,EMA(D1,3) ,REF(EMA(D1,3),1) ,11 ,0 ),COLORCYAN;KA1:=SMA(RSVR,8,1);DA1:=SMA(KA1,8,1);TDFZ:=DA1;波浪:=(7*SMA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1)-3*SMA(S MA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1),3,1)-SMA(SM A(SMA((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*30,4,1),3,1),2,1 )),COLORFF9933;VARM3:=SMA(VARM2,3,1);VARM4:=SMA(VARM3,3,1);AAC:=MA(C,1);BBB:=MA(AAD,2);VAR51:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80;BBC:=SMA(VAR51,7,1);SMX:=EMA(C,65)/EMA(REF(C,65),65)*10;VAR68:=(VAR67-MA(VAR67,14))/(0.015*AVEDEV(VAR67,14));WR30:=100*(HHV(HIGH,79)-CLOSE)/(HHV(HIGH,79)-LLV(LOW,79));VAR21:=(2*CLOSE+HIGH+LOW+OPEN)/5;VAR22:=LLV(LOW,34);VAR23:=HHV(HIGH,34);CC:=EMA(C,11)/EMA(REF(C,11),11)*10;W1:=WL/10;W2:=REF(WL,1)/10;SK1:=EMA((VAR21-VAR22)/(VAR23-VAR22)*100,13);WR31:=IF(WR30=0 OR SK1>=90 OR VAR68>-250,100,WR30);VAR1Z:=REF(CLOSE,1);VAR2Z:=SMA(MAX(CLOSE-VAR1Z,0),7,1)/SMA(ABS(CLOSE-VAR1Z),7,1)*100; VAR3Z:=SMA(MAX(CLOSE-VAR1Z,0),13,1)/SMA(ABS(CLOSE-VAR1Z),13,1)*100; VAR4Z:=SMA(MAX(VAR1Z-CLOSE,0),7,1)/SMA(ABS(CLOSE-VAR1Z),7,1)*100; VAR5Z:=SMA(MAX(VAR1Z-CLOSE,0),13,1)/SMA(ABS(CLOSE-VAR1Z),13,1)*100; VAR6Z:=BARSCOUNT(CLOSE);小舟:IF(CK=1 AND OK<30 AND NN1>0 ORNN2>0 ,35,DRAWNULL)*2,STICK,COLORMAGENTA,LINETHICK2;{LH1:=EMA(IF(CT=0 AND T2=1 AND WH<35 AND WL<6 AND OK<65 AND L<=LLV(L,30),SMA(ABS(L-REF(L,1)),30,1)/SMA(MAX(L-REF(L,1),0),30,1),0),3) *80;LH2:=IF(CT=1,EMA(IF(T2=1 AND WH<35 AND WL<6 AND OK<55 AND ZJL<-5 AND L<= LLV(L,30),SMA(ABS(L-REF(L,1)),30,1)/SMA(MAX(L-REF(L,1),0),30,1),0),3) *80,LH1 );}LH2:=EMA(IF(WL<35 AND T4=1 AND L<=LLV(L,30),SMA(ABS(L-REF(L,1)),30,1)/SMA(MAX(L-REF(L,1),0),30,1),0),3) *30,STICK,COLORYELLOW,LINETHICK2;LH:=IF(LH2>80,80,LH2);LHH:=SUM(LH,0);浪花:LH,STICK,COLORYELLOW,LINETHICK2;VAR2A:=VARF<REF(VAR9A,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1); NC1:=CT=0 AND CROSS(WL,TDFZ);NC2:=WH>25 AND WH<55 AND WL > MA(REF(WL,5),5) AND CT=0 AND T2=1 AND 涨幅<7;VARSA1:=REF(CLOSE,1);VARSA2:=SMA(MAX(CLOSE-VARSA1,0),7,1)/SMA(ABS(CLOSE-VARSA1),7,1)*100; VARSA3:=SMA(MAX(CLOSE-VARSA1,0),13,1)/SMA(ABS(CLOSE-VARSA1),13,1)*100 ;VARC:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3));KZ:=CT=0 AND VARC=1;CH:=SUM(KZ,0) AND T1=1;{统计}P1:= FILTER(KZ=1,16) ;DRAWTEXT(FILTER(KZ=1,16)=1,55,'←看涨!'),COLORMAGENTA,LINETHICK2; STICKLINE(FILTER(KZ=1,16)=1,0,75,1,0),LINETHICK1,COLORMAGENTA; STICKLINE(FILTER(P1=1,45)=1,0,30,10,0),LINETHICK1,COLORMAGENTA; DRAWICON(FILTER(KZ=1,240)=1,8,5);EE:=EMA(C,150)/EMA(REF(C,150),150)*10;HH:=IF(EE>REF(EE,1),1,0);HS1:=CROSS(EE,SMX) AND EE>CC AND SMX>CC AND HH=1;HS:=SUM(HS1,0) AND T1=1;{统计}DRAWTEXT(CT=0 AND T1=1 AND VAR2A AND COUNT(VAR2A,132)=1,30,'←挖金矿?'),LINETHICK1,COLOR00FF33;STICKLINE(CT=0 AND T1=1 AND VAR2A ANDCOUNT(VAR2A,132)=1,0,85,1,0),COLOR00FF33;DRAWICON(CT=0 AND T1=1 AND VAR2A AND COUNT(VAR2A,132)=1,-8,1);VAR31:=MA(VOL,5)>MA(VOL,60);DDS1:= T1=1 AND CROSS(CC+0.01,SMX) AND WH<70 OR WH<70 AND T1=1 AND CROSS(CC+0.01,EE);DDS2:= T1=1 AND CROSS(EE+0.01,SMX-0.01) AND WH<70;DRAWTEXT(FILTER(DDS1=1 OR DDS2=1,32)=1,30,'←挖金矿?'),LINETHICK1,COLOR00FF33;STICKLINE(FILTER(DDS1=1 ORDDS2=1,32)=1,0,85,1,0),COLOR00FF33,LINETHICK2;DRAWICON(FILTER(DDS1=1 OR DDS2=1,32)=1,-8,1);BM:=EMA(C,2);SM:=EMA(SLOPE(C,21)*20+C,42);BUA:=JS<=-10 AND WL<5 AND ZJL<0 AND CCT>0 AND T1=1 AND CT=0;BUB:=JS<0 AND WL<0 AND CCT>0 AND WH<=0 AND T3=1 AND CT=0;SEL:=CROSS(SM,BM) AND WH>90;JDD:=EMA(CLOSE,144), COLORBLUE,LINETHICK2;VAR2C:=MA(3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5, 1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1), 3,1),5)*100;VAR2D:=5;VAR2E:=CROSS(VAR2C,VAR2D);DX:=IF(VAR2E AND CLOSE<JDD,1,0),LINETHICK0,COLORYELLOW;DCT:=SUM(DX,0);VARM6:=CC>SMX AND CC>EE AND CROSS(VARM3,VARM4) AND VARM3<30 AND T1=1 AND CCT >0 AND 涨幅<8;VARM7:=WH>70 AND T4=1 AND CROSS(SMX,CC) AND 涨幅<9.9 OR WH>80 AND T4=1 AND CROSS(EE,SMX) OR WH>80 AND T4=1 AND CROSS(VARM4,VARM3) AND VARM3>80 AND CCT>0 AND 涨幅<9.9;VM5:=IF(VM4>=0,VM4,0),COLORFF00FF;VM6:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);VM7:=EMA(VM6,5);VM8:=(VM7-REF(VM7,3))/REF(VM7,3)*100;VARSB1:=SMA(MAX(VARSA1-CLOSE,0),7,1)/SMA(ABS(CLOSE-VARSA1),7,1)*100; VARSB2:=SMA(MAX(VARSA1-CLOSE,0),13,1)/SMA(ABS(CLOSE-VARSA1),13,1)*100 ;VARSB3:=BARSCOUNT(CLOSE);DESY:=100*(HHV(HIGH,33)-CLOSE)/(HHV(HIGH,33)-LLV(LOW,33))*100; HYJD:=(T4=1 AND DA1<35 AND VARSA2<25 AND VARSA3<30 AND VARSB3>35)*65, STICK,COLORYELLOW;CA:=CT=1 AND T13=1 AND 涨幅<9.8;DDC:='★提醒:后市看跌↓当心';DRAWTEXT(FILTER(CA=1,360)=1,50,DDC),COLORGREEN;DRAWTEXT(FILTER(CA=1,360)=1,90,' 逃?'),LINETHICK1,COLORGREEN; DRAWICON(FILTER(CA=1,360)=1,90,15);STICKLINE(FILTER(CA=1,360)=1,0,80,1,0),LINETHICK1,COLORYELLOW;波峰:= (CH=0 AND VARSB1<25 AND VARSB2<30 AND VARSB3>35)*100,COLORGREEN;OUT:=波峰;SSV1:=(2*CLOSE+HIGH+LOW)/4;SSV2:=LLV(LOW,34);SSV3:=HHV(HIGH,34);SSVA:=EMA((SSV1-SSV2)/(SSV3-SSV2)*100,12);SSVB:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);TDBV:=CROSS(SSVB,SSVA) AND SSVA<30 AND WH<5 AND WL<25 AND CK=1; VARV1:=(C*2+H+L)/4*10;VARV2:=EMA(VARV1,13)-EMA(VARV1,34);VARV3:=EMA(VARV2,5);VARV4:=2*(VARV2-VARV3)*5.5;VARR1:= IF(VARV4<=0,VARV4,0),COLORBLUE;VARR2:=IF(VARV4>=0,VARV4,0),COLORFF00FF;VARV5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8; VARV6:=EMA(3*VARV5-2*SMA(VARV5,18,1),5);VARV7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10; VARV8:=(INDEXC*2+INDEXH+INDEXL)/4;VARV9:=EMA(VARV8,13)-EMA(VARV8,34);VARVA:=EMA(VARV9,3);VARVB:=(VARV9-VARVA)/2;VARR3:=IF(VARVB>=0,VARVB,0),COLORRED;VARR4:=IF(VARVB<=0,VARVB,0),COLORGREEN;V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);QSX:=WH;VARH:=(QSX-REF(QSX,1))/REF(QSX,1)*100;AA:=(QSX<=13) AND FILTER((QSX<=13),15);TDE:=FILTER(QSX>90,16);TDAA:=IF( TT=1 AND TDE=1,REF(TDE,1),TDE);FFJ:=TDAA;TDC:=GBD=0 AND CT=1 AND T9=1 AND TDAA AND ZJL>70 AND 涨幅<9.9; TDA:=STICKLINE(FILTER( QSX<=13 AND VARH>13,60)=1,0,100,1,0);TDS:=IF(TT=1 AND TDE=1,REF(TDA,1),TDA);TDW:=TDS;SWEE:= STICKLINE(FILTER(VARM7=1,16)=1,70,90,1,0);DUP:=ZJL>80 AND WH>=99.4 AND WL>=89 AND CK=1 AND CCT>0 AND T1=1 AND 涨幅<8;BBAA:=WL<15 AND WH<25 AND TDS=1 AND T1=1 AND CT=0 AND TDW;BBA:= DA1<35 AND CROSS(WH,WL) AND (QSX<=13 AND VARH>13) ANDFILTER((QSX<=13 AND VARH>13),10) ;DD2:=CROSS(QSX,WL) AND WH<10;DD5:= WL<15 AND WH<20 AND CROSS(ABS(GG),ABS(GGJX*1.15)) ANDABS(GG)>ABS(GGJX*1.15);VBB:=WH<5 AND WL<0 AND OK<35 AND T3=1 {AND VM7<13 AND VM8>13} AND CT=1 AND 涨幅<7;SSW:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2* SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1), COLOR00FFFF;{BUC:=IF(CT=0 AND T2=1 AND WH<50 AND WL<15 AND JS<=-10 ANDCROSS(SSW,1),1,0);}BUD:=IF(CT=1 AND T2=1 AND WH<=0 AND WL<0 AND JS<=-20 ANDCROSS(SSW,1),1,0);BUE:=JS<=-20 AND WH>=85 AND WL<=10 AND OK<50 AND T2=1;TDBA:=T2=1 AND CK=1 AND LHH=0 AND ZJL>78 AND OK<90 AND WH>95 AND CCT>0 AND 涨幅<9.9;TDBB:=JS>=110 AND WH>=110 AND WL>90 AND OK>=94 AND CCT>0 AND 涨幅<9.9; TDP:=ZJL>79 AND LHH=0 AND OK<90 AND IF(A>0.90 ANDCLOSE<MA(CLOSE,5),1,0)*1 AND 涨幅<9.9;TDQ:=JS>=110 AND WH>=110 AND OK>60 AND CCT>0 AND T1=1 AND 涨幅<9.9; TDJ:=JS>=110 AND WH>95 AND WL>95 AND OK>95 AND ZJL>59 AND T1=1 AND CCT>0 AND 涨幅<9.9;TDF:=JS>=100 AND WH>=100 AND WL>=85 AND OK>=65 AND 涨幅<9.9;TDB:=TDAA AND JS>=100 AND WH>100 AND OK>85 AND T1=1 AND CCT>0 AND 涨幅<9.9;界:STICKLINE(CK=1 AND WH>=95 AND WH>REF(WH,1),87,94,2,0),COLORYELLOW; DRAWICON(FILTER(TDBA =1,8)=1,97,2);DRAWICON(FILTER(TDBB =1,8)=1,97,2);DRAWICON(FILTER(TDC =1,8)=1,97,2);DRAWICON(FILTER(TDJ =1,8)=1,97,2);DRAWICON(FILTER(TDB =1,8)=1,97,2);DRAWICON(FILTER(TDP =1,64)=1,97,2);DRAWICON(FILTER(TDQ=1,8)=1,97,2);DRAWICON(FILTER(TDF=1,8)=1,97,2);DRAWICON(TDBV,-8,1);DRAWICON(FILTER( BBAA=1,16)=1,-8,1);DRAWICON(FILTER(DD5=1 AND CT=0 AND T7=1 AND 涨幅<7,64)=1,-8,1);{DRAWICON(FILTER(VBB=1,8)=1,-8,1);DRAWICON(BUA,-8,1);DRAWICON(FILTER(BUE=1,16)=1,-8,1);}{STICKLINE(FILTER(BUA=1,16)=1,0,65,20,0),COLORRED,LINETHICK1;}STICKLINE(FILTER(BUB=1,32)=1,0,65,1,0),LINETHICK1,COLORYELLOW; STICKLINE(FILTER(BUE=1,16)=1,0,65,1,0),LINETHICK3,COLORYELLOW; DRAWTEXT(FILTER(OUT=100 ,32)=1,93,' ←逃顶'),LINETHICK1,COLORYELLOW; DRAWTEXT(WH>80 AND OK>76 AND T1=1 AND CROSS(K89,K2),93,'逃顶'),LINETHICK1,COLORYELLOW;警戒:85,POINTDOT,COLORGREEN;{-20,POINTDOT,COLORGREEN;};【通达信】分时操盘手(涨幅、大趋势、资金流、逃顶)-指标公式效果图(文档来源:若水财经社区)。
通达信MACD趋势主图指标公式
通达信MACD趋势主图指标公式DRAWGBK(C>0, RGB(0,0,00),RGB(0,0,0),0,'W20',0);DRAWKLINE(H,O,L,C);QWX1:=HHV(CLOSE,30);QWX2:=LLV(CLOSE,30);QWX3:=CONST((QWX1+QWX2)/2);QWX4:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);QWX5:=CONST((1-7/100)*(DMA(CLOSE,QWX4)));QWX6:=CONST((1+7/100)*(DMA(CLOSE,QWX4)));{KDJ}RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;KX:=SMA(RSV,3,1);DX:=SMA(KX,3,1);JX:=3*KX-2*DX;{MACD}DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*2+QWX3,COLORWHITE;DEA:=EMA(DIF,9),COLORYELLOW;MACD:(DIF-DEA)*5+QWX3,COLORYELLOW,LINETHICK2;DRAWBAND(MACD,RGB(120,0,100),QWX3,RGB(60,100,50));DRAWKLINE(HIGH,OPEN,LOW,CLOSE);牛熊线:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2,LINETHICK2,COLORRE D;M5:MA(CLOSE,5),COLORWHITE,DOTLINE;IF(MA(C,5)>=REF(MA(C,5),1),MA(C,5),DRAWNULL),COLORYE LLOW,LINETHICK3;M10:MA(CLOSE,10),COLORYELLOW,DOTLINE;IF(MA(C,10)>=REF(MA(C,10),1),MA(C,10),DRAWNULL),COLO R330099,LINETHICK2;M20:MA(CLOSE,20),COLORFF00FF;IF(MA(C,20)>=REF(MA(C,20),1),MA(C,20),DRAWNULL),COLO RLIMAGENTA,LINETHICK2;M60:MA(CLOSE,60),COLOR6699CC;IF(MA(C,60)>=REF(MA(C,60),1),MA(C,60),DRAWNULL),CIRCL EDOT,LINETHICK2;M120:MA(CLOSE,120),COLORLIBLUE,DOTLINE;M250:MA(CLOSE,250),COLORMAGENTA,DOTLINE;VAR1:=IF(CLOSE>OPEN,CLOSE,OPEN);VAR2:=MEMA(CLOSE,5);VAR3:=ATAN((VAR2/REF(VAR2,1)-1)*100);VAR4:=IF(VAR3>0,VAR3,VAR3);VAR5:=(CLOSE/REF(CLOSE,1)-1)*100;VAR6:=VAR5<1.5 AND VAR5>-1.5;今日之升★:LAST(VAR6,4,1) AND V AR5>2 AND VOL>REF(VOL,1),NODRAW,COLORYELLOW;DRAWTEXT(今日之升★,L/1.01,'★'),COLORYELLOW;强势:IF(VAR4>=REF(VAR4,1) AND VAR4>=0,M10,DRAWNULL),COLORRED,LINETHICK2;整理:IF(VAR4<REF(VAR4,1) AND VAR4>0,M10,DRAWNULL),COLORGREEN,LINETHICK2;支撑:IF(PERIOD=5,IF(BARSLAST(CURRBARSCOUNT=5),QWX5,DRA WNULL),DRAWNULL),COLORCYAN;阻力:IF(PERIOD=5,IF(BARSLAST(CURRBARSCOUNT=5),QWX6,DRA WNULL),DRAWNULL),COLORYELLOW;N:=120;K:=BARSLAST(CURRBARSCOUNT=N);GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));{高点}DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));{低点}KJ:=GD-DD;{高低点差值=分区高度}GD4:IF(CURRBARSCOUNT<=N/30,GD,DRAWNULL);底:IF(CURRBARSCOUNT<=N/30,DD,DRAWNULL),COLORFFF F00;高:IF(CURRBARSCOUNT<=N/30,GD,DRAWNULL),COLOR00F FFF;撑:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.191,DRAWNULL), COLOR00FFFF;强: IF(CURRBARSCOUNT<=N/30,DD+KJ*0.382,DRAWNULL),COLOR FF00FF;突破:IF(CURRBARSCOUNT<=N/30,DD+KJ/2,DRAWNULL),COLOR0 000FF;警示:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.618,DRAWNULL),COL OR00FFFF;压力:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.809,DRAWNULL),COL OR00FF00;低涨:IF(CURRBARSCOUNT<=N/30,(C/LLV(LOW,K)-1)*100,DRAWNULL),COLOR0000FF,NODRAW;天数:BARSLAST(L=DD),COLORCYAN,NODRAW;今日保护价:(REF(C,2)+REF(C,1)+O)/3 ,COLORCC3299,NODRAW;顶点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,HHV(H,BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED, DOTLINE;低点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L,BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORYELL OW,DOTLINE;STICKLINE(CCI>=200 AND H>=顶点,O,C,3,0),COLORBLUE;STICKLINE(CCI<=100 AND L<=低点,O,C,3,0),COLORYELLOW;DRAWBAND(高,RGB(200,200,0),压力,RGB(0,0,0));DRAWBAND(压力,RGB(0,190,0),警示,RGB(0,0,0));DRAWBAND(警示,RGB(220,120,0),突破,RGB(0,0,0));DRAWBAND(突破,RGB(120,0,120),强势,RGB(0,0,0));DRAWBAND(强势,RGB(120, 0,0),支撑,RGB(0,0,0));DRAWBAND(支撑,RGB(80,80,80),底,RGB(0,0,0));STICKLINE(CURRBARSCOUNT=N/30,GD,DD,0,0),COLORGRE EN;STICKLINE(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;STICKLINE(CURRBARSCOUNT<=N/30,支撑,支撑,4,0),COLORFF00FF;STICKLINE(CURRBARSCOUNT<=N/30,强势,强势,4,0),COLORFF00FF;STICKLINE(CURRBARSCOUNT<=N/30,突破,突破,4,0),COLORABABAB;STICKLINE(CURRBARSCOUNT<=N/30,警示,警示,4,0),COLOR00FFFF;STICKLINE(CURRBARSCOUNT<=N/30,压力,压力,4,0),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=1,压力,'0.809'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=1,警示,'0.618'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=1,突破,'0.500'),COLORFFFFFF;DRAWTEXT(CURRBARSCOUNT=1,强势,'0.382'),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=1,支撑,'0.191'),COLOR00FFFF;{柱型显示}STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;{蓝}STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF7700;STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.2,0),COLORFF990 0;STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),COLORFFBB0 0;STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.5,0),COLORCYAN;{红}STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;{绿}STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,3,0) ,COLOR009900;STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,2.2, 0),COLOR00BB00;STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,1.5,0),COLOR00DD00;STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,0.5, 0),COLOR00FF00;{灰}STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,3,0 ),COLOR999999;STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,2.2 ,0),COLORBBBBBB;STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,1.5 ,0),COLORDDDDDD;STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,0.5 ,0),COLORFFFFFF;STICKLINE(CROSS(JX,DX),OPEN,CLOSE,0.5,0),COLORYELLOW;STICKLINE(CROSS(DX,JX),OPEN,CLOSE,0.5,0),{COLOR000099 }COLORBLACK;超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);大宗进:=(超B)+(大B),NODRAW;大宗出:=(超S)+(大S),NODRAW;非大宗进:=(中B)+(小B),NODRAW;非大宗出:=(中S)+(小S),NODRAW;大宗进限制:=IF((超B+大B)=0,0,大宗进);大宗出限制:=IF((超S+大S)=0,0,大宗出);非大宗进限制:=IF(中B+小B=0,0,非大宗进);非大宗出限制:=IF(中S+小S=0,0,非大宗出);主力净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;散户净流入:=(中B+小B)-(中S+小S),COLORRED,NODRAW;净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),COLORRED,NODRAW;大单流入:=(超B+大B)/(超B+大B+超S+大S)*100,NODRAW;大单流入限制:=IF((超B+大B+超S+大S)=0,0,大单流入);大单流出比:=(超S+大S)/(超B+大B+超S+大S)*100,NODRAW;大单流出限制:=IF((超B+大B+超S+大S)=0,0,大单流出比);总流入比:=(超B+大B+中B+小B)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;总流出比:=(超S+大S+中S+小S)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;成交总量:=(超B+大B+中B+小B+超S+大S+中S+小S),NODRAW;机构参与度:=(超B+超S+大B+大S)/成交总量*100,COLORYELLOW,NODRAW;大单强度:=(超B+大B-超S-大S)/成交总量*100,COLORYELLOW,NODRAW;大单强度限制:=IF(大单强度=0,-100,大单强度);大单强度比:=IF(大单强度>=0,(大单强度限制+100)/2,100-ABS((大单强度限制-100)/2)),NODRAW;超单强度:=(超B-超S)/(超B+超S)*100,COLORYELLOW,NODRAW;超单强度限制:=IF(超单强度=0,-100,超单强度);超单强度比:=IF(超单强度>0,(超单强度限制+100)/2,IF(超单强度<0,100-ABS((超单强度限制-100)/2),0)),NODRAW;DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗进>0),RGB(250,125,0),RGB(25,150,250)));DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(25,150,250),RGB(250,125,0)));DRAWRECTREL(102,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,132,950,IF(CONST(非大宗进>0),RGB(250,125,0),RGB(25,150,250)));DRAWRECTREL(134,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,164,950,IF(CONST(非大宗出>0),RGB(25,150,250),RGB(250,125,0)));DRAWRECTREL(204,CONST(950-(ABS(净流入)*250/DAZHIV))-20,234,950,IF(CONST(净流入>0),RGB(200,0,0),RGB(0,125,50)));DRAWTEXT_FIX(1,0.00,0.95,0,STRCAT(STRCAT('主力',CON2STR(主力净流入,0)),'万')),COLORMAGENTA;DRAWTEXT_FIX(1,0.10,0.95,0,STRCAT(STRCAT('散户',CON2STR(散户净流入,0)),'万')),COLORCYAN;DRAWTEXT_FIX(1,0.20,0.95,0,STRCAT(STRCAT('净流入',CON2STR(净流入,0)),'万')),COLORYELLOW;主买A:=ACTINVOL,COLORRED,NODRAW;主卖A:=ACTOUTVOL,COLORGREEN,NODRAW;主买:=主买A*100/(主买A+主卖A),NODRAW,COLORRED;主卖:=主卖A*100/(主买A+主卖A),NODRAW,COLORGREEN;大单买比:=LARGEINTRDVOL*100/(LARGEINTRDVOL+LARGEOUTTRDV OL);大单卖比:=LARGEOUTTRDVOL*100/(LARGEINTRDVOL+LARGEOUTTRD VOL);主力净买量:=(LARGEINTRDVOL-LARGEOUTTRDVOL),COLORYELLOW,NODRAW;主动买卖差:=(ACTINVOL-ACTOUTVOL),COLORMAGENTA,NODRAW;主力资金差:=((L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1)))/10000,COLORCYAN,NODRAW;主力买力度:=LARGEINTRDVOL*100/VOL;主力卖力度:=LARGEOUTTRDVOL*100/VOL;主买力度比:=主力买力度/(主力买力度+主力卖力度)*100,NODRAW;主卖力度比:=主力卖力度/(主力买力度+主力卖力度)*100,NODRAW;力度比限制:=IF((LARGEINTRDVOL+LARGEOUTTRDVOL)=0,0,大单买比);JGV:=(L2_VOL(0,0) - L2_VOL(0,1))*VOL/100000000,COLORRED;DHV:=(L2_VOL(1,0) - L2_VOL(1,1))*VOL/100000000,COLORFF00FF;ZHV:=(L2_VOL(2,0) - L2_VOL(2,1))*VOL/100000000,COLOR00FFFF;SHV:=(L2_VOL(3,0) - L2_VOL(3,1))*VOL/100000000,COLORFFFFFF;NOTEXT大量动向:=MA((JGV+DHV),5),COLORYELLOW;超级大量:=JGV,COLOR0000FF,NODRAW;机构大量:=DHV,COLORMAGENTA,NODRAW;大量博弈:=(JGV+DHV),COLORYELLOW,NODRAW;小量博弈:=(ZHV+SHV),COLORWHITE,NODRAW;大量资金比:=大量博弈/(ABS(JGV)+ABS(DHV)+ABS(ZHV)+ABS(SHV))*100,COLORYELLO W,NODRAW;大量资金比限制:=IF(大量资金比=0,-100,大量资金比);大量强度比:=IF(大量资金比>0,(大量资金比限制+100)/2,IF(大量资金比<0,100-ABS((大量资金比限制-100)/2),0)),COLORGREEN,NODRAW;小量资金比:=小量博弈/(ABS(JGV)+ABS(DHV)+ABS(ZHV)+ABS(SHV))*100,COLORYELLO W,NODRAW;小量强度比:=IF(小量资金比>=0,(小量资金比+100)/2,100-ABS((小量资金比-100)/2)),COLORCYAN,NODRAW;MVR:=REF(MA(V,5),1);FVR:=REF(V,1);PVR:=(MVR+FVR)/2;量能比:=V/(V+PVR)*100/FROMOPEN*240;{量能饱和度}SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));【量能饱和】:=IF(SAT>1,1,SAT)*100,COLORYELLOW,NODRAW;{活跃度}LC:=REF(CLOSE,1);RSI5:=(SMA(MAX(CLOSE-LC,0),3,1))/(SMA(ABS(CLOSE-LC),3,1))*100;WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;活跃度:=(RSI5-WR10),COLORFFFF00,LINETHICK1,NODRAW;活跃度比:=IF(活跃度>=0,(活跃度+100)/2,100-ABS((活跃度-100)/2));DRAWRECTREL(80,0,240,40,RGB(0,75,200));DRAWRECTREL(80,0,160,40,RGB(0,250,50));DRAWRECTREL(80,0,80+CONST(力度比限制*160/100),40,RGB(200,0,50));DRAWTEXT_FIX(1,0.00,0.00,0,STRCAT(STRCAT('买卖力度比',CON2STR(大单买比,2)),'%买')),COLORYELLOW;DRAWTEXT_FIX(1,0.33,0.00,0,STRCAT(STRCAT('',CON2STR(大单卖比,2)),'%卖')),COLORGREEN;DRAWRECTREL(80,50,240,90,RGB(0,100,0));DRAWRECTREL(80,50,160,90,RGB(0,250,50));DRAWRECTREL(80,50,80+CONST(大量强度比*160/100),90,RGB(175,50,250));DRAWTEXT_FIX(1,0.00,0.05,0,STRCAT(STRCAT('大量强度比',CON2STR(大量强度比,2)),'%买')),COLORYELLOW;DRAWRECTREL(330,0,490,40,RGB(0,75,200));DRAWRECTREL(330,0,410,40,RGB(0,250,50));DRAWRECTREL(330,0,330+CONST(主买*160/100),40,RGB(175,50,250));DRAWTEXT_FIX(1,0.25,0.00,0,STRCAT(STRCAT('主动买卖比',CON2STR(主买,2)),' %')),COLORYELLOW;{DRAWTEXT_FIX(1,0.33,0.10,0,STRCAT(STRCAT('',CON2STR(主卖,2)),'%卖')),COLORGREEN;}DRAWRECTREL(330,50,490,90,RGB(0,100,0));DRAWRECTREL(330,50,410,90,RGB(0,250,50));。
MACD看透主力更新版通达信指标公式源码
MACD看透主力更新版通达信指标公式源码在通达信中使用MACD指标,需要使用到三个参数:短期EMA (Exponential Moving Average)、长期EMA以及MACD线。
以下是MACD 指标的通达信源码公式:
```text
0:=REF(CLOSE,1);
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26));
DEA:=EMA(DIF,9);
BAR:=(DIF-DEA)*2;
```
解析:
1.首先,使用REF函数将昨日的收盘价保存在变量0中。
2.然后,计算短期EMA:使用EMA函数计算收盘价的12日EMA线,保存在变量DIF中。
3.接着,计算长期EMA:使用EMA函数计算收盘价的26日EMA线,并且将其保存在变量DEA中。
4.最后,计算MACD线:将DIF减去DEA,并将差值乘以2,保存在变量BAR中。
以上是MACD指标的通达信源码公式,可在通达信软件中直接使用。
通达信全新MACD指标公式
通达信全新MACD指标公式
{指标介绍:红色表示MACD在0轴以上的上攻趋势形成。黄色表示MACD在0轴以上开始回落。紫色表示MACD在0轴以下底部启动。绿色表示MACD在0轴以下下跌趋势。}
DIF:=Ema(CLOSE,12)-EMA(CLOSE,26),LINETHICK2;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,MACD,REF(MACD,1),0.1,0),COLOR00FF00;
DEA:=EMA(DIF,6),LINETHICK2;
macd:(DIF-DEA)*2,COLORstICK;
DRAWBAND(DIF,RGB(255,255,0),RGB(0,255,0));
STICKLINE(MacD>REF(MACD,1),MACD,REF(MACD,1),2,0),COLOR000080;
STICKLINE(MACD>REF(MACD,1),MACD,REF(MACD,1),0.1,0),COLOR0000FF;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,MACD,REF(MACD,1),2,0),COLOR8C008C;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,MACD,REF(MACD,1),0.1,0),COLORFF00FF;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,MACD,REF(MACD,1),2,0),COLOR009D9D;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,MACD,REF(MACD,1),0.1,0),COLOR00FFFF;
【股票指标公式下载】-【通达信】主力趋势(信号、走势)
【通达信】主力趋势(信号、走势)-指标公式源码VAR2:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR3:=SMA(VAR2,5,1);VAR4:=REF(VAR3,1);VAR5:=SMA(VAR3,10,1);VAR6:=(HHV(HIGH,52)-CLOSE)/(HHV(HIGH,52)-LLV(LOW,52))*100;VAR7:=MA(VAR6,5);VAR8:=LLV(LOW,5)=LLV(LOW,120);VAR9:=REF(CLOSE,1);VARA:=SMA(MAX(CLOSE-VAR9,0),6,1)/SMA(ABS(CLOSE-VAR9),6,1)*100; VARB:=SMA(MAX(CLOSE-VAR9,0),12,1)/SMA(ABS(CLOSE-VAR9),12,1)*100; VARC:=(CLOSE+LOW+HIGH)/3;VARD:=SUM((VARC-REF(LOW,1)-(HIGH-VARC))*VOL/100000/(HIGH-LOW),0); VARE:=EMA(VARD,1);VARF:=VARE; VAR10:=MA(VARE,12);VAR11:=MA(VARE,26); VAR12:=(VARF-VAR10)*60;VAR13:=IF(VAR12>0.05,VAR12,0);VAR14:=IF(VAR13>50,50,VAR13);VAR15:=CAPITAL/EMA(VOL,5)/30*1.1;VAR16:=VAR15; VAR17:=EMA(COST(85),10);VAR18:=EMA(COST(1),10);VAR19:=EMA(CLOSE,10);VAR1A:=(VAR19-VAR18)*100/(VAR17-VAR18);VAR1B:=REF(VAR1A,1);VAR1C:=(CLOSE-REF(CLOSE,12))/REF(CLOSE,12)*100;VAR1D:=(INDEXC-REF(INDEXC,12))/REF(INDEXC,12)*100;VAR1E:=EMA(VAR1C-VAR1D,4);VAR1F:=EMA(VAR1D-VAR1C,4);STICKLINE(VAR1E>0,0,-5,6,0),COLORBLUE;STICKLINE(VAR8,-5,-10,6,0),COLORYELLOW;VAR20:=MA(VAR1C,4);VAR21:=MA(VAR1C,8);VAR22:=REF(VAR20,1);VAR23:=MA((VAR1A-REF(VAR1A,12))/REF(VAR1A,12)*100,4);VAR24:=IF(VAR23<=-20,-20,VAR23);VAR25:=IF(VAR24>=20,20,VAR24);VAR26:=VAR25;VAR27:=REF(VAR26,1);VAR28:=REF(VAR26,5);VAR29:=IF(CROSS(VAR14,VAR16),1,0);VAR2A:=IF(VAR14<VAR16,-10,10);VAR2B:=IF(VAR1E>VAR1F,5,-5);VAR2C:=IF(VAR3>VAR5,5,-5);VAR2D:=IF(VAR20>VAR21,6,-6);VAR2E:=IF(VAR20>0 AND VAR20>VAR21,8,-8);VAR2F:=IF(VAR26<0,-10,10);VAR30:=IF(VAR20>VAR22,10,-10);VAR31:=IF(VAR26>VAR27,5,0);VAR32:=IF(VAR26<VAR27,-5,0);VAR33:=IF(CLOSE>OPEN,3,-3);走势:(VAR2A+VAR2B+VAR2C+VAR2D+VAR2E+VAR2F+VAR30+VAR31+VAR32+VAR33); VAR34:=REF(CLOSE,2)*0.865;VAR35:=REF(CLOSE,13)*0.772;VAR36:=MIN(VAR34,VAR35);VAR37:=100*VOL/CAPITAL;VAR38:=MA(CLOSE,13);VAR39:=CLOSE>0.899*REF(CLOSE,1) AND CLOSE<0.901*REF(CLOSE,1);VAR3A:=EMA(WINNER(CLOSE)*100,5);VAR3B:=EMA(WINNER(CLOSE)*100,30)-CAPITAL/EMA(VOL,30)/5;VAR3C:=CAPITAL/EMA(VOL,5)/5;VAR3D:=VAR3A;VAR3E:=IF(VAR3D>0,0-VAR3D,0-VAR3D); VAR3F:=REF(VAR3D,1);主力趋势: (VAR3B+50);VAR40:=VAR3B+50; VAR41:=REF(VAR40,1); VAR42:=MA(CLOSE,5);VAR43:=MA(CLOSE,10); VAR44:=MA(CLOSE,30);VAR45:=MA(CLOSE,12);VAR46:=MA(CLOSE,26); VAR47:=REF(VAR45,1); VAR48:=REF(VAR46,1);VAR49:=(VAR45-VAR46)/VAR45*100; VAR4A:=ABS(VAR45-VAR47)/VAR45*100; VAR4B:=REF(VAR46,1); VAR4C:=REF(VAR4A,1);VAR4D:=REF(VAR42,1); VAR4E:=REF(VAR43,1);VAR4F:=COUNT(CLOSE>REF(CLOSE,1),5)/5*100;VAR50:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR51:=SMA(VAR50,5,1);VAR52:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;VAR53:=SMA(VAR52,2,1);VAR54:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30)*8;VAR55:=REF(VAR51,1); VAR56:=REF(VAR53,1);VAR57:=REF(VAR54,1); VAR58:=MA(VAR53,5);VAR59:=MA(VAR53,12); VAR5A:=MA(VAR53,26);VAR5B:=REF(VAR4F,1); VAR5C:=(VAR54-VAR57)/VAR54*100;VAR5D:=SMA(VAR50,5,1); VAR5E:=REF(VAR5D,1); VAR5F:=SMA(VAR52,2,1); VAR60:=REF(VAR5F,1); VAR61:=IF(CLOSE>OPEN,1,0);VAR62:=IF(VAR42>VAR4D,1,0); VAR63:=IF(VAR43>VAR4E,1,0);VAR64:=IF(VAR4A>VAR4C,1,0); VAR65:=IF(VAR53>VAR56,5,0);VAR66:=IF(VAR55>VAR51,5,0); VAR67:=IF(VAR54>VAR57,2,0);VAR68:=IF(VAR49>2.25,10,0); VAR69:=IF(VAR53>60,6,0);VAR6A:=IF(VAR53>80,8,0); VAR6B:=IF(VAR53>VAR51,10,0);VAR6C:=IF(VAR53>VAR51,VAR59-VAR5A,0); VAR6D:=IF(VAR53>VAR51 ANDVAR51<20,5,0); VAR6E:=IF(CLOSE>VAR45 AND VAR45>VAR46,5,0);VAR6F:=IF(VAR45>VAR46,5,0); VAR70:=IF(VAR46>VAR4B,5,0);VAR71:=IF(VAR51<18,VAR58-VAR51,0);VAR72:=IF(VAR51>VAR53 AND VAR51>50,8,0);VAR73:=(VAR61+VAR62+VAR63+VAR64+VAR65+VAR66+VAR67+VAR68+VAR69+VAR6A+V AR6B+VAR6C+VAR6D+VAR6E+VAR6F+VAR70+VAR71-VAR72);VAR74:=REF(VAR73,1); 多头: MA(VAR73,5); VAR75:=MA(VAR73,8);VAR76:=MA(VAR73,12); VAR77:=MA(VAR73,26); VAR78:=MA(VAR73,13);VAR79:=REF(VAR76,1); VAR7A:=REF(VAR76,2);VAR7B:=IF(CROSS(VAR3,VAR5) AND VAR4<35 AND VAR7>50 AND VAR1A<25 AND VAR1A>VAR1B AND VAR41<VAR40 AND (VARA>VARB AND VARB>VAR3 OR VARA>VAR3 AND VAR8),100,0);VAR7C:=IF((CLOSE-VAR36)/CLOSE<0.1 AND VAR41<VAR40 ANDSUM(VAR37,5)/5<1.8,100,0);VAR7D:=IF(CROSS(VAR3,VAR5) AND VAR8 AND VAR3<25 AND VAR1A<20 OR CROSS(VAR3,VAR5) AND VAR8 AND VAR3<40 AND VAR1A<10,100,0);信号: IF(VAR7B=100 OR VAR7C=100 OR VAR7D=100,20,-50),COLORYELLOW; STICKLINE(走势<0,0,走势,1,0),COLORGREEN;STICKLINE(走势>0,走势,0,1,0),COLORRED;【通达信】主力趋势(信号、走势)-指标公式效果图(文档来源:若水财经社区)。
通达信主力状态指标公式
通达信主力状态指标公式{价量线主线快线}价量:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),COLOR00CCFF,NODRAW;主线:(((价量-LLV(价量,27))/(HHV(价量,27)-LLV(价量,27)))*(4))*(25),COLORCYAN,NODRAW;快线:(((价量-LLV(价量,9))/(HHV(价量,9)-LLV(价量,9)))*(4))*(25) ,COLOR55AAFF,NODRAW;RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;K1:=SMA(RSV,3,1);D1:=SMA(K1,3,1);KK:=INTPART(K1);DD:=INTPART(D1);TFXXS:=KK+DD;{变异KD风险系数}TGLXS:=(TFXXS-REF(TFXXS,1));{变异KD乖离系数:资金流向}{红}STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,2.5,0),COLOR0000AA;STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,1.5,0),COLOR0022CC;STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR0055FF;{粉}STICKLINE(TGLXS<0 ANDTGLXS>REF(TGLXS,1),100,TGLXS+100,2.5,0),COLORAA00BB;STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,1.5,0),COLORCC22BB;STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFF55BB;{黄}STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,2.5,0),COLOR00AAFF;STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,1.5,0),COLOR00CCFF;STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR00FFFF;{蓝}STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,2.5,0),COLORFF7700;STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,1.5,0),COLORFFAA22;STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFFFF55;STICKLINE(TGLXS=0 AND REF(TGLXS,1)>=0,100,TGLXS+100,8,0),COLORBROWN;STICKLINE(TGLXS=0 AND REF(TGLXS,1)<0,100,TGLXS+100,8,0),COLORWHITE;ZLCM:=EMA(WINNER(CLOSE)*70,3);{主力筹码估算}SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{散户筹码估算}ZSHTL:=SHCM/(ZLCM+SHCM)*100;{散户套牢筹码系数}ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{主力控盘筹码系数}ZSHJJ:=EMA(ZSHTL,55);{散户警戒}ZZLJJ:=EMA(ZZLKP,55);{主力警戒}散兵坑:IF(ZZLKP<=10,ZZLKP,ZZLKP),COLORMAGENTA,NODRAW;{散户套牢筹码}STICKLINE(C>0,ZSHTL,ZZLKP,2,0),COLOR808080;{散户筹码警戒}STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,2,0),COLORC0C 0C0;{主力控盘筹码}{粉}STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,2.5,0 ),COLORAA00BB;STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,1.5,0 ),COLORCC22BB;STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,0.5,0 ),COLOREE44BB;{蓝}STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,2.5,0 ),COLORFF7700;STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,1.5,0 ),COLORFFAA22;STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,0.5 ,0 ),COLORFFFF55;{亮红}STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,2.5,0 ),COLOR131FFD;STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,1.5,0 ),COLOR5050FF;STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,0.5,0 ),COLOR7E7EFF;{深蓝}STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,2.5,0 ),COLORAA0000;STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,1.5,0 ),COLORCC0000;STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,0.5 ,0 ),COLORFF0000;{主力筹码警戒}{黄}STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,2.5,0 ),COLOR00A AFF;STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,1.5,0 ),COLOR00C CFF;STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,0.5,0 ),COLOR00F FFF;{红}STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ>50,ZZLKP,ZZLJJ,2.5,0 ),COLOR0000AA;STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ>50,ZZLKP,ZZLJJ,1.5,0 ),COLOR0022CC;STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ>50,ZZLKP,ZZLJJ,0.5 ,0 ),COLOR0055FF;{红}STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,2.5,0 ),COLOR0000AA;STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,1.5,0 ),COLOR0022CC;STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,0.5 ,0 ),COLOR0055FF;{铸顶风险区}{绿}STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,2.5,0),COLOR00AA00;STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,1.5,0),COLOR00CC00;STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,0.5,0),COLOR00FF00;{散兵坑}STICKLINE(ZZLKP<=10,ZZLKP,0,5,0),COLORDD00DD;100,COLORGREEN;80,COLORGREEN;{0,COLORGREEN;}{主线快线}价量,COLOR0CC0FF,LINETHICK2;主线,COLOR00FFAA,LINETHICK2;快线,LINESTICK,COLORFF68DD;。
【股票指标公式下载】-【通达信】筹码趋向(主力趋向、中线轴)
【通达信】筹码趋向(主力趋向、中线轴)-指标公式源码VAR1:=1;VAR3:=MA(CLOSE,13);VAR4:=100-ABS((CLOSE-VAR3)/VAR3*100);VAR5:=LLV(LOW,75);VAR6:=HHV(HIGH,75);VAR7:=(VAR6-VAR5)/100;VAR8:=SMA((CLOSE-VAR5)/VAR7,20,1);VAR9:=SMA((OPEN-VAR5)/VAR7,20,1);VARA:=3*VAR8-2*SMA(VAR8,15,1);VARB:=3*VAR9-2*SMA(VAR9,15,1);VARC:=100-VARB;主力筹码趋向: (100-VARA)*VAR1,COLOR0099FF;VARD:=主力筹码趋向>VAR4;VARE:=REF(LOW,1)*0.9;VARF:=LOW*0.9;VAR11:=EMA(VARF,30);VAR12:=CLOSE-REF(CLOSE,1);VAR13:=MAX(VAR12,0);VAR14:=ABS(VAR12);VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;VAR17:=BARSCOUNT(CLOSE);VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100; VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; VAR1D:=SMA(VAR1C,4,1);VAR1E:=SMA(VAR1D,3,1);VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VAR20:=VAR18<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR11-CLOSE>=-0.25 AND VAR15<22 AND VAR16<28 AND VAR17>50;STICKLINE(VARD,VAR4,主力筹码趋向,1,0),COLOR0099FF;STICKLINE(VAR20,0,80,1,0),COLORRED,LINETHICK3 ;主力做底轴线:95,COLORYELLOW ,LINETHICK2 ;主力做大底轴线:100,COLORMAGENTA ,LINETHICK3 ;主力做顶轴线:0,COLORCYAN ,LINETHICK2 ;中线轴: 15,COLORWHITE ,LINETHICK2 ;【通达信】筹码趋向(主力趋向、中线轴)-指标公式效果图(文档来源:若水财经社区)。
【股票指标公式下载】-【通达信】主力动向(主力能量、主力线)
【通达信】主力动向(主力能量、主力线)-指标公式源码换手:=V*100/CAPITAL;主力:=MA(换手,4);大户:=MA(换手,9);中户:=MA(换手,17);散户:=MA(换手,34);均量:=(主力+大户+中户+散户)/4;主力能量:(主力-均量),NODRAW;大户能量:(大户-均量),NODRAW;中户能量:(中户-均量),NODRAW;散户能量:(散户-均量),NODRAW;回:STICKLINE(主力能量>=0 AND 主力能量>=REF(主力能量,1),6,6+主力能量,1,0),COLORRED;复:STICKLINE(主力能量>=0 AND 主力能量< REF(主力能量,1),6,6+主力能量,1,0),COLORYELLOW;者:STICKLINE(主力能量<0 AND 主力能量>=REF(主力能量,1),6,6+主力能量,1,0),COLORGREEN;用:STICKLINE(主力能量<0 AND 主力能量< REF(主力能量,1),6,6+主力能量,1,0),COLORBLUE;DRAWTEXT(ISLASTBAR=1,IF(主力能量>=0,6,6),'主力'),COLORRED;主力线:6,COLORRED;需:STICKLINE(大户能量>=0 AND 大户能量>=REF(大户能量,1),4,4+大户能量,1,0),COLORRED;要:STICKLINE(大户能量>=0 AND 大户能量< REF(大户能量,1),4,4+大户能量,1,0),COLORYELLOW;回1:STICKLINE(大户能量<0 AND 大户能量>=REF(大户能量,1),4,4+大户能量,1,0),COLORGREEN;复1:STICKLINE(大户能量<0 AND 大户能量< REF(大户能量,1),4,4+大户能量,1,0),COLORBLUE;DRAWTEXT(ISLASTBAR=1,IF(大户能量>=0,4,4),'大户'),COLORYELLOW;大户线:4,COLORYELLOW;加1:STICKLINE(中户能量>=0 AND 中户能量>=REF(中户能量,1),2,2+中户能量,1,0),COLORRED;分1:STICKLINE(中户能量>=0 AND 中户能量< REF(中户能量,1),2,2+中户能量,1,0),COLORYELLOW;者1:STICKLINE(中户能量<0 AND 中户能量>=REF(中户能量,1),2,2+中户能量,1,0),COLORGREEN;好:STICKLINE(中户能量<0 AND 中户能量< REF(中户能量,1),2,2+中户能量,1,0),COLORBLUE;DRAWTEXT(ISLASTBAR=1,IF(中户能量>=0,2,2),'中户'),COLORMAGENTA;中户线:2,COLORMAGENTA;{加2:STICKLINE(散户能量>=0 AND 散户能量>=REF(散户能量,1),0,散户能量,1,0),COLORRED;分2:STICKLINE(散户能量>=0 AND 散户能量< REF(散户能量,1),0,散户能量,1,0),COLORYELLOW;欢:STICKLINE(散户能量<0 AND 散户能量>=REF(散户能量,1),0,散户能量,1,0),COLORGREEN;迎:STICKLINE(散户能量<0 AND 散户能量< REF(散户能量,1),0,散户能量,1,0),COLORBLUE;DRAWTEXT(ISLASTBAR=1,IF(散户能量>=0,0.3,0.3),'散户'),COLORWHITE;} 散户线:0,COLORWHITE;B:=ZIG(3,50/5)*1;G:=MA(B,2);D:=CROSS(B,G)*10;W:=CROSS(G,B)*10;DRAWTEXT(W=10,4,'卖' ),COLORWHITE;DRAWTEXT(D=10,8,'买'),COLOR00FFAA,LINETHICK3,STICK;【通达信】主力动向(主力能量、主力线)-指标公式效果图(文档来源:若水财经社区)。
通达信主力资金买卖点分时主图指标公式
通达信主力资金买卖点分时主图指标公式攻击量:=((HSL*0.50+REF(HSL,1)*0.33)+(REF(HSL,2)*0.17))*SUM(C,FRO MOPEN)/FROMOPEN;攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0;攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0;攻击流量:=攻击量A+攻击量B,COLORSTICK;攻击比:=攻击流量/SUM(V,FROMOPEN)*100,COLORRED,LINETHICK1;资金攻击度:=IF(攻击比>=0,(攻击比+50),100-ABS((攻击比-50)));资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),STICK,COLORRED;资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),STICK,COLOR00FF00;资金出入:=资金流入+资金流出,COLORSTICK;资金比:=资金出入/SUM(V,FROMOPEN)*100,COLOR00FFFF,LINETHICK1;资金流量比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2));DRAWTEXT_FIX(1,0.250,0.88,0,STRCAT(STRCAT('【资金流量比】',CON2STR(资金流量比,2)),'%买')),COLORCYAN;DRAWTEXT_FIX(1,0.000,0.88,0,STRCAT(STRCAT('【资金攻击度】',CON2STR(资金攻击度,2)),' %买')),COLORCYAN;XG:HHV(H,480),DOTLINE,COLORRED;STICKLINE(FILTER(CROSS(C,REF(XG,1)),10) AND C>REF(XG,1),C*0.99,C,8,0),COLORGREEN;DRAWTEXT(FILTER(CROSS(C,REF(XG,1)),10) ANDC>REF(XG,1),C*0.99,'突破'),COLORYELLOW;RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT))+1;JY:=BARSLAST((RQ-REF(RQ,1))!=WEEKDAY-REF(WEEKDAY,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1;MA1:=REF(C,JY);MA2:=REF(MA1,JY);MA3:=REF(MA2,JY);MA4:=REF(MA3,JY);MA5:=REF(MA4,JY);MA6:=REF(MA5,JY);MA7:=REF(MA6,JY);MA8:=REF(MA7,JY);MA9:=REF(MA8,JY);CK:REFDATE((C+MA1+MA2+MA3+MA4+MA5+MA6+MA7 +MA8+MA9)/10,DATE),COLORAC59FF,CIRCLEDOT;DRAWTEXT(ISLASTBAR,CK,' 参考线'),COLOR0000FF;DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))+DYNAINFO(3);DEA:=EMA(DIF,9);MACD1:=10*(DIF-DEA);MACD2:=EMA(MACD1,2);STICKLINE(MACD1>=MACD2 AND MACD1>=0,DYNAINFO(3),MACD1+DYNAINFO(3),0,0),COLOR00 00B4;STICKLINE(MACD1<MACD2 AND MACD1>0,DYNAINFO(3),MACD1+DYNAINFO(3),0,0),COLOR00B 400;STICKLINE(MACD1>=MACD2 AND MACD1<0,DYNAINFO(3),MACD1+DYNAINFO(3),0,0),COLOR5151A2;STICKLINE(MACD1<MACD2 AND MACD1<0,DYNAINFO(3),MACD1+DYNAINFO(3),0,0),COLOR887 43A;XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARS COUNT(CLOSE));主力:=EXPMA(CLOSE/XX,20);大户:=EXPMA(CLOSE/XX,60);散户:=EXPMA(CLOSE/XX,120);底:=1;1.02,NODRAW;高:=1.03;DRAWTEXT(CROSS(主力,1.02),C*0.999,'-拉升'),COLORCYAN;DRAWICON(CROSS(主力,1.04),C,24);DRAWTEXT(CROSS(主力,1.04),C*0.999,'-冲涨停'),COLORLIMAGENTA;A1:=(VOL/CLOSE)/3;A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);A3:=SUM((IF(((A1>40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);A4:=SUM((IF(((A1<40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);A5:=SUM((IF(((A1<40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);A6:=((A2+A3)+A4)+A5;A7:=IF((BARSTATUS=2),((100*A2)/A6),0);A8:=((IF((BARSTATUS=2),((100*A3)/A6),0)));A9:=((IF((BARSTATUS=2),((100*A4)/A6),0)));A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)));机构买盘:=(A2),LINETHICK2;机构卖盘:=(A3),LINETHICK2;散户买盘:=(A4);散户卖盘:=(A5);DRAWTEXT_FIX(1,0.000,1-0.05,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),'万')),COLORRED;DRAWTEXT_FIX(1,0.250,1-0.05,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),'万')),COLOR00FF00;DRAWTEXT_FIX(1,0.500,1-0.05,0,STRCAT(STRCAT('【散户买盘】',CON2STR(散户买盘,2)),'万')),COLORRED;DRAWTEXT_FIX(1,0.745,1-0.05,0,STRCAT(STRCAT('【散户卖盘】',CON2STR(散户卖盘,2)),'万')),COLOR00FF00;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:=L1+P1*7/8,COLORGREEN;支撑:=L1+P1*0.5/8,COLORMAGENTA;DRAWTEXT(LONGCROSS(支撑,C,2),C,'买'),COLORYELLOW;DRAWTEXT(LONGCROSS(C,阻力,2),C,'卖'),COLORGREEN;量价:=(VOL/CLOSE)/3;B2:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);B3:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0);B6:=B2+B3;DD1:=1;比:=B2/B3;BBB1:=STRCAT(STRCAT('买= ',CON2STR((100*B2)/B6,0)),'%');BBB2:=STRCAT(STRCAT('卖= ',CON2STR((100*B3)/B6,0)),'%');BBB3:=STRCAT(STRCAT('差= ',CON2STR((100*(B2-B3))/B6,0)),'%');DRAWTEXT_FIX(DD1=1,0,0.70,0,BBB1),COLORRED;DRAWTEXT_FIX(DD1=1,0,0.75,0,BBB2),COLORGREEN;DRAWTEXT_FIX(DD1=1,0,0.80,0,BBB3),COLOR00FFFF;。
【股票指标公式】-【通达信】主力动向(副图)
【通达信】主力动向(副图)-指标公式源码主力动向副图(主买主卖副图)DRAWRECTREL(0,0,400,988,IF(120,RGB(10,0,0),0));超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;主买A:=ACTINVOL,COLORRED,NODRAW;主卖A:=ACTOUTVOL,COLORGREEN,NODRAW;主买:=主买A*100/(主买A+主卖A),NODRAW,COLORRED;主卖:=主卖A*100/(主买A+主卖A),NODRAW,COLORGREEN;SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));【量能饱和】:IF(SAT>1,1,SAT)*100,COLORYELLOW,NODRAW;主力净买量:=(LARGEINTRDVOL-LARGEOUTTRDVOL),COLORYELLOW,NODRAW;大宗净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;主动买卖差:=(ACTINVOL-ACTOUTVOL),COLORMAGENTA,NODRAW;主力资金差:=((L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1)))/10000,COLORCY AN,NODRAW;DRAWRECTREL(100,0,90+CONST(主买*300/100),40,RGB(230,65,0)); DRAWRECTREL(100,60,90+CONST(主卖*300/100),100,RGB(0,104,0)); DRAWRECTREL(100,120,390,160,RGB(0,0,100));DRAWRECTREL(100,120,90+CONST(【量能饱和】*300/100),160,RGB(250,104,0)); 大单动向:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7),NODRAW;T1:=IF (大单动向>0 AND REF(大单动向,1)<0,1,0);T2:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)<0,2,T1);T3:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)<0,3,T2);T4:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)<0,4,T3);T5:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)<0,5,T4); T6:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)<0,6,T5);T7:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)<0,7,T6);T8:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)<0,8,T7);T9:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)>0 AND REF(大单动向,9)<0,9,T8);T:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)>0 AND REF(大单动向,9)>0,10,T9);D:=COUNT(大单动向>0,10),NODRAW;DRAWTEXT_FIX(1,0.005,0.01,0,STRCAT(STRCAT('【主买比】: ',CON2STR(主买,1)),' % ')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.07,0,STRCAT(STRCAT('【主卖比】: ',CON2STR(主卖,1)),' % ')),COLORGREEN;DRAWTEXT_FIX(1,0.005,0.13,0,STRCAT(STRCAT('【量能饱和】: ',CON2STR(【量能饱和】,1)),' % ')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.19,0,STRCAT(STRCAT('【主力资金差】: ',CON2STR(主力资金差,1)),' 万元 ')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.19,0,STRCAT(STRCAT('【大宗净流入】: ',CON2STR(大宗净流入,1)),' 万元 ')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.25,0,STRCAT(STRCAT('【主力净买量】: ',CON2STR(主力净买量,1)),' 手')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.25,0,STRCAT(STRCAT('【主动买卖差】: ',CON2STR(主动买卖差,1)),' 手')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.31,0,STRCAT(STRCAT('【DDX 连红天数】:',CON2STR(T,0)),' 天 ')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.31,0,STRCAT(STRCAT('【DDX两周红天数】:',CON2STR(D,0)),' 天 ')),COLORYELLOW;PJJ:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));XVL:=(IF((CLOSE > OPEN),(QJJ * (HIGH - LOW)),IF((CLOSE < OPEN),(QJJ * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2))) + IF((CLOSE > OPEN),(0 - (QJJ * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (QJJ * (HIGH - LOW))),(0 - (VOL / 2)))));ZLL:=(VOL / CAPITAL);HSL1:=IF((ZLL > 10),10,ZLL);HSL:=((XVL / 20) / 1.15);攻击流量:=(((HSL * 0.55) + (REF(HSL,1) * 0.33)) + (REF(HSL,2) * 0.22)); GJJ:=EMA(攻击流量,8);LLJX:=EMA(攻击流量,3);STICKLINE(((HSL * 0.4) >= 0),((HSL * 0.4) +LLJX),0,3,0),COLOR00FFFF; STICKLINE(((HSL * 0.4) < 0),((HSL * 0.4) +LLJX),0,3,0),COLOR00FF00; 资金流入:=IF((HSL*0.4+LLJX)>0,(HSL*0.4+LLJX),DRAWNULL),COLORRED;资金流出:=IF((HSL*0.4+LLJX)<0,(HSL*0.4+LLJX),DRAWNULL),COLOR00FF00; 资金进出:=(HSL*0.4+LLJX),LINETHICK0;万元:=AMOUNT/10000{0000},VOLSTICK,COLORFF00FF;资金净进出:IF((HSL*0.4+LLJX)>0,资金流入,资金流出),COLORWHITE,POINTDOT;进出比例%:IF((HSL*0.4+LLJX)>0,资金流入/万元*100,资金流出/万元*100),COLORYELLOW;连红天1:=BARSLASTCOUNT(资金净进出>0),,COLORA20FFD,NODRAW;连红天2:=IF(连红天1=0,REF(连红天1,1),连红天1),,COLORA20FFD,NODRAW;连红天3:=IF(连红天2=0,REF(连红天1,2),连红天2),,COLORA20FFD,NODRAW; 连红天4:=IF(连红天3=0,REF(连红天1,3),连红天3),,COLORA20FFD,NODRAW; 近期连红天:IF(连红天4=0,REF(连红天1,4),连红天4),,COLORYELLOW,NODRAW; 最多连红天1:=MAX(REF(近期连红天,1),近期连红天),COLORYELLOW,NODRAW;最多连红天2:=MAX(最多连红天1,REF(近期连红天,2)),COLORYELLOW,NODRAW; 最多连红天3:=MAX(最多连红天2,REF(近期连红天,3)),COLORYELLOW,NODRAW; 最多连红天4:=MAX(最多连红天3,REF(近期连红天,4)),COLORYELLOW,NODRAW; 最多连红天5:=MAX(最多连红天4,REF(近期连红天,5)),COLORYELLOW,NODRAW; 最多连红天:MAX(最多连红天5,REF(近期连红天,6)),COLORYELLOW,NODRAW;三日资金:SUM(资金进出,3),COLORWHITE,NODRAW;五日资金:SUM(资金进出,5),COLORFF00FF,NODRAW;十日资金:SUM(资金进出,10),COLOR0000FF,NODRAW;资金流量:=LLJX,LINETHICK0,COLOR0000FF;STICKLINE((资金流量 > 0),资金流量,0,3,0),COLOR0000FF;STICKLINE((资金流量 < 0),资金流量,0,3,0),COLORFF3300;黄柱初出蓝:=REF(资金流出,1)<0 AND 资金流入>30 AND C>O AND C>REF(C,1) AND C>MA(C,3);X:=(3*C+2*L+O+H)/7;多空线:=(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5) +14*REF(X,6)+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X ,12)+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X, 18)+REF(X,20))/210;长黄柱:= 资金流入>300 AND CROSS(C,多空线);DRAWTEXT(黄柱初出蓝,-30,'★'),COLORFF00FF;DRAWTEXT(长黄柱 ,((HSL * 0.4) * 1.5)*1.4 ,'★'),COLORRED;ARE4:=MA(C,20); ARE5:=(C>MA(C,5)); ARE6:=(MA(C,5)>MA(C,10));ARE7:=(C>MA(C,10));ARE8:=(MA(C,5)>MA(C,20)); ARE9:=(C>MA(C,20)); ARE10:=REF(ARE4,1); ARE11:=(ARE4>ARE10);AVX:=(((((IF(ARE5,10,(0-10))+IF(ARE6,10,(0-10)))+IF(ARE7,10,(0-10)))+IF(ARE8,10,(0-10)))+IF(ARE9,10,(0-10)))+IF(ARE11,10,(0-10)));DSLX:=(C/INDEXC); DSLX1:=MA(DSLX,5); DSLX2:=MA(DSLX,10); VRE1:=MA(V,5); VRE2:=MA(V,10);阻力位:=IF((C>200),(C*1.01),(C*1.07)); 阻力位1:=IF((C<10),(C*1.05),阻力位);止损位:=IF((C>200),(C*0.99),(C*0.93)); 止损位1:=IF((C<10),(C*0.95),止损位);TJTS1:=ISLASTBAR AND C<500; TJTS2:=ISLASTBAR AND C>500;KDAT:=REFDATE(HHV(H,45)/0.097,DATE);{解盘位置}解盘1:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘2:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘3:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 > VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘4:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 <= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘5:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘6:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘7:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘8:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘9:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘10:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘11:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘12:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘13:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘14:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘15:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘16:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘17:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0)); 解盘18:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0)); 解盘19:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0)); 解盘20:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0)); 解盘21:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 >= VRE2)) ,1,0)); 解盘22:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 < VRE2)) ,1,0)); 解盘23:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) ,1,0));解盘24:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) ,1,0));解盘25:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) ,1,0));解盘26:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) ,1,0));{}解盘文字1:=IF(解盘1=1,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘2=1,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右',IF(解盘3=1,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右',IF(解盘4=1,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右',IF(解盘5=1,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望',IF(解盘6=1,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓',IF(解盘7=1,'该股放量下跌,走势明显偏弱,离场观望',IF(解盘8=1,'该股缩量下跌,走势偏弱,离场观望',IF(解盘9=1,'该股形态良好,强势明显,量能充足,可以继续持有',IF(解盘10=1,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险', IF(解盘11=1,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓',IF(解盘12=1,'该股走势趋弱,量能不足,减持大部分筹码',IF(解盘13=1,'该股形态不佳,注意成交量的变化,但目前不适合参与',IF(解盘14=1,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与',IF(解盘15=1,'该股有走强迹象,但量能不足,趋势不明,不适合操作',IF(解盘17=1,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘19=1,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌 ', IF(解盘21=1,'大盘形态走坏,重仓者可以减去大部分仓位 ',IF(解盘22=1,'大盘缩量调整,注意风险,短线清仓观望',IF(解盘23=1,'大盘走势良好,量能理想,可以继续持有强势股',IF(解盘24=1,'大盘形态良好,但量能稍显不足,随时准备减仓',IF(解盘25=1,'大盘趋势不明,注意成交量变化,目前不适宜进场',IF(解盘26=1,'大盘趋势向下,量能萎缩,不适合进场',DRAWNULL)))))))))))))))))))))));解盘文字2:=IF(解盘16=1,'该股走势太弱,没有参与价值',IF(解盘18=1,' 如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎', IF(解盘20=1,' 可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入',DRAWNULL)));DRAWTEXT(CURRBARSCOUNT=70{位置} AND (解盘1=1 OR 解盘2=1 OR 解盘3=1 OR 解盘4=1 OR 解盘5=1 OR 解盘6=1 OR 解盘7=1 OR解盘8=1 OR 解盘9=1 OR 解盘10=1 OR 解盘11=1 OR 解盘12=1 OR 解盘13=1 OR 解盘14=1 OR 解盘15=1 OR 解盘17=1 OR解盘19=1 OR 解盘21=1 OR 解盘22=1 OR 解盘23=1 OR 解盘24=1 OR 解盘25=1 OR 解盘26=1),(KDAT*0.99),解盘文字1),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=70{位置} AND (解盘16=1 OR 解盘18=1 OR 解盘20=1),IF(解盘18=1 OR 解盘20=1,KDAT*0.98,KDAT*0.96),解盘文字2),COLOR00FFFF;TT:=240/FROMOPEN;比:=TT;促进指数MFL:=(HIGH-LOW)*1000000/(VOL*比),COLORRED;AY2:=EMA(CLOSE,12)-EMA(CLOSE,26);AZ2:=EMA(AY2,9);LT2:=(AY2-AZ2);L211:=IF(LT2,LLV(L,21),DRAWNULL),COLOR217158,CIRCLEDOT;ZGD:=HHV(H,80)*0.99;ZGD2:=CONST(ZGD);ZDD:=LLV(L211,80);ZDD2:=CONST(ZDD);YYA4:=MA(CLOSE,20);YYA5:=(CLOSE > MA(CLOSE,5));YYA6:=(MA(CLOSE,5) > MA(CLOSE,10));YYA7:=(CLOSE > MA(CLOSE,10));YYA8:=(MA(CLOSE,5) > MA(CLOSE,20));YYA9:=(CLOSE > MA(CLOSE,20));YYA10:=REF(YYA4,1);YYA11:=(YYA4 > YYA10);YYAVX:=(((((IF(YYA5,10,(0 - 10)) + IF(YYA6,10,(0 - 10))) + IF(YYA7,10,(0 - 10))) + IF(YYA8,10,(0 - 10))) + IF(YYA9,10,(0 - 10))) + IF(YYA11,10,(0 - 10)));YYV1:=MA(VOL,5);YYV2:=MA(VOL,10);J1:=CONST(IF( YYAVX > 0,200,100));J2:=CONST(IF( YYAVX > 0,00,100));J3:=CONST(IF( YYAVX > 0,100,100));WJ:=(H+L+C)/3;VV1:=IF(H=L,1,H-MAX(O,C));VV2:=IF(H=L,1,MAX(C,O)-WJ);VV3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));VV5:=VOL/IF(H=L,4,H-L);V6:=(VV1*VV5);V7:=(VV2*VV5);V8:=(VV3*VV5);V9:=(V4*VV5);买盘1:=DYNAINFO(23)*比;卖盘1:=DYNAINFO(22)*比;买盘2:=IF(ISLASTBAR AND C>300,(V9+V8)*TT,(V9+V8));卖盘2:=IF(ISLASTBAR AND C>300,(V6+V7)*TT,(V6+V7));买盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,买盘1,买盘2); 卖盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,卖盘1,卖盘2); {买卖差:=买盘-卖盘;}MFI:=(HIGH-LOW)*1000000/(VOL*比);绿灯:=MFI>=REF(MFI,1)AND VOL*比>=REF(VOL,1);M1:=CONST(绿灯);衰退:=MFI<REF(MFI,1)AND VOL*比<REF(VOL,1);M2:=CONST(衰退);伪装:=MFI>=REF(MFI,1)AND VOL*比<REF(VOL,1);M3:=CONST(伪装);蛰伏:=MFI<REF(MFI,1)AND VOL*比>=REF(VOL,1);M4:=CONST(蛰伏);量大:=(卖盘+买盘)/REF(VOL,1)>2;M5:=CONST(量大);量缩:=REF(VOL,1)/(卖盘+买盘)>1.5;M6:=CONST(量缩);卖量大:=(卖盘-买盘)/买盘>0.4;M7:=CONST(卖量大);买量大:=(买盘-卖盘)/卖盘>0.4;M8:=CONST(买量大);TS1:=IF(M1=1,1.99+4.99,0.91);TS2:=IF(M2=1,TS1+4.99,TS1);TS3:=IF(M3=1,TS2+4.99,TS2);TS4:=IF(M4=1,TS3+4.99,TS3);TS5:=IF(M5=1,TS4+4.99,TS4);TS6:=IF(M6=1,TS5+4.99,TS5);TS7:=IF(M7=1,TS6+4.99,TS6);TS8:=IF(M8=1,TS7+4.99,TS7);DRAWTEXT(M1 AND CURRBARSCOUNT=50,ZGD2-(ZGD2*TS1),'[绿灯]实计交易量增加。
通达信macd的八个买点指标公式
通达信macd的八个买点指标公式摘要:I.引言- 介绍通达信macd 指标- 阐述macd 指标在股票交易中的重要性II.通达信macd 的八个买点指标公式- 公式一:DIF 上穿DEA- 公式二:DIF 下穿DEA- 公式三:DIF 与DEA 形成金叉- 公式四:DIF 与DEA 形成死叉- 公式五:MACD 柱状图收缩- 公式六:MACD 柱状图扩张- 公式七:MACD 出现顶背离- 公式八:MACD 出现底背离III.通达信macd 指标的运用- 结合其他技术指标使用- 实战案例分析IV.结论- 总结通达信macd 的八个买点指标公式- 强调在实际操作中要灵活运用指标正文:通达信macd 指标是一种趋势类指标,以其稳定性、灵敏性、实用性受到广大股票投资者的青睐。
macd 指标由两条线组成,即DIF(差离值线)和DEA(讯号线),通过这两条线的交叉以及柱状图的变化,可以判断股票价格的趋势和买卖点。
本文将详细介绍通达信macd 的八个买点指标公式,帮助投资者更好地把握股票的买卖点。
1.公式一:DIF 上穿DEA当DIF 线上穿DEA 线时,表示市场上涨趋势开始,投资者可以考虑买入。
2.公式二:DIF 下穿DEA当DIF 线下穿DEA 线时,表示市场下跌趋势开始,投资者可以考虑卖出。
3.公式三:DIF 与DEA 形成金叉当DIF 线与DEA 线在0 轴下方形成金叉时,表示市场上涨趋势开始,投资者可以考虑买入。
4.公式四:DIF 与DEA 形成死叉当DIF 线与DEA 线在0 轴上方形成死叉时,表示市场下跌趋势开始,投资者可以考虑卖出。
5.公式五:MACD 柱状图收缩当MACD 柱状图逐渐收缩,即将出现DIF 与DEA 线交叉时,表示市场即将出现买卖点,投资者需密切关注。
6.公式六:MACD 柱状图扩张当MACD 柱状图逐渐扩张,表示市场上涨或下跌趋势较强,投资者可以顺势而为。
7.公式七:MACD 出现顶背离当股票价格创新高,而MACD 柱状图无法创新高,形成顶背离,表示市场上涨动力减弱,可能出现调整或下跌,投资者需注意风险。
通达信筹码辨顶底指标公式
通达信筹码辨顶底指标公式
通达信筹码辨顶底指标公式是通过计算特定时期内的持仓成本与当前成交价之差的比例来判断市场的顶部和底部。
1. 首先,计算筹码密度指标(CD):
CD = (∑(成交价-持仓成本)/持仓成本) / 总成交额 * 100
2. 然后,计算筹码分布指标(PD):
PD = (CD - MA(CD, n)) / MA(CD, n) * 100
其中,MA表示平均值算法,n表示计算的周期。
3. 最后,根据筹码分布指标PD的数值来判断市场的顶部和底部:
- 当PD数值高于一定的阈值(如20)时,表明市场可能处
于顶部,即空头力量较大,应考虑减仓或空仓;
- 当PD数值低于负的一定阈值(如-20)时,表明市场可能
处于底部,即多头力量较大,应考虑加仓或多仓;
- 当PD数值在阈值范围内时,表明市场可能处于震荡走势,投资者可以根据其他指标结合情况作出判断。
以上是通达信筹码辨顶底指标的公式和判断方法,投资者可以根据自己的实际情况和市场状况来使用和调整阈值。
【股票指标公式下载】-【通达信】主力动向(分时、MACD定位顶底、MACD趋势)
【股票指标公式下载】-【通达信】主⼒动向(分时、MACD定位顶底、MACD趋势)【通达信】主⼒动向(分时、MACD定位顶底、MACD趋势)-指标公式源码{-------------------------通达信新分时源码深度优化版--------------------}A:=CURRBARSCOUNT;A1:=DAY!=REF(DAY,1);A2:=BARSLAST(A1)+1;A3:=MA(C,A2);A4:=SUM(AMO,A2)/SUM(VOL,A2)/100;A5:=IF(CAPITAL>0,A4,A3);均价线:=IF(A<=CONST(A2),A5,DRAWNULL);分钟有效周期:=IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,DRAW NULL))));分时价:=TFILT(CLOSE,CURRBARSCOUNT,00,CURRBARSCOUNT,00);分时判断:=IF(分时价=DRAWNULL,1,IF(分钟有效周期=DRAWNULL,DRAWNULL,1)); {-----------------------------由MACD定位顶底-------------------------------}DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);KX:=BARSSINCE(CLOSE);{←⾸次开盘价距⾦的天数}HHN:=CONST(HHV(DIFF,KX));HLN:=CONST(LLV(DEA,KX));RC1:=CONST((HHN+HLN)/2);SS:=((HHN-HLN)/200);MACD底部:=(-100*SS+RC1)+-(-100*SS+RC1),COLOR669999;MACD顶部:=(100*SS+RC1)+-(-100*SS+RC1),COLORFF0033;MACD中轴:=0+-(-100*SS+RC1);DIFF修正:=DIFF+-(-100*SS+RC1),COLOR008080;DEA修正:=DEA+-(-100*SS+RC1),COLOR00FF00;MACD修正:=2*(DIFF修正-DEA修正)+MACD中轴,COLOR0000BB,NODRAW;MACD超跌:=CONST(LLV(MACD修正,KX));MACD超跌线:=IF(MACD超跌{----------------------利⽤MACD趋势进⾏精确顶底判断------------------------}顶部:=MACD顶部+-MACD超跌线;天际:=顶部*0.809;中轴:=MACD中轴+-MACD超跌线;海⾯:=顶部*0.191;底部:=MACD底部;{------------------------传统KDJ指标结合MACD优化---------------------------}RSVA:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*顶部;{采⽤21⽇⽉线优化}K:SMA(RSVA,3,1),COLORFFFFFF,NODRAW;D:SMA(K,3,1),COLOR00FFFF,NODRAW;原J值参数:=3*K-2*D;JD:=IF(原J值参数<底部,底部,原J值参数);{J值底部钝化处理}J:IF(JD>顶部,顶部,JD),COLORFF00FF,NODRAW;{底部钝化处理后再进⾏顶部钝化处理}{---------------------------MACD多空量能判断-------------------------------}MACD多头:DIFF修正+-MACD超跌线,COLOR339999;空头:DEA修正+-MACD超跌线,COLOR00FF00;量能柱:2*(MACD多头-空头)+中轴,COLOR0000BB,NODRAW;超前DEA:=(EMA(MACD多头,7));超前MACD:=2*(MACD多头-超前DEA)+中轴;{-----------------------------------⼤盘动向-------------------------------}VAR1⼤盘:=LLV(LOW,13);VAR2⼤盘:=HHV(HIGH,13);VAR3⼤盘:=(SMA((CLOSE-VAR1⼤盘)/(VAR2⼤盘-VAR1⼤盘)*顶部,5,1))-顶部/2;VAR4⼤盘:=SMA((VAR2⼤盘-CLOSE)/(VAR2⼤盘-VAR1⼤盘)*顶部,5,1)-顶部/2; ⼤盘散户:=IF(VAR4⼤盘<底部,底部,VAR4⼤盘),COLOR408000;⼤盘主⼒:=IF(VAR3⼤盘<底部,底部,VAR3⼤盘),COLOR330088;{---------------------------------密集成本突破-----------------------------}最⾼获利参数:=顶部/100;VAR1C:=(COST(89)-COST(11))*最⾼获利参数;VAR2C:=(COST(99.9)-COST(1))*最⾼获利参数;单峰:=((1-VAR1C/VAR2C))*顶部;低密:=((COST(90)-COST(60))/VAR2C)*顶部;⾼密:=((COST(40)-COST(1))/VAR2C)*顶部;赢利:= (SMA(WINNER(AMOUNT/VOL/99),2,1))*顶部;活跃度:顶部-顶部/(1+EXPMA(HSL,21)),COLOR774455;{←CYF公众追涨热情指标}70%成本集中度:=IF(VAR1C>顶部,顶部,VAR1C),COLORFFFFFF;90%成本集中度:=IF(VAR2C>顶部,顶部,VAR2C),COLORFF0000;套牢筹码上升:=IF((单峰-赢利)>底部,(单峰-赢利),底部);个股散户:=IF(套牢筹码上升>顶部,顶部,套牢筹码上升),COLOR408000;散户:IF(个股散户=DRAWNULL,DRAWNULL,个股散户),COLOR408000;获利筹码上升:=IF((赢利-单峰)>底部,(赢利-单峰),底部);个股主⼒:=IF(获利筹码上升>顶部,顶部,获利筹码上升),COLOR330088;主⼒:IF(个股主⼒=DRAWNULL,DRAWNULL,个股主⼒),COLOR330088;{--------------------换⼿率,五⽇换⼿率辅助判断个股活跃度-------------------}换⼿:SUM(VOL,1)/CAPITAL*100,COLOR666666,NODRAW;⑤⽇换:SUM(VOL,5)/CAPITAL*100,COLOR999999,NODRAW;{----------------------密集成本突破指标筹码峰画线--------------------------}⾦⾊背景修边1:STICKLINE(C>0 AND CURRBARSCOUNT>=2,顶部,底部,3.05,0),COLOR003333;⾦⾊背景修边2:STICKLINE(C>0 AND CURRBARSCOUNT>=2,顶部,中轴,3.05,0),COLOR003333;⾦⾊背景补充:DRAWBAND(顶部,RGB(51,51,0),中轴,RGB(51,51,0));⾦⾊背景:DRAWBAND(顶部,RGB(51,51,0),底部,RGB(128,128,128));追涨热度峰紫⾊:DRAWBAND(活跃度,RGB(66,52,81),底部,RGB(204,0,0));⾼密峰墨蓝⾊:=DRAWBAND(⾼密,RGB(0,0,51),底部,RGB(0,0,255));低密峰纯蓝⾊:=DRAWBAND(低密,RGB(0,0,102),底部,RGB(0,0,255));90%成本峰:DRAWBAND(90%成本集中度,RGB(0,0,153),底部,RGB(0,0,153)); 70%成本峰:DRAWBAND(70%成本集中度,RGB(0,128,0),底部,RGB(255,255,255));散户峰绿⾊:DRAWBAND(散户,RGB(0,64,0),底部,RGB(204,0,0));主⼒峰红⾊:DRAWBAND(主⼒,RGB(102,26,51),底部,RGB(0,0,255));MACD多空趋势:DRAWBAND(MACD多头,RGB(204,51,51),空头,RGB(0,179,0)); MACD多头重画:DRAWBAND(MACD多头,RGB(153,153,51),MACD多头,RGB(153,153,51));MACD空头重画:DRAWBAND(空头,RGB(0,204,0),空头,RGB(0,204,0));{--------若⽔论坛‘131488’会员提供的通达信■新宝塔线■-----原码-----------}VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARD:=CLOSEVARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); 三平底翻⾦:=(REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1))AND VAR1;主⼒启动线:=MA(V,5),COLORFFFFFF;主⼒洗盘线:=MA(V,35),COLOR00FFFF;资⾦异动线:=MA(V,135),COLORFF0000;{----------------------------买卖参考--------------------------------------}出击:=(CROSS(主⼒启动线,资⾦异动线) OR ((主⼒洗盘线 > 资⾦异动线) AND CROSS(主⼒启动线,主⼒洗盘线))),COLORYELLOW;启动:=(主⼒启动线>REF(主⼒启动线,1) AND (CROSS(VOL,主⼒启动线) AND (REF(VOL,1)线,2)))),COLOR45AAEE;成⽴:=三平底翻⾦ AND (出击 OR 启动);买⼊提⽰:=IF(成⽴=1,海⾯*0.5,0) AND 分时判断=1;{------------------------顶部线,天际线,海⾯线,底部线重画-------------------}顶部线:DRAWBAND(顶部,RGB(51,0,255),顶部,RGB(51,0,255));天际线:DRAWBAND(天际,RGB(128,64,64),天际,RGB(128,64,64));海⾯线:DRAWBAND(海⾯,RGB(0,153,153),海⾯,RGB(0,153,153));{------------------------超前MACD多空量能柱--------------------------------}超前MACD红柱1:STICKLINE(超前MACD>=中轴,超前MACD,中轴,1.50,0),COLOR226688;超前MACD红柱2:STICKLINE(超前MACD>=中轴,超前MACD,中轴,0.95,0),COLOR4488BB;超前MACD红柱3:STICKLINE(超前MACD>=中轴,超前MACD,中轴,0.31,0),COLOR55AADD;超前MACD兰柱1:STICKLINE(超前MACD<=中轴,超前MACD,中轴,1.50,0),COLOR006600;超前MACD兰柱2:STICKLINE(超前MACD<=中轴,超前MACD,中轴,0.95,0),COLOR007700;超前MACD兰柱3:STICKLINE(超前MACD<=中轴,超前MACD,中轴,0.31,0),COLOR008800;{--------------------------MACD多空量能柱----------------------------------}MACD红柱1:STICKLINE(量能柱>=中轴,量能柱,中轴,1.5,0),COLOR000077; MACD红柱2:STICKLINE(量能柱>=中轴,量能柱,中轴,1.1,0),COLOR000088; MACD红柱3:STICKLINE(量能柱>=中轴,量能柱,中轴,0.6,0),COLOR000099; MACD红柱4:STICKLINE(量能柱>=中轴,量能柱,中轴,0.15,0),COLOR0000AA; MACD兰柱1:STICKLINE(量能柱<=中轴,量能柱,中轴,1.5,0),COLORAA6633;MACD兰柱2:STICKLINE(量能柱<=中轴,量能柱,中轴,1.1,0),COLORBB7744; MACD兰柱3:STICKLINE(量能柱<=中轴,量能柱,中轴,0.6,0),COLORCC8855; MACD兰柱4:STICKLINE(量能柱<=中轴,量能柱,中轴,0.15,0),COLORDD9966; {---------中轴线重画及顶部线,天际线,海⾯线,底部线,多空线⽂字说明-----------}中轴线:DRAWBAND(中轴,RGB(128,128,255),中轴,RGB(128,128,255));顶部线⽂字:DRAWTEXT(CURRBARSCOUNT=1,顶部*0.98,' 顶部线'),COLORFF0033;天际线⽂字:DRAWTEXT(CURRBARSCOUNT=1,天际*0.98,' 天际线'),COLOR404080;海⾯线⽂字:DRAWTEXT(CURRBARSCOUNT=1,海⾯,' 海⾯线'),COLOR999900; 底部线⽂字:DRAWTEXT(CURRBARSCOUNT=1,底部,' 底部线'),COLOR669999; 中轴线⽂字:DRAWTEXT(CURRBARSCOUNT=1,中轴,' 多空线'),COLORFF8080; {-------------------------------传统KDJ指标线重画--------------------------}D线重画:DRAWBAND(D,RGB(255,255,0),D*0.998,RGB(255,255,0));K线重画:DRAWBAND(K,RGB(255,255,255),K,RGB(255,255,255));J线重画:DRAWBAND(J,RGB(255,0,255),J,RGB(255,0,255));【通达信】主⼒动向(分时、MACD定位顶底、MACD趋势)-指标公式效果图(⽂档来源:若⽔财经社区)。
【股票指标公式下载】-【通达信】主力控筹(获利筹码、亏损筹码、动态底部)
【通达信】主力控筹(获利筹码、亏损筹码、动态底部)-指标公式源码获利筹码:EMA(WINNER(C)*70,5),COLORMAGENTA;亏损筹码:EMA((WINNER(C*1.1)-WINNER(C*0.9))*80,5),COLORYELLOW;主力控筹:IF(获利筹码>亏损筹码,获利筹码*2,获利筹码),COLORRED; STICKLINE(主力控筹>0,0,主力控筹,3,0),COLOR424242;STICKLINE(获利筹码>0,0,获利筹码*0.2,5,0),COLORRED;AI:=AMOUNT/VOL/100;C0:=REF(C,2)*0.865;C1:=REF(C,13)*0.772;DSY:=100*VOL/CAPITAL;{STICKLINE(抄底,0,50,1,0),COLORFF6600;}动态底部:EMA(IF(L<=LLV(L,30),SMA(ABS(L-REF(L,1)),30,1)/SMA(MAX(L-REF(L,1),0),30,1),0),3) *10,STICK,COLORYELLOW,LINETHICK2;SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/ (HHV(AMOUNT,20)/HHV(C,20))*100);STICKLINE(((CLOSE > 0) AND DAY=2),20,121,20,1),COLORFFFFFF; STICKLINE(((SAT <= 5) AND DAY=2),21,(20 + SAT),15,0),COLORFFFFFF; STICKLINE((((SAT > 5) AND (SAT <= 20)) AND DAY=2),21,(20 +SAT),15,0),COLORCCFF88;STICKLINE((((SAT > 20) AND (SAT <= 40)) AND DAY=2),21,(20 +SAT),15,0),COLORFF00FF;STICKLINE(((SAT > 40) AND DAY=2),21,(20 + SAT),15,0),COLORRED;主力筹码:EMA(WINNER(CLOSE)*70,10),COLORWHITE;散户筹码:EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,10),COLOR00FF00; STICKLINE(主力筹码>散户筹码, 主力筹码,散户筹码,1,1),COLOR0066FF; STICKLINE(主力筹码<散户筹码, 主力筹码,散户筹码,1,1),COLOR00FF00;抄底:IF((C-MIN(C0,C1))/C<0.1 AND SUM(DSY,5)/5<1.8,100, 0),COLORFF00FF; 【通达信】主力控筹(获利筹码、亏损筹码、动态底部)-指标公式效果图(文档来源:若水财经社区)。
【股票指标公式】-【通达信】主力动向(副图)
【通达信】主力动向(副图)-指标公式源码主力动向副图(主买主卖副图)DRAWRECTREL(0,0,400,988,IF(120,RGB(10,0,0),0));超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;主买A:=ACTINVOL,COLORRED,NODRAW;主卖A:=ACTOUTVOL,COLORGREEN,NODRAW;主买:=主买A*100/(主买A+主卖A),NODRAW,COLORRED;主卖:=主卖A*100/(主买A+主卖A),NODRAW,COLORGREEN;SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));【量能饱和】:IF(SAT>1,1,SAT)*100,COLORYELLOW,NODRAW;主力净买量:=(LARGEINTRDVOL-LARGEOUTTRDVOL),COLORYELLOW,NODRAW;大宗净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;主动买卖差:=(ACTINVOL-ACTOUTVOL),COLORMAGENTA,NODRAW;主力资金差:=((L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1)))/10000,COLORCY AN,NODRAW;DRAWRECTREL(100,0,90+CONST(主买*300/100),40,RGB(230,65,0)); DRAWRECTREL(100,60,90+CONST(主卖*300/100),100,RGB(0,104,0)); DRAWRECTREL(100,120,390,160,RGB(0,0,100));DRAWRECTREL(100,120,90+CONST(【量能饱和】*300/100),160,RGB(250,104,0)); 大单动向:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7),NODRAW;T1:=IF (大单动向>0 AND REF(大单动向,1)<0,1,0);T2:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)<0,2,T1);T3:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)<0,3,T2);T4:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)<0,4,T3);T5:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)<0,5,T4); T6:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)<0,6,T5);T7:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)<0,7,T6);T8:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)<0,8,T7);T9:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)>0 AND REF(大单动向,9)<0,9,T8);T:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)>0 AND REF(大单动向,9)>0,10,T9);D:=COUNT(大单动向>0,10),NODRAW;DRAWTEXT_FIX(1,0.005,0.01,0,STRCAT(STRCAT('【主买比】: ',CON2STR(主买,1)),' % ')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.07,0,STRCAT(STRCAT('【主卖比】: ',CON2STR(主卖,1)),' % ')),COLORGREEN;DRAWTEXT_FIX(1,0.005,0.13,0,STRCAT(STRCAT('【量能饱和】: ',CON2STR(【量能饱和】,1)),' % ')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.19,0,STRCAT(STRCAT('【主力资金差】: ',CON2STR(主力资金差,1)),' 万元 ')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.19,0,STRCAT(STRCAT('【大宗净流入】: ',CON2STR(大宗净流入,1)),' 万元 ')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.25,0,STRCAT(STRCAT('【主力净买量】: ',CON2STR(主力净买量,1)),' 手')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.25,0,STRCAT(STRCAT('【主动买卖差】: ',CON2STR(主动买卖差,1)),' 手')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.31,0,STRCAT(STRCAT('【DDX 连红天数】:',CON2STR(T,0)),' 天 ')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.31,0,STRCAT(STRCAT('【DDX两周红天数】:',CON2STR(D,0)),' 天 ')),COLORYELLOW;PJJ:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));XVL:=(IF((CLOSE > OPEN),(QJJ * (HIGH - LOW)),IF((CLOSE < OPEN),(QJJ * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2))) + IF((CLOSE > OPEN),(0 - (QJJ * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (QJJ * (HIGH - LOW))),(0 - (VOL / 2)))));ZLL:=(VOL / CAPITAL);HSL1:=IF((ZLL > 10),10,ZLL);HSL:=((XVL / 20) / 1.15);攻击流量:=(((HSL * 0.55) + (REF(HSL,1) * 0.33)) + (REF(HSL,2) * 0.22)); GJJ:=EMA(攻击流量,8);LLJX:=EMA(攻击流量,3);STICKLINE(((HSL * 0.4) >= 0),((HSL * 0.4) +LLJX),0,3,0),COLOR00FFFF; STICKLINE(((HSL * 0.4) < 0),((HSL * 0.4) +LLJX),0,3,0),COLOR00FF00; 资金流入:=IF((HSL*0.4+LLJX)>0,(HSL*0.4+LLJX),DRAWNULL),COLORRED;资金流出:=IF((HSL*0.4+LLJX)<0,(HSL*0.4+LLJX),DRAWNULL),COLOR00FF00; 资金进出:=(HSL*0.4+LLJX),LINETHICK0;万元:=AMOUNT/10000{0000},VOLSTICK,COLORFF00FF;资金净进出:IF((HSL*0.4+LLJX)>0,资金流入,资金流出),COLORWHITE,POINTDOT;进出比例%:IF((HSL*0.4+LLJX)>0,资金流入/万元*100,资金流出/万元*100),COLORYELLOW;连红天1:=BARSLASTCOUNT(资金净进出>0),,COLORA20FFD,NODRAW;连红天2:=IF(连红天1=0,REF(连红天1,1),连红天1),,COLORA20FFD,NODRAW;连红天3:=IF(连红天2=0,REF(连红天1,2),连红天2),,COLORA20FFD,NODRAW; 连红天4:=IF(连红天3=0,REF(连红天1,3),连红天3),,COLORA20FFD,NODRAW; 近期连红天:IF(连红天4=0,REF(连红天1,4),连红天4),,COLORYELLOW,NODRAW; 最多连红天1:=MAX(REF(近期连红天,1),近期连红天),COLORYELLOW,NODRAW;最多连红天2:=MAX(最多连红天1,REF(近期连红天,2)),COLORYELLOW,NODRAW; 最多连红天3:=MAX(最多连红天2,REF(近期连红天,3)),COLORYELLOW,NODRAW; 最多连红天4:=MAX(最多连红天3,REF(近期连红天,4)),COLORYELLOW,NODRAW; 最多连红天5:=MAX(最多连红天4,REF(近期连红天,5)),COLORYELLOW,NODRAW; 最多连红天:MAX(最多连红天5,REF(近期连红天,6)),COLORYELLOW,NODRAW;三日资金:SUM(资金进出,3),COLORWHITE,NODRAW;五日资金:SUM(资金进出,5),COLORFF00FF,NODRAW;十日资金:SUM(资金进出,10),COLOR0000FF,NODRAW;资金流量:=LLJX,LINETHICK0,COLOR0000FF;STICKLINE((资金流量 > 0),资金流量,0,3,0),COLOR0000FF;STICKLINE((资金流量 < 0),资金流量,0,3,0),COLORFF3300;黄柱初出蓝:=REF(资金流出,1)<0 AND 资金流入>30 AND C>O AND C>REF(C,1) AND C>MA(C,3);X:=(3*C+2*L+O+H)/7;多空线:=(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5) +14*REF(X,6)+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X ,12)+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X, 18)+REF(X,20))/210;长黄柱:= 资金流入>300 AND CROSS(C,多空线);DRAWTEXT(黄柱初出蓝,-30,'★'),COLORFF00FF;DRAWTEXT(长黄柱 ,((HSL * 0.4) * 1.5)*1.4 ,'★'),COLORRED;ARE4:=MA(C,20); ARE5:=(C>MA(C,5)); ARE6:=(MA(C,5)>MA(C,10));ARE7:=(C>MA(C,10));ARE8:=(MA(C,5)>MA(C,20)); ARE9:=(C>MA(C,20)); ARE10:=REF(ARE4,1); ARE11:=(ARE4>ARE10);AVX:=(((((IF(ARE5,10,(0-10))+IF(ARE6,10,(0-10)))+IF(ARE7,10,(0-10)))+IF(ARE8,10,(0-10)))+IF(ARE9,10,(0-10)))+IF(ARE11,10,(0-10)));DSLX:=(C/INDEXC); DSLX1:=MA(DSLX,5); DSLX2:=MA(DSLX,10); VRE1:=MA(V,5); VRE2:=MA(V,10);阻力位:=IF((C>200),(C*1.01),(C*1.07)); 阻力位1:=IF((C<10),(C*1.05),阻力位);止损位:=IF((C>200),(C*0.99),(C*0.93)); 止损位1:=IF((C<10),(C*0.95),止损位);TJTS1:=ISLASTBAR AND C<500; TJTS2:=ISLASTBAR AND C>500;KDAT:=REFDATE(HHV(H,45)/0.097,DATE);{解盘位置}解盘1:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘2:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘3:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 > VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘4:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 <= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘5:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘6:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘7:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘8:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘9:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘10:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘11:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘12:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘13:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘14:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘15:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘16:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘17:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0)); 解盘18:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0)); 解盘19:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0)); 解盘20:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0)); 解盘21:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 >= VRE2)) ,1,0)); 解盘22:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 < VRE2)) ,1,0)); 解盘23:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) ,1,0));解盘24:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) ,1,0));解盘25:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) ,1,0));解盘26:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) ,1,0));{}解盘文字1:=IF(解盘1=1,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘2=1,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右',IF(解盘3=1,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右',IF(解盘4=1,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右',IF(解盘5=1,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望',IF(解盘6=1,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓',IF(解盘7=1,'该股放量下跌,走势明显偏弱,离场观望',IF(解盘8=1,'该股缩量下跌,走势偏弱,离场观望',IF(解盘9=1,'该股形态良好,强势明显,量能充足,可以继续持有',IF(解盘10=1,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险', IF(解盘11=1,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓',IF(解盘12=1,'该股走势趋弱,量能不足,减持大部分筹码',IF(解盘13=1,'该股形态不佳,注意成交量的变化,但目前不适合参与',IF(解盘14=1,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与',IF(解盘15=1,'该股有走强迹象,但量能不足,趋势不明,不适合操作',IF(解盘17=1,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘19=1,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌 ', IF(解盘21=1,'大盘形态走坏,重仓者可以减去大部分仓位 ',IF(解盘22=1,'大盘缩量调整,注意风险,短线清仓观望',IF(解盘23=1,'大盘走势良好,量能理想,可以继续持有强势股',IF(解盘24=1,'大盘形态良好,但量能稍显不足,随时准备减仓',IF(解盘25=1,'大盘趋势不明,注意成交量变化,目前不适宜进场',IF(解盘26=1,'大盘趋势向下,量能萎缩,不适合进场',DRAWNULL)))))))))))))))))))))));解盘文字2:=IF(解盘16=1,'该股走势太弱,没有参与价值',IF(解盘18=1,' 如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎', IF(解盘20=1,' 可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入',DRAWNULL)));DRAWTEXT(CURRBARSCOUNT=70{位置} AND (解盘1=1 OR 解盘2=1 OR 解盘3=1 OR 解盘4=1 OR 解盘5=1 OR 解盘6=1 OR 解盘7=1 OR解盘8=1 OR 解盘9=1 OR 解盘10=1 OR 解盘11=1 OR 解盘12=1 OR 解盘13=1 OR 解盘14=1 OR 解盘15=1 OR 解盘17=1 OR解盘19=1 OR 解盘21=1 OR 解盘22=1 OR 解盘23=1 OR 解盘24=1 OR 解盘25=1 OR 解盘26=1),(KDAT*0.99),解盘文字1),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=70{位置} AND (解盘16=1 OR 解盘18=1 OR 解盘20=1),IF(解盘18=1 OR 解盘20=1,KDAT*0.98,KDAT*0.96),解盘文字2),COLOR00FFFF;TT:=240/FROMOPEN;比:=TT;促进指数MFL:=(HIGH-LOW)*1000000/(VOL*比),COLORRED;AY2:=EMA(CLOSE,12)-EMA(CLOSE,26);AZ2:=EMA(AY2,9);LT2:=(AY2-AZ2);L211:=IF(LT2,LLV(L,21),DRAWNULL),COLOR217158,CIRCLEDOT;ZGD:=HHV(H,80)*0.99;ZGD2:=CONST(ZGD);ZDD:=LLV(L211,80);ZDD2:=CONST(ZDD);YYA4:=MA(CLOSE,20);YYA5:=(CLOSE > MA(CLOSE,5));YYA6:=(MA(CLOSE,5) > MA(CLOSE,10));YYA7:=(CLOSE > MA(CLOSE,10));YYA8:=(MA(CLOSE,5) > MA(CLOSE,20));YYA9:=(CLOSE > MA(CLOSE,20));YYA10:=REF(YYA4,1);YYA11:=(YYA4 > YYA10);YYAVX:=(((((IF(YYA5,10,(0 - 10)) + IF(YYA6,10,(0 - 10))) + IF(YYA7,10,(0 - 10))) + IF(YYA8,10,(0 - 10))) + IF(YYA9,10,(0 - 10))) + IF(YYA11,10,(0 - 10)));YYV1:=MA(VOL,5);YYV2:=MA(VOL,10);J1:=CONST(IF( YYAVX > 0,200,100));J2:=CONST(IF( YYAVX > 0,00,100));J3:=CONST(IF( YYAVX > 0,100,100));WJ:=(H+L+C)/3;VV1:=IF(H=L,1,H-MAX(O,C));VV2:=IF(H=L,1,MAX(C,O)-WJ);VV3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));VV5:=VOL/IF(H=L,4,H-L);V6:=(VV1*VV5);V7:=(VV2*VV5);V8:=(VV3*VV5);V9:=(V4*VV5);买盘1:=DYNAINFO(23)*比;卖盘1:=DYNAINFO(22)*比;买盘2:=IF(ISLASTBAR AND C>300,(V9+V8)*TT,(V9+V8));卖盘2:=IF(ISLASTBAR AND C>300,(V6+V7)*TT,(V6+V7));买盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,买盘1,买盘2); 卖盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,卖盘1,卖盘2); {买卖差:=买盘-卖盘;}MFI:=(HIGH-LOW)*1000000/(VOL*比);绿灯:=MFI>=REF(MFI,1)AND VOL*比>=REF(VOL,1);M1:=CONST(绿灯);衰退:=MFI<REF(MFI,1)AND VOL*比<REF(VOL,1);M2:=CONST(衰退);伪装:=MFI>=REF(MFI,1)AND VOL*比<REF(VOL,1);M3:=CONST(伪装);蛰伏:=MFI<REF(MFI,1)AND VOL*比>=REF(VOL,1);M4:=CONST(蛰伏);量大:=(卖盘+买盘)/REF(VOL,1)>2;M5:=CONST(量大);量缩:=REF(VOL,1)/(卖盘+买盘)>1.5;M6:=CONST(量缩);卖量大:=(卖盘-买盘)/买盘>0.4;M7:=CONST(卖量大);买量大:=(买盘-卖盘)/卖盘>0.4;M8:=CONST(买量大);TS1:=IF(M1=1,1.99+4.99,0.91);TS2:=IF(M2=1,TS1+4.99,TS1);TS3:=IF(M3=1,TS2+4.99,TS2);TS4:=IF(M4=1,TS3+4.99,TS3);TS5:=IF(M5=1,TS4+4.99,TS4);TS6:=IF(M6=1,TS5+4.99,TS5);TS7:=IF(M7=1,TS6+4.99,TS6);TS8:=IF(M8=1,TS7+4.99,TS7);DRAWTEXT(M1 AND CURRBARSCOUNT=50,ZGD2-(ZGD2*TS1),'[绿灯]实计交易量增加。
通达信公式 macd
通达信公式macd摘要:一、通达信公式介绍1.通达信简介2.通达信公式功能二、macd 指标介绍1.macd 指标含义2.macd 指标组成3.macd 指标应用场景三、macd 指标在通达信公式中的使用1.创建macd 指标公式2.macd 指标公式参数设置3.macd 指标公式应用实例四、macd 指标在股票分析中的应用1.判断股票趋势2.寻找买卖点3.分析股票强弱五、总结1.macd 指标在股票分析中的重要性2.通达信公式在macd 指标应用中的优势正文:一、通达信公式介绍通达信是一款专业的股票分析软件,为广大投资者提供了丰富的股票分析功能。
在通达信中,用户可以通过编写公式,自定义观察和分析股票走势。
通达信公式功能强大,可以满足投资者各种复杂的需求。
二、macd 指标介绍1.macd 指标含义MACD(Moving Average Convergence Divergence,指数平滑异同平均线)指标是一种趋势追踪指标,通过比较股票价格的短期和长期趋势,帮助投资者判断市场趋势,寻找买卖点。
2.macd 指标组成MACD 指标由DIF(差离值线)、DEA(讯号线)和MACD 柱状图三部分组成。
其中,DIF 是两个不同周期的指数移动平均线(EMA)之差;DEA 是DIF 的一段时间的指数移动平均;MACD 柱状图是DIF 与DEA 之间的差值。
3.macd 指标应用场景MACD 指标适用于各种市场行情,可以用来判断股票、期货、外汇等金融产品的趋势,为投资者提供买卖信号。
三、macd 指标在通达信公式中的使用1.创建macd 指标公式在通达信中,用户可以通过以下语法创建MACD 指标公式:```MACD(CLOSE,SHORT,LONG);```其中,CLOSE 表示收盘价,SHORT 表示短期平均线周期,LONG 表示长期平均线周期。
例如,创建一个12 日、26 日、9 日的MACD 指标公式,可以写成:```MACD(CLOSE,12,26);```2.macd 指标公式参数设置在创建MACD 指标公式时,用户可以根据自己的需求设置短期平均线和长期平均线的周期。
通达信MACD分时指标公式
通达信MACD分时指标公式通达信MACD分时指标公式DRAWGBK(C>0,RGB(50,60,250),RGB(17,21,89),0,'11',0);H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:=L1+P1*7/8,COLORGREEN;支撑:=L1+P1*0.5/8,COLORRED;中线:=(支撑+阻力)/2,COLORWHITE,POINTDOT;V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5, 1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100 ,5,1),3,1);趋势线:EMA(V11,3),LINETHICK2,COLORLIMAGENTA;V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;准备买入:STICKLINE(趋势线<11,趋势线,11,5,0),COLORYELLOW;AA:=(趋势线<11) AND FILTER((趋势线<=11),15) AND C<中线;BB0:=REF(趋势线,1)<11 AND CROSS(趋势线,11) AND C<中线;BB1:=REF(趋势线,1)<11 AND REF(趋势线,1)>6 AND CROSS(趋势线,11);BB2:=REF(趋势线,1)<6 AND REF(趋势线,1)>3 AND CROSS(趋势线,6);BB3:=REF(趋势线,1)<3 AND REF(趋势线,1)>1 AND CROSS(趋势线,3);BB4:=REF(趋势线,1)<1 AND REF(趋势线,1)>0 ANDCROSS(趋势线,1);BB5:=REF(趋势线,1)<0 AND CROSS(趋势线,0);BB:=BB1=1 OR BB2=1 OR BB3=1 OR BB4=1 OR BB5=1;下单买入:STICKLINE(BB=1 AND C<中线,11,50,5,0),COLORRED;DRAWICON(BB=1 AND C<中线,55,1);DRAWTEXT(BB0,60,'★买'),COLORRED;DRAWTEXT(AA,16,'准备买入'),COLORYELLOW;准备卖出:STICKLINE(趋势线>89,趋势线,89,5,0),COLORWHITE;CC:=(趋势线>89) AND FILTER((趋势线>89),15) AND C>中线;DD0:=REF(趋势线,1)>89 AND CROSS(89,趋势线) ANDC>中线;DD1:=REF(趋势线,1)>89 AND REF(趋势线,1)<94 AND CROSS(89,趋势线);DD2:=REF(趋势线,1)>94 AND REF(趋势线,1)<97 AND CROSS(94,趋势线);DD3:=REF(趋势线,1)>97 AND REF(趋势线,1)>99 AND CROSS(97,趋势线);DD4:=REF(趋势线,1)>99 AND REF(趋势线,1)<100 AND CROSS(99,趋势线);DD5:=REF(趋势线,1)>100 AND CROSS(100,趋势线);DD:=DD1=1 OR DD2=1 OR DD3=1 OR DD4=1 ORDD5=1;下单卖出:STICKLINE(DD=1 AND C>中线,89,50,5,0),COLORGREEN;DRAWICON(DD=1 AND C>中线,45,2);DRAWTEXT(DD0,40,'★卖'),COLORGREEN; DRAWTEXT (CC,84,'准备卖出'),COLORWHITE;顶:89,COLORGREEN;底:11,COLORRED;中:50,POINTDOT,COLORWHITE;DRAWTEXT(ISLASTBAR,顶,'顶'),COLORGREEN; DRAWTEXT(ISLASTBAR,底,'底'),COLORRED;DRAWTEXT(ISLASTBAR,中,'中'),COLORWHITE;{上出下买+三背}A:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1));B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17), 1);分水岭:IF(MA(CLOSE,17)<B,B,MA(CLOSE,17)),COLORFF0 0FF;操作线:分水岭-(EMA(C,3)-分水岭),COLOR00FFFF;PM:MA(C,5),COLORWHITE;IF(PM> REF(PM,1),PM,DRAWNULL),COLORRED;IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED;IF(PM<REF(PM,1),PM,DRAWNULL),COLORFF9900;S:=(PM> 操作线);DD11:=分水岭<REF(分水岭,1);IF(DD11,分水岭,DRAWNULL),COLOR00FF00;IF(S,分水岭,DRAWNULL),COLOR00FF00;DRAWICON(CROSS(分水岭,操作线),分水岭-0.1,1);{买入红箭头} A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA" ),1));B1:=REF(C,A1+1)> C ANDREF("MACD.DIF",A1+1)<"MACD.DIF" ANDCROSS("MACD.DIF","MACD.DEA");DRAWTEXT(B1> 0,L-0.02,'MACD底背离'),COLOR00FFFF;{MACD底背离}A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));B2:=REF(C,A2+1)> C ANDREF("KDJ.K",A2+1)<"KDJ.K" ANDCROSS("KDJ.K","KDJ.D");DRAWTEXT(B2,L-0.10,'KDJ底背离'),COLORFF00FF;{KDJ底背离}A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1)) ;B3:=REF(C,A3+1)> C ANDREF("RSI.RSI1",A3+1)<"RSI.RSI1" ANDCROSS("RSI.RSI1","RSI.RSI2");DRAWTEXT(B3> 0,L-0.18,'RSI底背离'),COLOR0000FF;{RSI底背离}C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF" ),1));D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)> "MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");DRAWTEXT(D1> 0,H+0.16,'MACD顶背离'),COLOR00FF00;{MACD顶背离}C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)> "KDJ.K" AND CROSS("KDJ.D","KDJ.K");DRAWTEXT(D2> 0,H+0.08,'KDJ顶背离'),COLORFFFFCC;{KDJ顶背离}C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1)) ;D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)> "RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");DRAWTEXT(D3> 0,H+0.04,'RSI顶背离'),COLORFF9900;{RSI顶背离};。
通达信MACD资金趋势公式MACD指标集中营
通达信MACD资金趋势公式MACD指标集中营通达信MACD资金趋势公式 MACD指标集中营源码A:=VOL*C;B:=SUM(A,1)/SUM(VOL,1);B1:=EMA(B,17);资金:=(B-B1)*100/B;DIFF:EMA(资金,12)-EMA(资金,26);DEA: EMA(DIFF,9);M:2*(DIFF-DEA), COLORSTICK;{红色立柱}STICKLINE(M>=REF(M,1)AND M>0,0,M,2.2,0),COLOR000088;STICKLINE(M>=REF(M,1)ANDM>0,0,M,1.5,0),COLOR0000AA;STICKLINE(M>=REF(M,1)ANDM>0,0,M,0.5,0),COLOR0000CC;STICKLINE(M>=REF(M,1)AND M>0,0,M,0.1,0),COLOR0000EE;{金黄色立柱}STICKLINE(M<REF(M,1)AND M>0,0,M,2.2,0),COLOR338888;STICKLINE(M<REF(M,1)AND M>0,0,M,1.3,0),COLOR33AAAA;STICKLINE(M<REF(M,1)AND M>0,0,M,0.9,0),COLOR33CCCC;STICKLINE(M<REF(M,1)AND M>0,0,M,0.1,0),COLOR33EEEE;{粉红立柱}STICKLINE(M>REF(M,1)AND M<0,0,M,2.2,0),COLORCC00CC;STICKLINE(M>REF(M,1)AND M<0,0,M,1.1,0),COLOREE00EE;STICKLINE(M>REF(M,1)AND M<0,0,M,0.1,0)COLORFF00FF;{绿色立柱}STICKLINE(M<=REF(M,1)AND M<0,0,M,2.2,0),COLOR009900;STICKLINE(M<=REF(M,1)ANDM<0,0,M,1.5,0),COLOR00BB00;STICKLINE(M<=REF(M,1)ANDM<0,0,M,1.1,0),COLOR00DD00;STICKLINE(M<=REF(M,1)AND M<0,0,M,0.1,0),COLOR00FF00;IF(DIFF<0,DIFF,0),COLORRED,LINETHICK2;IF(DIFF<0,0,DIFF),COLORYELLOW,LINETHICK2;IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK2;IF(DIFF>DEA,DEA,DEA),COLORWHITE,LINETHICK1;低金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;{金黄色立柱}STICKLINE(低金叉,-4,-2,2.5,0),COLOR338888;STICKLINE(低金叉,-4,-2,1.5,0),COLOR33AAAA;STICKLINE(低金叉,-4,-2,0.9,0),COLOR33CCCC;STICKLINE(低金叉,-4,-2,0.1,0),COLOR33EEEE;STICKLINE(低金叉,-0.4,-2,0.3,1),COLOREE00EE;DRAWTEXT(低金叉,-3,' 低位金叉'),COLORYELLOW;JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));二金:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;{粉红立柱}STICKLINE(二金,0,-2.5,2,0),COLORCC00CC;STICKLINE(二金,0,-2.5,1.5,0),COLOREE00EE;STICKLINE(二金,0,-2.5,0.1,0)COLORFF00FF;DRAWICON(二金,DEA*1.2,23) ;DRAWTEXT(二金,-2,' 二次金叉'),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,2.5,2.5,0),COLOR009900;STICKLINE(底背,0,2.5,1.4,0),COLOR00BB00;STICKLINE(底背,0,2.5,0.5,0),COLOR00DD00;STICKLINE(底背,0,2.5,0.1,0),COLOR00FF00;STICKLINE(底背,4.5,2.5,0.3,1),COLOR0000FF;DRAWLINE(A1=0,DEA,底背,DEA,0),COLORRED,LINETHICK2;DRAWTEXT(底背,2,' 底背离'),COLOR00FF00;A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));顶背:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);{深青色立柱}{STICKLINE(顶背,2.5,4,3,0),COLORCC0000; }STICKLINE(顶背,2.5,4,2.5,0),COLORFF4400;STICKLINE(顶背,2.5,4,1.5,0),COLORFF8800;STICKLINE(顶背,2.5,4,0.2,0),COLORFFCC00;STICKLINE(顶背,0.4,2.5,0,0),COLORFFFFFF;{白色立柱}STICKLINE(顶背,5,4,4,0),COLOR999999;STICKLINE(顶背,5,4,3,0),COLORBBBBBB;STICKLINE(顶背,5,4,2,0),COLORDDDDDD;STICKLINE(顶背,5,4,1,0),COLORFFFFFF;DRAWLINE(A2=0,DEA,顶背,DEA,0),COLORFFFF00,LINETHICK2;DRAWTEXT(顶背,3.6,' 顶背离'),COLORFFFF00;。
主力轨迹指标通达信指标公式源码
今天给大家带来另一款自用的通达信副图指标:“主力轨迹”,初看也没什么,就二根线,和MACD也差不多,用了一段时间以后发现,比MACD好用。
买点和卖点基本都比MACD超前,也有少部分比MACD滞后的,大部分都比MACD要提前提示买点和卖点,自己觉得还不错,特拿出来分享给理想的同学们。
大家在使用过程中有什么心得体会,欢迎下面跟帖探讨交流!也欢迎老师们试用,加以进一步改进和完善,没有哪个指标是百分百完美无缺的,下面是我做的贴图。
用法说明:白线上穿黄线,买入
白线下穿黄线,卖出(不含未来函数的,请放心使用)
MTM:=CLOSE-REF(CLOSE,1);
ZLGJ:100*EMA(EMA(MTM,9),9)/EMA(EMA(ABS(MTM),9),9);
MAZL:MA(ZLGJ,5);。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
【通达信】主力动向(分时、MACD定位顶底、MACD趋势)-指标公式源码{-------------------------通达信新分时源码深度优化版--------------------}A:=CURRBARSCOUNT;A1:=DAY!=REF(DAY,1);A2:=BARSLAST(A1)+1;A3:=MA(C,A2);A4:=SUM(AMO,A2)/SUM(VOL,A2)/100;A5:=IF(CAPITAL>0,A4,A3);均价线:=IF(A<=CONST(A2),A5,DRAWNULL);分钟有效周期:=IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,DRAW NULL))));分时价:=TFILT(CLOSE,CURRBARSCOUNT,00,CURRBARSCOUNT,00);分时判断:=IF(分时价=DRAWNULL,1,IF(分钟有效周期=DRAWNULL,DRAWNULL,1)); {-----------------------------由MACD定位顶底-------------------------------}DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);KX:=BARSSINCE(CLOSE);{←首次开盘价距金的天数}HHN:=CONST(HHV(DIFF,KX));HLN:=CONST(LLV(DEA,KX));RC1:=CONST((HHN+HLN)/2);SS:=((HHN-HLN)/200);MACD底部:=(-100*SS+RC1)+-(-100*SS+RC1),COLOR669999;MACD顶部:=(100*SS+RC1)+-(-100*SS+RC1),COLORFF0033;MACD中轴:=0+-(-100*SS+RC1);DIFF修正:=DIFF+-(-100*SS+RC1),COLOR008080;DEA修正:=DEA+-(-100*SS+RC1),COLOR00FF00;MACD修正:=2*(DIFF修正-DEA修正)+MACD中轴,COLOR0000BB,NODRAW;MACD超跌:=CONST(LLV(MACD修正,KX));MACD超跌线:=IF(MACD超跌<MACD底部,MACD超跌,MACD底部);{----------------------利用MACD趋势进行精确顶底判断------------------------}顶部:=MACD顶部+-MACD超跌线;天际:=顶部*0.809;中轴:=MACD中轴+-MACD超跌线;海面:=顶部*0.191;底部:=MACD底部;{------------------------传统KDJ指标结合MACD优化---------------------------}RSVA:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*顶部;{采用21日月线优化}K:SMA(RSVA,3,1),COLORFFFFFF,NODRAW;D:SMA(K,3,1),COLOR00FFFF,NODRAW;原J值参数:=3*K-2*D;JD:=IF(原J值参数<底部,底部,原J值参数);{J值底部钝化处理}J:IF(JD>顶部,顶部,JD),COLORFF00FF,NODRAW;{底部钝化处理后再进行顶部钝化处理}{---------------------------MACD多空量能判断-------------------------------}MACD多头:DIFF修正+-MACD超跌线,COLOR339999;空头:DEA修正+-MACD超跌线,COLOR00FF00;量能柱:2*(MACD多头-空头)+中轴,COLOR0000BB,NODRAW;超前DEA:=(EMA(MACD多头,7));超前MACD:=2*(MACD多头-超前DEA)+中轴;{-----------------------------------大盘动向-------------------------------}VAR1大盘:=LLV(LOW,13);VAR2大盘:=HHV(HIGH,13);VAR3大盘:=(SMA((CLOSE-VAR1大盘)/(VAR2大盘-VAR1大盘)*顶部,5,1))-顶部/2;VAR4大盘:=SMA((VAR2大盘-CLOSE)/(VAR2大盘-VAR1大盘)*顶部,5,1)-顶部/2; 大盘散户:=IF(VAR4大盘<底部,底部,VAR4大盘),COLOR408000;大盘主力:=IF(VAR3大盘<底部,底部,VAR3大盘),COLOR330088;{---------------------------------密集成本突破-----------------------------}最高获利参数:=顶部/100;VAR1C:=(COST(89)-COST(11))*最高获利参数;VAR2C:=(COST(99.9)-COST(1))*最高获利参数;单峰:=((1-VAR1C/VAR2C))*顶部;低密:=((COST(90)-COST(60))/VAR2C)*顶部;高密:=((COST(40)-COST(1))/VAR2C)*顶部;赢利:= (SMA(WINNER(AMOUNT/VOL/99),2,1))*顶部;活跃度:顶部-顶部/(1+EXPMA(HSL,21)),COLOR774455;{←CYF公众追涨热情指标}70%成本集中度:=IF(VAR1C>顶部,顶部,VAR1C),COLORFFFFFF;90%成本集中度:=IF(VAR2C>顶部,顶部,VAR2C),COLORFF0000;套牢筹码上升:=IF((单峰-赢利)>底部,(单峰-赢利),底部);个股散户:=IF(套牢筹码上升>顶部,顶部,套牢筹码上升),COLOR408000;散户:IF(个股散户=DRAWNULL,DRAWNULL,个股散户),COLOR408000;获利筹码上升:=IF((赢利-单峰)>底部,(赢利-单峰),底部);个股主力:=IF(获利筹码上升>顶部,顶部,获利筹码上升),COLOR330088;主力:IF(个股主力=DRAWNULL,DRAWNULL,个股主力),COLOR330088;{--------------------换手率,五日换手率辅助判断个股活跃度-------------------}换手:SUM(VOL,1)/CAPITAL*100,COLOR666666,NODRAW;⑤日换:SUM(VOL,5)/CAPITAL*100,COLOR999999,NODRAW;{----------------------密集成本突破指标筹码峰画线--------------------------}金色背景修边1:STICKLINE(C>0 AND CURRBARSCOUNT>=2,顶部,底部,3.05,0),COLOR003333;金色背景修边2:STICKLINE(C>0 AND CURRBARSCOUNT>=2,顶部,中轴,3.05,0),COLOR003333;金色背景补充:DRAWBAND(顶部,RGB(51,51,0),中轴,RGB(51,51,0));金色背景:DRAWBAND(顶部,RGB(51,51,0),底部,RGB(128,128,128));追涨热度峰紫色:DRAWBAND(活跃度,RGB(66,52,81),底部,RGB(204,0,0));高密峰墨蓝色:=DRAWBAND(高密,RGB(0,0,51),底部,RGB(0,0,255));低密峰纯蓝色:=DRAWBAND(低密,RGB(0,0,102),底部,RGB(0,0,255));90%成本峰:DRAWBAND(90%成本集中度,RGB(0,0,153),底部,RGB(0,0,153)); 70%成本峰:DRAWBAND(70%成本集中度,RGB(0,128,0),底部,RGB(255,255,255));散户峰绿色:DRAWBAND(散户,RGB(0,64,0),底部,RGB(204,0,0));主力峰红色:DRAWBAND(主力,RGB(102,26,51),底部,RGB(0,0,255));MACD多空趋势:DRAWBAND(MACD多头,RGB(204,51,51),空头,RGB(0,179,0)); MACD多头重画:DRAWBAND(MACD多头,RGB(153,153,51),MACD多头,RGB(153,153,51));MACD空头重画:DRAWBAND(空头,RGB(0,204,0),空头,RGB(0,204,0));{--------若水论坛‘131488’会员提供的通达信■新宝塔线■-----原码-----------}VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); 三平底翻金:=(REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1))AND VAR1;主力启动线:=MA(V,5),COLORFFFFFF;主力洗盘线:=MA(V,35),COLOR00FFFF;资金异动线:=MA(V,135),COLORFF0000;{----------------------------买卖参考--------------------------------------}出击:=(CROSS(主力启动线,资金异动线) OR ((主力洗盘线 > 资金异动线) AND CROSS(主力启动线,主力洗盘线))),COLORYELLOW;启动:=(主力启动线>REF(主力启动线,1) AND (CROSS(VOL,主力启动线) AND (REF(VOL,1)<REF(资金异动线,1) OR REF(VOL,2)<REF(资金异动线,2)))),COLOR45AAEE;成立:=三平底翻金 AND (出击 OR 启动);买入提示:=IF(成立=1,海面*0.5,0) AND 分时判断=1;{------------------------顶部线,天际线,海面线,底部线重画-------------------}顶部线:DRAWBAND(顶部,RGB(51,0,255),顶部,RGB(51,0,255));天际线:DRAWBAND(天际,RGB(128,64,64),天际,RGB(128,64,64));海面线:DRAWBAND(海面,RGB(0,153,153),海面,RGB(0,153,153));{------------------------超前MACD多空量能柱--------------------------------}超前MACD红柱1:STICKLINE(超前MACD>=中轴,超前MACD,中轴,1.50,0),COLOR226688;超前MACD红柱2:STICKLINE(超前MACD>=中轴,超前MACD,中轴,0.95,0),COLOR4488BB;超前MACD红柱3:STICKLINE(超前MACD>=中轴,超前MACD,中轴,0.31,0),COLOR55AADD;超前MACD兰柱1:STICKLINE(超前MACD<=中轴,超前MACD,中轴,1.50,0),COLOR006600;超前MACD兰柱2:STICKLINE(超前MACD<=中轴,超前MACD,中轴,0.95,0),COLOR007700;超前MACD兰柱3:STICKLINE(超前MACD<=中轴,超前MACD,中轴,0.31,0),COLOR008800;{--------------------------MACD多空量能柱----------------------------------}MACD红柱1:STICKLINE(量能柱>=中轴,量能柱,中轴,1.5,0),COLOR000077; MACD红柱2:STICKLINE(量能柱>=中轴,量能柱,中轴,1.1,0),COLOR000088; MACD红柱3:STICKLINE(量能柱>=中轴,量能柱,中轴,0.6,0),COLOR000099; MACD红柱4:STICKLINE(量能柱>=中轴,量能柱,中轴,0.15,0),COLOR0000AA; MACD兰柱1:STICKLINE(量能柱<=中轴,量能柱,中轴,1.5,0),COLORAA6633;MACD兰柱2:STICKLINE(量能柱<=中轴,量能柱,中轴,1.1,0),COLORBB7744; MACD兰柱3:STICKLINE(量能柱<=中轴,量能柱,中轴,0.6,0),COLORCC8855; MACD兰柱4:STICKLINE(量能柱<=中轴,量能柱,中轴,0.15,0),COLORDD9966; {---------中轴线重画及顶部线,天际线,海面线,底部线,多空线文字说明-----------}中轴线:DRAWBAND(中轴,RGB(128,128,255),中轴,RGB(128,128,255));顶部线文字:DRAWTEXT(CURRBARSCOUNT=1,顶部*0.98,' 顶部线'),COLORFF0033;天际线文字:DRAWTEXT(CURRBARSCOUNT=1,天际*0.98,' 天际线'),COLOR404080;海面线文字:DRAWTEXT(CURRBARSCOUNT=1,海面,' 海面线'),COLOR999900; 底部线文字:DRAWTEXT(CURRBARSCOUNT=1,底部,' 底部线'),COLOR669999; 中轴线文字:DRAWTEXT(CURRBARSCOUNT=1,中轴,' 多空线'),COLORFF8080; {-------------------------------传统KDJ指标线重画--------------------------}D线重画:DRAWBAND(D,RGB(255,255,0),D*0.998,RGB(255,255,0));K线重画:DRAWBAND(K,RGB(255,255,255),K,RGB(255,255,255));J线重画:DRAWBAND(J,RGB(255,0,255),J,RGB(255,0,255));【通达信】主力动向(分时、MACD定位顶底、MACD趋势)-指标公式效果图(文档来源:若水财经社区)。