通达信 指标公式源码大全

合集下载

通达信副图指标公式源码大全

通达信副图指标公式源码大全

副图指标公式源码1、百万踏浪(相传为杨百万看图公式)N1:=9;N:=3;V AR1:=REF(CLOSE,1);标尺:SMA(MAX(CLOSE—V AR1,0),5,1)/SMA(ABS(CLOSE-V AR1),5,1)*100; V AR2:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)—LLV(LOW,N1))*100;V AR3:=SMA(V AR2,3,1);V AR4:=SMA(V AR3,3,1);V AR5:=SMA(V AR4,3,1);浪: V AR3,COLORBLUE;波:V AR4, COLORRED;段: V AR5 ,COLORYELLOW;V AR6:=CROSS(V AR3,V AR4)AND VAR4<25;STICKLINE(V AR6,0,V AR4+15,5,0),COLORGREEN;V AR7:=CROSS(V AR4,V AR5) AND V AR4<25;V AR8:=V AR7 AND VOL〉REF(VOL,1)*2 AND VOL〉REF(MA(VOL,5),1)*2; STICKLINE(VAR7,0,V AR4+55,5,0),COLORWHITE;DRAWTEXT(V AR7 AND COUNT(V AR7,10)=1,V AR4+25,'抄底’),COLORYELLOW;STICKLINE(VAR8,0,V AR4+15,5,0),COLORBLUE;DRAWTEXT(V AR8 AND COUNT(V AR8,10)=1,V AR4—1,’放量'),COLORGREEN;V AR9:=CROSS(V AR3,V AR4)AND V AR4>80 AND V AR4〉V AR5;STICKLINE(V AR9 AND COUNT(V AR9,5)=1,V AR4-5,100,5,0),COLORYELLOW;V ARA:=CROSS(V AR5,V AR4)AND REF(V AR4,1)>80;STICKLINE(VARA,V AR4-15,100,15,0), COLORYELLOW;DRAWTEXT(VARA AND COUNT(V ARA,10)=1,V AR4—25,'逃顶’), COLORYELLOW; V AR1A:=(CLOSE—LLV(LOW,15))/(HHV(HIGH,15)—LLV(LOW,15))*100;V AR1B:=SMA((SMA(V AR1A,4,1)—50)*2,3,1);V AR1C:=(INDEXC—LLV(INDEXL,14))/(HHV(INDEXH,14)—LLV(INDEXL,14))*100;V AR1D:=SMA(V AR1C,4,1);V AR1E:=SMA(V AR1D,3,1);V AR1F:=(HHV(HIGH,30)—CLOSE)/CLOSE*100;V ARE:=REF(LOW,1)*0。

通达信指标公式源码 资金流向指标

通达信指标公式源码 资金流向指标

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;{//主力控盘筹码比率}ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90);{//走牛天数}ZSHJJ:=EMA(ZSHTL,89);{//散户警戒}ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//资金流入强度}SH8:=EMA(ZSHTL,8);DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);{散户套牢筹码}STICKLINE(C>0,ZSHTL,ZZLKP,0,0),COLOREEEEEE;{散户筹码警戒}STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,1,0),COLORAAAAAA;{主力控盘筹码}STICKLINE(C>0,ZZLKP,0,0,0),COLORBLUE;{铸顶风险区}STICKLINE(ZZLKP>75,ZZLKP,0,2,0),COLORFFFFFF;{顶部:(ZZLKP>75),COLORFFFFFF;}{主力筹码警戒}STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,4,0),COLORRED;{筑底散兵坑}STICKLINE(ZSHTL>=90,ZZLKP,0,5,0),COLOR66FFCC;{底部:(ZSHTL>=90),COLOR66FFCC;}{筹码总量上升}IF(ZCMZL,ZCMZL>REF(ZCMZL,1),DRAWNULL),COLOR0066FF,LINETHICK1; {增量资金};{//------【数值显示】}散户套牢系数:INTPART(ZSHTL),COLORYELLOW;主力控盘系数:INTPART(ZZLKP),COLORCYAN;资金流入强度:ZJLRQD,LINETHICK2,COLORRED;市场筹码总量:INTPART(ZCMZL),COLORWHITE,NODRAW;。

通达信指标大全

通达信指标大全

通达信指标公式大全通达信指标公式大全分类:指标公式源码VAR6*0.96+VAR1*0.558+VAR2*0.558+VAR3*0.558)/6,21);VAR8:=EMA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR1*0.55+VAR2*0.55+VAR3*0.65)/6,21);VAR9:=EMA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR1*0.68+VAR2*0.68+VAR3*0.68)/6,21);VARA:=EMA((VAR7*3+VAR8*2+VAR9)/6*1.738,21);VARB:=REF(LOW,1);VARC:=SMA(ABS(LOW-VARB),3,1)/SMA(MAX(LOW-VARB,0),3,1)*100;VARD:=EMA(IF(CLOSE*1.35<=VARA,VARC*10,VARC/10),3);VARE:=LLV(LOW,30);VARF:=HHV(VARD,30);VAR10:=IF(MA(CLOSE,58),1,0);快枪:EMA(IF(LOW<=VARE,(VARD+VARF*2)/2,0),3)/618*VAR10,COLORRED;{绪强-权证五分线}(主未来)PER=0 50 1,PE=0 50 3,N=0 50 9,M1=0 50 3,M2=0 50 4,M3=0 50 4VAR2:=((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)));VARA:=((REF(VAR9,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VARB:=((REF(VARA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VARC:=((REF(VARB,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VARD:=((REF(VARC,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); STICKLINE((((((((((((VAR2 OR VAR3) OR VAR4) OR VAR5) OR VAR6) OR VAR7) OR VAR8) OR VAR9) OR VARA) OR VARB) OR VARC) OR VARD),CLOSE,REF(CLOSE,1),3,0),COLORRED;VARE:=((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)));VAR19:=((REF(VAR18,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); STICKLINE((((((((((((VARE OR VARF) OR VAR10) OR VAR11) OR VAR12) OR VAR13) OR VAR14) OR VAR15) OR VAR16) OR VAR17) OR VAR18) OR VAR19),CLOSE,REF(CLOSE,1),3,1),COLORFF9900; VAR1A:=(REF((((((((((((VARE OR VARF) OR VAR10) OR VAR11) OR VAR12) OR VAR13) OR VAR14) OR VAR15) OR VAR16) OR VAR17) OR VAR18) OR VAR19),1) AND VAR2);STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0)COLORYELLOW;AA:=(REF((((((((((((VAR2 OR VAR3) OR VAR4) OR VAR5) OR VAR6) OR VAR7) OR VAR8) OR VAR9) OR VARA) OR VARB) OR VARC) OR VARD),1) AND VARE);STICKLINE(AA,REF(CLOSE,1),REF(CLOSE,2),3,0)COLORGREEN;YC_AA:=(O+C)/2;趋势线:DMA(YC_AA,VOL/SUM(VOL,8)),NODRAW,;强势线:DMA(YC_AA,VOL/SUM(VOL,36)),NODRAW,COLORYELLOW;强牛线:DMA(YC_AA,VOL/SUM(VOL,70)),NODRAW,COLORRED;IF(趋势线>REF(趋势线,1),趋势线,DRAWNULL),LINETHICK2,COLORRED;ZIG(3,PER),COLOR33FFFF;QQ:=ZIG(3,PE),COLOR00FFFF;Z1:=ZIG(1,M3);Z2:=ZIG(4,M3);K1:=BACKSET(QQ>REF(QQ,1),2);强QQ:IF(K1,QQ,DRAWNULL),COLORRED,LINETHICK2;K2:=BACKSET(QQ<REF(QQ,1),2);弱QQ:IF(K2,QQ,DRAWNULL),COLOR33FF33,LINETHICK2;{DRAWTEXT(CROSS(Z1,REF(Z1,1)),L,'●'),COLORYELLOW;DRAWTEXT(CROSS(REF(Z1,1),Z1),L,'●'),COLOR BLUE;}DRAWTEXT(CROSS(Z2,REF(Z2,1)),L,'●买'),COLORRED;DRAWTEXT(CROSS(REF(Z2,1),Z2),L,'●卖'),COLORGREEN;MB: MA(CLOSE,20);上极限: MB+2*STD(CLOSE,20);下极限: MB-2*STD(CLOSE,20);{MACD公式}副\权证DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);MACD:=EMA(DIF,9),COLOR33CCFF;DEF:2*(DIF-MACD),COLORFFFF00,LINETHICK0;STICKLINE(DEF>=0 AND DEF>=REF(DEF,1),0,DEF,3,1),COLOR6058FF;STICKLINE(DEF>=0 AND DEF< REF(DEF,1),0,DEF,3,0),COLOR6058FF;STICKLINE(DEF<0 AND DEF>=REF(DEF,1),0,DEF,3,1),COLORFF99FF;STICKLINE(DEF<0 AND DEF< REF(DEF,1),0,DEF,3,0),COLORFFFF00;IF(DIF<1000,0,DRAWNULL),COLORBROWN;多头趋势:=IF(DIF>=0 AND MACD>=0 OR (DIF<0 AND MACD>=0),1,0);空头趋势:=DIF<0 AND MACD<0 OR (DIF>=0 AND MACD<0);缩头:=IF(DEF>0 AND REF(DEF,1)>REF(DEF,2) AND DEF< REF(DEF,1),1,0);缩脚:=IF(DEF<0 AND REF(DEF,1)< REF(DEF,2) AND DEF>REF(DEF,1),1,0);阻力:=IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),1,0);支撑:=IF(CROSS(MA(C,20),C) OR CROSS(MA(C,60),C),1,0);做多:=IF(CROSS(MACD,DIF) AND DIF>0 AND MACD>0,1,0);放空:=IF(CROSS(DIF,MACD) AND DIF<0 AND MACD<0,1,0);K1:=BACKSET(DIF>REF(DIF,1),2);强DIF:IF(K1,DIF,DRAWNULL),COLORRED,LINETHICK2;K2:=BACKSET(DIF<REF(DIF,1),2);弱DIF:IF(K2,DIF,DRAWNULL),COLOR33FF33,LINETHICK2;IF(MACD<1000,MACD,DRAWNULL),COLOR33CCFF;DRAWICON(FILTER(缩头,3) AND 缩头,DEF+0.01,4);DRAWICON(FILTER(缩脚,3) AND 缩脚,DEF,9);DRAWICON(FILTER(阻力,16) AND DEF>=0,DEF+0.01,2);DRAWICON(FILTER(支撑,16) AND DEF<0,DEF,2);{理财}副\权证VAR1:=EMA(HHV(HIGH,500),21);VAR2:=EMA(HHV(HIGH,250),21);VAR3:=EMA(HHV(HIGH,90),21);VAR4:=EMA(LLV(LOW,500),21);VAR5:=EMA(LLV(LOW,250),21);VAR6:=EMA(LLV(LOW,90),21);VAR7:=EMA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR1*0.558+VAR2*0.558+VAR3*0.558)/6,21) ;VAR8:=EMA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR1*0.55+VAR2*0.55+VAR3*0.65)/6,21); VAR9:=EMA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR1*0.68+VAR2*0.68+VAR3*0.68)/6,21); VARA:=EMA((VAR7*3+VAR8*2+VAR9)/6*1.738,21);VARB:=REF(LOW,1);VARC:=SMA(ABS(LOW-VARB),3,1)/SMA(MAX(LOW-VARB,0),3,1)*100;VARD:=EMA(IF(CLOSE*1.35<=VARA,VARC*10,VARC/10),3);VARE:=LLV(LOW,30);VARF:=HHV(VARD,30);VAR10:=IF(MA(CLOSE,58),1,0);VAR11:=EMA(IF(LOW<=VARE,(VARD+VARF*2)/2,0),3)/618*VAR10;VAR12:=IF(VAR11>40,10,VAR11);STICKLINE(VAR12>8,0,VAR12,3,1),COLORMAGENTA;VAR13:=HHV(HIGH,30);VAR14:=LLV(LOW,30);D: EMA((CLOSE-VAR14)/(VAR13-VAR14)*100,5), , COLORRED LINETHICK2;K: EMA((CLOSE-VAR14)/(VAR13-VAR14)*100,20), , LINETHICK2 COLORFF9933;K1:=BACKSET(K>REF(K,1),2);强K:IF(K1,K,DRAWNULL),COLOR33FFFF,LINETHICK2;底: 5, ,POINTDOT LINETHICK2 COLORMAGENTA;DRAWTEXT(CROSS(底,D),D+10,'机会'),COLORWHITE;强弱分界: 50 ,POINTDOT ;DRAWTEXT(FILTER(D>90,13),D-10,'风险'), COLORWHITE;DRAWTEXT(CROSS(K,D) AND D>55,D-10,'死叉'), COLORWHITE ;DRAWTEXT(CROSS(D,K) AND D<34,D+10,'金叉'), COLORYELLOW;0, POINTDOT LINETHICK2 COLORMAGENTA;【雪飞短线】(副){p1:3,16,8}{p2:2,12,5}{p3:2,10,4}Var1:=(CLOSE-LLV(LOW,P1))/(HHV(HIGH,P1)-LLV(LOW,P1))*100;Var2:=EMA(Var1,P2);Var3:=EMA(Var2,4);Var4:=HHV(Var3,0);Var5:=LLV(Var3,0);Var6:=EMA(Var2,P1);Var7:=3*Var2-2*Var6;Var8:=EMA(Var7,5);Var9:=EMA(Var7,10);VarA:=LLV(LOW,50);VarB:=HHV(HIGH,50);VarC:=EMA(CLOSE,3);VarD:=(VarC-VarA)/(VarB-VarA)*100;VarE:=EMA(VarD,3);VarF:=EMA(VarE,16);TX: Var4+4,coloryellow;MK: Var3,colorf00ff0;Var10:=EMA(Var6,P3);MJ: EMA(Var8,2),color00ff00;RR: EMA(VarF,20), CIRCLEDOT,colorwhite;DX: Var5-3,colorf0f000;双向成交量预测EV:=VOL,;实际V:EV/10000,LINETHICK0;VAR1:=DYNAINFO(17)*REF(MA(VOL,5),1);VAR2:=DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT;预测:IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR1,VAR2)/10000;{IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR1,VAR3),COLORGREEN;} 预测V:STICKLINE(IF(DYNAINFO(7)=CLOSE ANDDYNAINFO(10)=AMOUNT,VAR1,VAR2),VAR1,0,4,1),COLORGREEN;AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));主动买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),POINTDOT,COLORRED;主动买万:主动买盘/10000,COLORRED,NODRAW;主动卖盘:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORGREEN;主动卖万:主动卖盘/10000,COLORGREEN,NODRAW;换手率%:VOL/CAPITAL*100,POINTDOT,COLORYELLOW;流通盘(亿):CAPITAL/1000000,POINTDOT;流通市值(亿):(CAPITAL/100*C)/10000,POINTDOT,COLOR33CCFF;成交额(千万):AMOUNT/10000000,POINTDOT;STICKLINE(主动买盘>0,0,VOL,2,1),COLORWHITE;STICKLINE(主动买盘>0,0,主动买盘,2,0),COLORRED;STICKLINE(主动卖盘<0,0,主动卖盘,2,0),COLORGREEN;VOL 地量探针_成交量:VOL,VOLSTICK;__MVOL5:MA(_成交量,5),COLORWHITE;__MVOL10:MA(_成交量,10),COLORYELLOW;__地量探针:IF(VOL/CAPITAL>0.01,0,EXP(ABS(LOG(VOL/CAPITAL*100)))*3*V),COLORGREEN;预测量:STICKLINE(DYNAINFO(7)=CLOSE ANDDYNAINFO(10)=AMOUNT,VOL,MAX(VOL,DYNAINFO(17)*REF(MA(VOL,5),1)),2,1),COLORWHITE; 低靡量:STICKLINE(HSL>=1 AND HSL<2,VOL/2,0,3,0),COLORWHITE;温和量:STICKLINE(HSL>=2 AND HSL<3,VOL/2,0,3,0),COLORYELLOW;活跃量:STICKLINE(HSL>=3 AND HSL<5,VOL/2,0,3,0),COLORMAGENTA;带量: STICKLINE(HSL>=5 AND HSL<8,VOL/2,0,3,0),COLORDB5D24;放量: STICKLINE(HSL>=8 AND HSL<15,VOL/2,0,3,0),COLOR0000D3;巨量: STICKLINE(HSL>=15 AND HSL<=25,VOL/2,0,3,0),COLOR004CFE;_低靡:2,NODRAW,COLORWHITE;_温和:3,COLORYELLOW;_活跃:5,COLORMAGENTA;_带_量:8,COLORDB5D24;_放_量:15,COLOR0000D3;{_巨_量:0,COLOR004CFE;}{V1:=REF(MA(VOL,5),1);}{预测量:=IF(DYNAINFO(7)=CLOSE,DYNAINFO(17)*V1,VOL);}{STICKLINE(预测量,0,预测量,3.5,1),COLORWHITE;};机构之星(幅)AA:=LLV(LOW,36);BB:=HHV(HIGH,30);DD:=(EMA(((CLOSE-AA)/(BB-AA))*(4),4))*(25);股海神偷:DD,Color00FFFF,LINETHICK1;股海:=(((DD-LLV(DD,21))/(HHV(DD,21)-LLV(DD,21)))*(4))*(25);跟踪:10,Color0000FF;神偷出现:IF((COUNT((股海神偷>REF(股海神偷,1)),1)=1) AND (REF(股海神偷,1)<REF(REF(股海神偷,1),1)) AND (股海神偷<跟踪),50,0),Color00FF00;QQ:=CROSS(神偷出现,跟踪);{目标出现:IF(CROSS(股海,90) AND (股海神偷<40),40,0),ColorFFFF00;}目标出现:IF(CROSS(股海,5) AND (QQ<10),40,0),ColorFFFF00;Var1:=EMA(EMA(CLOSE,13),13);控盘:= (Var1-REF(Var1,1))/REF(Var1,1)*5000;a10:=CROSS(控盘,0);开始控盘:if(a10,8,0),colorFFFFFF;STICKLINE(控盘<0,控盘,0,4,0),colorwhite;无庄控盘:0,colorwhite;STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,4,1),colorred;有庄控盘: 0,colorred;Var2:=100*WINNER(CLOSE*0.95);STICKLINE(控盘<REF(控盘,1) AND 控盘>0,控盘,0,4,0),color00ff00;主力出货: 0,color00ff00;STICKLINE(Var2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,4,0),colorff00ff;高度控盘: 0,colorff00ff;风险:80,ColorFF00FF;狼狗:87.5,Color00FF00;神针买卖 (主图)支撑价:LLV(LOW,19),LINETHICK2 , COLOR00FF00;阻力价:HHV(HIGH,19),COLORBLUE, LINETHICK2;VAR1:=EMA(CLOSE,12)-EMA(CLOSE,26);VAR2:=EMA(VAR1,9);VAR3:=(CLOSE*2.5/100+CLOSE);VAR4:EMA(C,3);VAR5:=LLV(HIGH,240);VAR6:=100*(CLOSE-VAR5)/VAR5;VAR7:=REF(LLV(CLOSE,480),1);VAR8:=REF(HHV(CLOSE,480),1);VAR9:=100*(CLOSE-VAR7)/(VAR8-VAR7);VARA:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100;VARB:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100;VARC:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100;VARD:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100;VARE:=VARC>98.5 OR VARD>98.5;VARF:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4;VAR13:=VARA=0 AND VARC=0 AND VAR6<0;VAR14:=VARA=100 AND VARC=100;VAR15:=VARB=0 OR VARD=0 AND VAR9<0;VAR16:=VARB=100 AND VARD=100;VAR17:=VAR6<0 AND VAR9<0;VAR18:=VAR13 AND VAR15;VAR19:=VAR14 AND VAR16;VAR1B:=SMA(MAX(CLOSE-REF(CLOSE,1),0),49,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;VAR1C:=SMA(MAX(CLOSE-REF(CLOSE,1),0),14,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),14,1)*100;VAR1D:=BARSCOUNT(CLOSE);VAR1E:=VAR1B<20 AND VAR1C<23 AND VAR1D>35;VAR1F:=VAR1E AND COUNT(VAR1E,1)=1;VAR20:=REF(CLOSE,1);VAR21:=SMA(MAX(CLOSE-VAR20,0),34,1)/SMA(ABS(CLOSE-VAR20),7,1)*100;VAR22:=SMA(MAX(CLOSE-VAR20,0),13,1)/SMA(ABS(CLOSE-VAR20),13,1)*100;VAR23:=BARSCOUNT(CLOSE);VAR24:=VAR21<20 AND VAR22<23 AND VAR23>35;VAR25:=VARA=0 AND VARF<1.2 AND VAR17;VAR27:=VAR18 AND VARF<1.2 AND VAR17;VAR29:=SUM(HIGH-OPEN,77)/SUM(OPEN-LOW,77)*100;VAR2A:=SUM(MAX(0,HIGH-REF(CLOSE,1)),77)/SUM(MAX(0,REF(CLOSE,1)-LOW),77)*100;VAR2B:=CROSS(VAR29,69) AND CROSS(VAR2A,80)<150;VAR2C:=VAR24 AND VAR1F AND COUNT(VAR24,30)=1;买点:=VAR25 AND VAR2B;绝对卖点:=(VAR19 OR VARA)AND VARF>23 OR VARE ;VAR2D:=VAR1F AND VAR2C AND VAR25;股海万元户:=(CLOSE/REF(CLOSE,1)>1.04 AND (CLOSE>10.8 AND CLOSE<10.83 OR CLOSE>6.86 AND CLOSE<6.88 OR CLOSE>13.82 AND CLOSE<13.84 OR CLOSE>7.28 AND CLOSE<7.3 OR CLOSE>12.4 AND CLOSE<12.42 OR CLOSE>22.33 AND CLOSE<22.35 OR CLOSE>4.68 AND CLOSE<4.7 OR CLOSE>26.29 AND CLOSE<26.31 OR CLOSE>7.65 AND CLOSE<7.67 OR CLOSE>13.4 ANDCLOSE<13.42 OR CLOSE>7.58 AND CLOSE<7.6 OR CLOSE>20.43 AND CLOSE<20.45 OR CLOSE>19.57 AND CLOSE<19.59 OR CLOSE>6.26 AND CLOSE<6.28 OR CLOSE>7.14 AND CLOSE<7.16 OR CLOSE>6.61 AND CLOSE<6.63 OR CLOSE>11.9 AND VOL<11.92 OR CLOSE>6.7 AND CLOSE<6.72 OR CLOSE>8.19 AND CLOSE<8.21));DRAWTEXT(FILTER(绝对卖点>0,3),H,'别贪'), COLOR00FF00;DRAWTEXT(股海万元户>0,L,'☆追涨'),COLORYELLOW ;DRAWICON(买点>0,L,4);DRAWTEXT(买点>0,L,'扫描神针'),COLORF00FF0;DRAWTEXT(VARF<0.7 AND VAR27 AND VAR25>0,L,'万元'),COLORYELLOW;STICKLINE(VAR2D>0,O,C,10,0), COLORRED;DRAWTEXT(VAR2D>0,L,'大方神针'),COLORRED;DRAWICON(COUNT(REF(VAR4,1)<REF(VAR4,2),5)=5 AND VAR4>REF(VAR4,1),L*0.98,4); DRAWICON(FILTER(COUNT(VAR6<0,5)AND CROSS(VAR6,0)AND VARF>REF(VARF,1)ANDC>O,3),L,1);DRAWICON(FILTER(REF(VAR4,1)>REF(VAR4,2)AND VAR4<REF(VAR4,1)AND VARF>17 AND VAR1>VAR2,5),H,2);DRAWICON(阻力价>REF(阻力价,1)AND CROSS(阻力价,VAR3)AND C<O,H*1.02,5);日周月KDJ金死叉(副)DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));DEA:=EMA(DIFF,9),COLORFF00FF,LINETHICK2;CD:=2*(DIFF-DEA),COLORSTICK,LINETHICK2;STICKLINE(((CD<REF(CD,1)) AND (CD > 0)),0,20,2,0),LINETHICK2,COLOR00FF66; STICKLINE(((CD>REF(CD,1)) AND (CD < 0)),0,20,2,0),LINETHICK2,COLORFF00FF;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:SMA(RSV,3,1),COLORWHITE;D:SMA(K,3,1),COLORYELLOW;J:3*K-2*D,COLORRED;周K:="KDJ.K#WEEK"(9,3,3);周D:="KDJ.D#WEEK"(9,3,3);月K:="KDJ.K#MONTH"(9,3,3);月D:="KDJ.D#MONTH"(9,3,3);DRAWICON(K<20 AND CROSS(K,D),D,1);周金:DRAWTEXT(CROSS(REF(周K,1),REF(周D,1)) ,D,'▲'),COLORRED;周叉:DRAWTEXT(CROSS(REF(周D,1),REF(周K,1)) ,D*1.5,'▼'),COLORGREEN;月金:DRAWTEXT(CROSS(REF(月K,1),REF(月D,1)) ,D,'▲'),CO LORWHITE;月叉:DRAWTEXT(CROSS(REF(月D,1),REF(月K,1)) ,D*1.5,'▼'),COLORYELLOW;起涨:IF(DIFF<0,30,0),COLORYELLOW,LINETHICK2;大涨:IF(DIFF<0,0,DIFF),COLORWHITE,LINETHICK2;下跌:IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK2;总趋:IF(DIFF>DEA,DEA,DEA)*60,COLORFF00FF,LINETHICK2;AA:=CROSS(DIFF,DEA);DRAWICON(AA,-0.02,5);股经宝典(副)未来D:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,20);J:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,5) ;BIAS1W :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;BIAS2W :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;BIAS3W :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;MM:=(BIAS1W+2*BIAS2W+3*BIAS3W)/6;MN:=MA(MM,3);VAR1:=(HHV(HIGH,24)-CLOSE)/(HHV(HIGH,24)-LLV(LOW,24))*100;VAR2:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;VAR3:=(2*CLOSE+HIGH+LOW)/4;VAR5:=HHV(HIGH,34);VAR6:=EMA((VAR3-VAR4)/(VAR5-VAR4)*100,16);VAR7:=SMA((SMA(VAR2,3,1)+3),3,1),LINETHICK3;VAR8:=EMA(VAR6,7);VAR9:=SMA(VAR1,3,1);VAR10:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;VAR11:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;VAR12:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;VAR13:=(VAR10+VAR11+VAR12)/3;VAR14:=IF(VAR13<=-20,10,0);VAR15:=HHV(VAR14,10);VAR24:=LLV(LOW,36);VAR25:=HHV(HIGH,30);VAR26:=EMA((CLOSE-VAR24)/(VAR25-VAR24)*4,4)*25;{150;0;}兜底:IF(CROSS(MA(C,3),MA(C,7)) AND VAR15,40,0),LINETHICK3,COLORRED ;铁底:IF(CROSS(VAR7,VAR8),0,0),LINETHICK7,COLOR00FF00;底线:55;顶线:80,POINTDOT,LINETHICK2;K:EMA(D,3),COLOR00FF00,LINETHICK2;M:EMA(J,7),COLORWHITE,LINETHICK2;J,COLORRED,LINETHICK4;IF(MN<-4 ,20,0),COLOR00FF00,LINETHICK3;底背离: IF((VAR26<10),110,150), , COLORYELLOW,LINETHICK3;顶背离: IF((VAR26>90),40,0), COLORFFFFFF,LINETHICK3;DRAWICON(CROSS(ZIG(J,M) ,REF(ZIG(J ,M),1)) ,LOW*0.98,1);金牌RSI(副){参数:N1,1,100,5;N2,1,100,10;}LC := REF(CLOSE,1);RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,Color9900FF,LINETHICK1; RSI2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100,Coloryellow,LINETHICK1; 强弱分界线:50,Colorffffcc;0,Colorffff33;20,Color00ff00;80,Color00ff00;100,Colorffff33;v1:=llv(low,10);v2:=hhv(h,25);价位线:=ema((c-v1)/(v2-v1)*4,4);DRAWTEXT(CROSS(价位线,0.3),12,'买'),Colorffffcc;DRAWTEXT(CROSS(3.5,价位线),98,'卖'),Colorffffcc;Var2q:=REF(LOW,1);Var3q:=SMA(ABS(LOW-Var2q),3,1)/SMA(MAX(LOW-Var2q,0),3,1)*100;Var4q:=EMA(IF(CLOSE*1.3,Var3q*10,Var3q/10),3);Var6q:=HHV(Var4q,30);Var7q:=IF(MA(CLOSE,58),1,0);Var8q:=EMA(IF(LOW<=Var5q,(Var4q+Var6q*2)/2,0),3)/618*Var7q;Var9q:=IF(Var8q>100,100,Var8q);AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;AA5:=SMA(AA4,13,8);走势:=CEILING(SMA(AA5,13,8));AA6:=SMA(AA3,21,8);资金监控(副)R:=V/1000000;R1:=IF(C>REF(C,1),R,IF(C<REF(C,1),(-1)*R,0));R3:=SUM(R1,8);A:R3*OPEN,POINTDOT,COLORFFCC00;B:R3*C,POINTDOT,COLORFFCC00;AB:STICKLINE(B>=REF(B,1),REF(B,1),B,5,0),COLORRED;BA:STICKLINE(B<REF(B,1),REF(B,1),B,5,0),COLORGREEN;快线:MA(B,5),COLORYELLOW,LINETHICK2;慢线:MA(B,30);资金监控: 2*(EMA(CLOSE,10) - EMA(CLOSE,24)-EMA(EMA(CLOSE,10) - EMA(CLOSE,24),9)), COLORSTICK;猎枪(副)猎枪:sma(SMA((C-LLV(L,80))/(HHV(H,80)-LLV(L,80))*100,10,1),10,1),linethick2;收兵:SMA(猎枪,10,1),linethick2,color808000;W1:=SMA((HHV(H,80)-C)/(HHV(H,80)-LLV(L,80))*100,10,1);瞄准:SMA(W1,10,1),POINTDOT,COLOR00DD00,LINETHICK2;天空:stickline(c,85,85,5,1);大地:stickline(c,9,9,5,1);w2:=(CROSS(收兵,猎枪) and 收兵>20);w3:=(CROSS(猎枪,收兵) and 收兵<20);DRAWTEXT(CROSS(收兵,猎枪) and 收兵>20,58,'杀'),COLORFF00FF;DRAWTEXT(CROSS(收兵,猎枪) and 收兵<50 and 收兵>20,猎枪,' 留意!'),COLORFF00FF;if(w2,60,85),color00dd00;if(w3,40,9),colorff00ff;DRAWTEXT(CROSS(猎枪,收兵) and 收兵<20,48,'猎'),COLORff00ff;DRAWTEXT(CROSS(瞄准,80),82,'●'),COLORRED;DRAWTEXT(CROSS(瞄准,80),76,'瞄准'),COLORRED;DRAWTEXT(CROSS(瞄准,85),84,'●'),COLORWHITE;DRAWTEXT(CROSS(瞄准,85),78,'猎物出现'),COLORWHITE;var1:=4*SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1),3,1); var2:=8;底部出击: IF(CROSS(var1,var2),50,9),COLORRED;a1:=cross(猎枪,85) and 猎枪>=85;再来一枪:if(a1,60,85),coloryellow;回升浪(副){P1:1,250,5;P2:1,250,20;P3:1,250,30;N:1,10,3;}MA5:=MA(C,5),COLORWHITE;MA1:=MA(C,P1),COLORFF00FF;MA2:=MA(C,P2),COLOR00FF00;MA3:=MA(C,P3),COLORYELLOW;ZH12:=ABS(MA1-MA2)/MA2*100<=N;ZH13:=ABS(MA1-MA3)/MA3*100<=N;QSXS1:=MA1>=REF(MA1,1);QSXS2:=MA2>=REF(MA2,1);QSXS3:=MA3>=REF(MA3,1);GJHS:=C>MA1 AND QSXS1 AND NOT(REF(QSXS1,1));买1:(GJHS AND ZH12 AND QSXS2)*38,COLOR00FF00,linethick2;买2:(GJHS AND ZH13 AND QSXS3)*25,COLORRED,linethick2;优选:(买1 AND COUNT((MA1>MA2),5)=5) OR (买2 ANDCOUNT((MA1>MA3),5)=5),COLORWHITE,POINTDOT;DRAWICON(优选>0,0.30,1);回升优选:优选*18,COLORyellow,linethick2;{以下设置逃顶指标}varC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100; DRAWICON(CROSS(82,varC),0.3,2);{2K}RSV:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;短K:SMA(RSV,3,1),COLORWHITE;短D:SMA(短K,3,1),COLORYELLOW;STICKLINE(短K>短D,短K,短D,6,0),COLORYELLOW;STICKLINE(短K<=短D,短K,短D,6,0),COLORGREEN;VAR1:=HHV(HIGH,13)-LLV(LOW,13);VAR2:=HHV(HIGH,13)-CLOSE;VAR3:=CLOSE-LLV(LOW,13);VAR4:=VAR2/VAR1*100-70;VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;VAR6:=(2*CLOSE+HIGH+LOW)/4;VAR7:=SMA(VAR3/VAR1*100,3,1);VAR8:=LLV(LOW,34);VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);VAR10:=IF(VAR9>100,VAR9-100,0);VAR11:=HHV(HIGH,34);VAR12:=EMA((VAR6-VAR8)/(VAR11-VAR8)*100,13);VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,2);STICKLINE(VAR12-VAR13>0,VAR12,VAR13,8,0),COLORRED;STICKLINE(VAR12-VAR13<0,VAR12,VAR13,8,0),COLOR00FF0F;趋势线:EMA(VAR13,5), COLORYELLOW;出击:if(cross(VAR12,VAR13) and VAR12>VAR13 and VAR12<18,20,0) ,STICK,COLORRED;卖出:if(cross(VAR13,VAR12) and VAR12<VAR13 and VAR12>60,VAR13,88),pointdot,COLORBLUE;短趋势:EMA(SMA(MAX(C-REF(C,1),0),3,1)/SMA(ABS(C-REF(C,1)),3,1)*100,5),colorFF00FF,linethick1; 优选(主)公式原码如下:MA3:MA(C,3);MA10:=MA(C,10);MA20:=MA(C,20);MA30:MA(C,30);MA60:MA(C,60),COLORRED,LINETHICK2;BM1:=(C+O)/2;BM2:=COUNT(MA30>REF(MA30,1),5)=5 OR COUNT(MA60>REF(MA60,1),5)=5;BM3:=COUNT(MA3/MA30>REF(MA3/MA30,1),5)=5;BM4:=(BM1*2-REF(BM1,3));BM5:=C/MA(C,5);BM6:=REF(BM1/MA(BM1,5),1);BM7:=COUNT(BM6>BM5,3)=3;BM8:=C>O;买:=(CROSS(BM4,MA3) OR CROSS(BM4,MA30)) AND BM2 AND BM8 AND C>MA(C,60);优选:=买AND (BM7 OR REF(BM7,1) OR REF(BM7,2)),COLORYELLOW,LINETHICK2;{以下设置主图显示}STICKLINE(买,O,C,4,1),COLOR00FF00,LINETHICK2;DRAWTEXT(买,LLV(L,2)*0.98,'▲'),COLORYELLOW;DRAWTEXT(优选,LLV(L,2)*0.96, '优选'),COLORRED;DRAWICON(优选,LLV(L,2)*0.96, 1);STICKLINE(优选,O,C,4,1),COLORYELLOW,LINETHICK2;{以下设置逃顶}BM9:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;BM10:=3*SMA(BM9,3,1)-2*(SMA(SMA(BM9,3,1),3,1));DRAWICON(CROSS(90,BM10),H*1.03,2);{短线参考[副、未来]}LL:=REF(CLOSE,1);MM:=SMA(MAX(CLOSE-LL,0),6,1)/SMA(ABS(CLOSE-LL),6,1)*100;趋势1:=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),COLORYELLOW;可能回落1:IF(CROSS(87,趋势1),50,100),COLORFF00FF;可能回落2: IF(CROSS(80,MM),50,100),COLORYELLOW ;VAR1:=IF(MA(CLOSE,88),1,0);趋势:WINNER(AMOUNT/VOL/100)*100*VAR1,COLORFFCC66,LINETHICK2 ;VAR11:=(HHV(HIGH,21)-C)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;VAR22:=(C-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;VAR33:=SMA(VAR22,13,8);多方能量: SMA(VAR33,13,8),COLORRED,LINETHICK2;空方能量: SMA(VAR11,21,8),COLOR00DD00,LINETHICK2;风险区:90,POINTDOT,COLORFFCCCC;0,POINTDOT,COLORFF00FF;VARW17:=3;VARW18:=(3)*(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1))-(2)*(SMA(SM A(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1),3,1));介入:IF(CROSS(VARW18,VARW17),52,0),COLORWHITE,STICK,LINETHICK2;红军过雪山(副未来)STICKLINE(18,90,0,5,0),COLORE0D4B8;STICKLINE(18,50,38,5,0),COLORF0CCA8;STICKLINE(78,38,26,5,0),COLORE8D4A8;STICKLINE(18,22,12,5,0),COLORF0D4B0;STICKLINE(18,50,62,5,0),COLORE8C490;雪山:EMA(WINNER(C)*100,7),COLORWHITE;L1:=EMA(雪山,21);草地:ABS((COST(50)-CLOSE)/CLOSE*100),COLOR00FF00,LINETHICK1;STICKLINE(雪山>草地,草地,雪山,5,0),COLORWHITE;STICKLINE(雪山<REF(雪山,1),草地,雪山,5,0),COLORDEDDDD;STICKLINE(草地>雪山,草地,雪山,5,0),COLOR00BB00;STICKLINE(雪山>L1,L1,雪山,5,0),COLORRED;{鳄鱼线}主趋势:FORCAST(C,13),COLORFFFFFF,LINETHICK1;七:MA(C,7),COLOR00FFFF,LINETHICK2;涨:IF(MA(CLOSE,7)>REF(MA(CLOSE,7),1),MA(CLOSE,7),DRAWNULL),COLORRED,LINETHICK2; 平:IF(MA(CLOSE,7)=REF(MA(CLOSE,7),1),MA(CLOSE,7),DRAWNULL),COLOR00FFFF,LINETHICK3; 跌:IF(MA(CLOSE,7)<REF(MA(CLOSE,7),1),MA(CLOSE,7),DRAWNULL),COLORGREEN,LINETHICK2; C3:=REF(C,1);涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(涨停,OPEN,CLOSE,2,0),COLORRED;跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;乖离线:=((C-REF(COST(90),1))/20+250)*1.20;W1:=C=HHV(C,20);W2:=BARSLAST(W1);W3:=IF(W2>0,REF(C,W2),REF(C,W2));W4:=CROSS(C,REF(W3,1));突破盘整:=W4 AND COUNT(W4,5)=1;DRAWTEXT(突破盘整,L-0.10,1);VAR1:=(H+L)/2;上唇:REF(SMA(VAR1,5,1),3),COLORGREEN,LINETHICK1;牙齿:REF(SMA(VAR1,8,1),5),COLORRED,LINETHICK1,CROSSDOT;下颚:REF(SMA(VAR1,13,1),8),COLORBLUE,LINETHICK4,POINTDOT;MACD超前99庄(副未来)Z99:EMA(WINNER(C)*70,99)*0.12,COLORRED,LINETHICK2;SQX:=(Z99-MA(Z99,13))*100;DIFF:EMA(MA(SQX,13),1),COLOR00FFFF;DEA:EMA(DIFF,13),COLORFF33FF;MACD: (DIFF-DEA)*2,COLORSTICK;低位金叉:IF(CROSS(DIFF,DEA) AND DIFF<-0.1,0.3,0),COLORYELLOW,POINTDOT; STICKLINE(低位金叉,0,15,8,0),COLORYELLOW;DRAWICON(低位金叉,0.3,1);JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));二次金叉:IF(CROSS(DIFF,DEA) AND DEA<0 ANDCOUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;STICKLINE(二次金叉,30,15,8,0),COLORFF00FF;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:IF(REF(Z99,A1+1)>Z99 AND DIFF>REF(DIFF,A1+1) ANDCROSS(DIFF,DEA),0.1,0),COLORRED,POINTDOT;STICKLINE(底背离,45,30,8,0),COLORRED; DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED;A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));顶背离:REF(Z99,A2+1)<Z99 AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF),COLORGREEN; DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN;A3:=CROSS(DIFF,DEA) AND DEA<0;零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT;STICKLINE(零下二次金叉,45,60,8,0),COLORWHITE;HHVV(副未来)前放量上涨:=V=HHV(VOL,30) AND (C/REF(C,1)-1)>=0.03 AND WINNER(C)*100>95 ;前期条件:=BARSLAST(前放量上涨);地量止跌:=C>=REF(O,2) AND REF(V,2)=LLV(V,25);重整旗鼓:STICKLINE(地量止跌AND 前期条件,0,10,8,0),COLORRED;双保险操盘(副)主力:(((CLOSE - MA(LLV(LOW,40),40)) / MA(LLV(LOW,40),40)) * 100),colorF0F000;AA:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*1000;BB:=MA(AA,10);CC:=(((CLOSE - LLV(LOW,26)) / (HHV(HIGH,26) - LLV(LOW,26))) * 100);DD:=EMA(SMA(20*(DMA(C,2.5*MAX(IF(v/capital=0,V/700000000,v/capital),1.1*(MAX(H,REF(C,1))/MIN(L,REF(C,1))-1)))/REF(DMA(C,2.5*MAX(IF(v/capital=0,V/800000000,v/capital),1.1*(MAX(H,REF(C,1))/MIN(L,REF(C,1))-1))),1)-1),2,1),2);趋势:SMA(BB,3,1)/10,linethick1,colorred;判势:SMA(CC,32,1)-20,color00ff00,linethick1;理想论坛:DRAWTEXT(CROSS(趋势,判势),趋势+10,'买↑入'),LINETHICK2,colorwhite;建仓:DRAWTEXT(CROSS(判势,趋势),判势,'建↑仓'),LINETHICK2,coloryellow;加码:DRAWTEXT(CROSS(主力,判势),判势-10,'加▲码'),LINETHICK2,colorred;持仓区:if(DD>=0.005,100,107),coloryellow;空仓区:if(DD<=-0.005,100,107),colorff0000;变盘:if(BETWEEN(DD,0.005,-0.005),100,108),COLORff00ff ,linethick2;***专用(副) 挺不错的VAR1:=REF(CLOSE,2);***专用:SMA(MAX(CLOSE-VAR1,0),7,1)/SMA(ABS(CLOSE-VAR1),7,1)*100,COLORFFAA66;VAR2:=REF(CLOSE,1);VAR3:=SMA(MAX(CLOSE-VAR2,0),7,1)/SMA(ABS(CLOSE-VAR2),7,1)*100;极品逃亡:IF(***专用< REF(***专用,1) AND ***专用>79,***专用,0);DRAWTEXT(极品逃亡,70 ,'★<-极品逃亡'),COLORYELLOW,LINETHICK1;DRAWTEXT(88>0 AND REF(O,1)/REF(C,1)>1.04 AND REF(L,1)<=688 AND O>REF(C,1)ANDC<REF(O,1)AND C/O>=1.01,L-L*0.02,'★<--极品绝底初现'),LINETHICK1;DRAWTEXT(C-O>=0 AND O/L>1.05 AND L<=LLV(L,20),L,'★<--极品绝底'),COLORBLUE, LINETHICK1; Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;Q3:=SMA(Q2, 9, 1);Q4:=SMA(Q3, 3, 1);特殊***专用:3*Q3-2*Q4,COLORWHITE,LINETHICK2;Q8:=HHVBARS(HIGH, 50);Q10:=(CLOSE-REF(OPEN, Q8))/REF(OPEN, Q8)*100;跨越:=EMA(Q3, 3),COLORRED;DRAWTEXT(CROSS(特殊***专用, 8) AND Q10<-13,20,'*大底来'),COLORYELLOW,LINETHICK5; DRAWTEXT(CROSS(特殊***专用, 93) AND Q10<-13,40,'*大底'),LINETHICK5;DRAWTEXT(CROSS(跨越, 特殊***专用) AND REF(特殊***专用,1)>80,REF(特殊***专用,3), '*顶'),COLORRED,LINETHICK5;VAR12:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;机构做空能量线:SMA(VAR12,3,1),COLORGREEN,LINETHICK2;。

简单明了通达信指标公式源码

简单明了通达信指标公式源码

简单明了通达信指标公式源码
以下是通达信指标公式的源码(部分):
1.移动平均线(MA)
```
MA(CLOSE,N):收盘价的N日简单移动平均线
MA(C,N):C为输入数据,例如指标的参数可以是成交量、MACD柱等;
```
2.指数平滑移动平均线(EMA)
```
EMA(C,N):收盘价的N日指数平滑移动平均线
```
3.相对强弱指标(RSI)
```
RSI(C,N):C为收盘价序列,N为计算周期;
```
4. 随机相对强弱指标(StochRSI)
```
StochRSI(C, N, M1, M2): C为收盘价序列,N为计算RSI的周期,
M1为计算K值的周期,M2为计算D值的周期;
```
5.BOLL指标(布林线)
```
BOLL(CLOSE,N,P):C为收盘价序列,N为计算布林线的周期,P为布林线上下轨的标准差倍数;
```
6.指数平均数指标(EMA)
```
EMA(CLOSE,N):收盘价序列的N日指数平均数;
```
7.指数平滑异同平均线(MACD)
```
MACD(CLOSE,SHORT,LONG,M):C为收盘价序列,SHORT为快速移动平均线的时间周期,LONG为慢速移动平均线的时间周期,M为移动平均线的移动天数;
```
8.能量潮(OBV)
```
OBV(CLOSE,V):C为收盘价序列,V为成交量序列;
```
以上是通达信指标公式的部分源码,还有其他指标的源码未列出。

通达信_指标公式源码大全

通达信_指标公式源码大全

通达信_指标公式源码大全通达信是国内最早的股票行情软件之一,其强大的技术分析指标系统是其最大的特点之一、通达信的指标公式源码可以帮助广大投资者深入理解和研究不同的技术指标,并且根据自己的需求进行二次开发。

以下是通达信中一些常用指标的简要介绍和其对应的指标公式源码:1.移动平均线(MA):MA(CLOSE,N)=SUM(CLOSE,N)/N2.指数平滑移动平均线(EMA):EMA(CLOSE,N)=(2*CLOSE+(N-1)*REF(EMA(CLOSE,N),1))/(N+1)3.相对强弱指数(RSI):RSI(CLOSE,N)=SMA(MAX(CLOSE-REF(CLOSE,1),0),N,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),N,1)*1004.动力指数(DMI):H1=MAX(HIGH-REF(HIGH,1),0)L1=ABS(LOW-REF(LOW,1),0)DMP=SUM(((H1>L1)AND(H1>0.00))?H1:0,N)DMM=SUM(((L1>H1)AND(L1>0.00))?L1:0,N)PDI=DMP/SUM(TR,N)*100MDI=DMM/SUM(TR,N)*1005.布林带(BOLL):MB=MA(CLOSE,N)UP=MB+P*STD(CLOSE,N)DN=MB-P*STD(CLOSE,N)6.相对强弱指标(RSI):LC:=REF(CLOSE,1)TRY:=CLOSE-LCUY:=SUM(MAX(MAX(CLOSE-LC,0),ABS(CLOSE-LC-LC1)),N)DY:=SUM(MAX(MAX(LC-CLOSE,0),ABS(CLOSE-LC-LC1)),N)需要注意的是,在使用这些源码时,要理解每个指标的具体计算过程和意义,以及与股票行情数据之间的关系。

同时,根据自身的需求进行适当的修改和优化,以满足个人的投资研究需求。

通达信指标公式源码大全

通达信指标公式源码大全

通达信指标公式源码大全Profit: EMA(EMA(EMA(High,5),5)*1.15.Color=ffffff。

LineThickness=1;Risk: EMA(EMA(High,5),5)*1.1.Color=yellow;Drawdown:EMA(MA(EMA(High,5),5),5)*1.05.Color=00FF00;Balance: EMA(EMA(EMA(High,5),5)。

Color=FF00FF。

LineThickness=1;Rebound: MA(MA(MA(High,5),5)*0.95.Color=gray。

LineThickness=1;Oversold: MA(MA(MA(Close,5),5)*0.9.Color=blue。

LineThickness=1;VAR3:=LLV(High,240);VAR4:=100*(Close-VAR3)/VAR3;VAR5:=(Close-LLV(Low,528))/(HHV(High,528)-LLV(Low,528))*100;VAR6:=(Close-LLV(Close,530))/(HHV(Close,530)-LLV(Close,530))*100;VAR7:=0;VAR8:=SMA(Max(Close-REF(Close,1),34,1)/SMA(ABS(Close-REF(Close,1)),7,1)*100;VAR9:=SMA(Max(Close-REF(Close,1),13,1)/SMA(ABS(Close-REF(Close,1)),13,1)*100;VAR10:=IF(Cross(3,16,1)=0 AND High>Low+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) ANDREF(ZIG(3,6),1)<=REF(ZIG(3,6),2) ANDREF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) ANDREF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=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);VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);Rewritten:The profit ___ (EMA) of the high price over 5 ds。

通达信指标公式源码大全

通达信指标公式源码大全

源码:获利了结:EMA(EMA(EMA(HIGH,5),5),5)*1.15,COLORFFFFFF,LINETHICK1;风险: EMA(EMA(EMA(HIGH,5),5),5)*1.1,COLORYELLOW;回档: EMA(EMA(EMA(HIGH,5),5),5)*1.05,COLOR00FF00;平衡: EMA(EMA(EMA(HIGH,5),5),5),COLORFF00FF,LINETHICK1;反弹: EMA(EMA(EMA(HIGH,5),5),5)*0.95,COLORGRAY,LINETHICK1;超跌: EMA(EMA(EMA(HIGH,5),5),5)*0.9,COLORBLUE,LINETHICK1;VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3)/VAR3;VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100; VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100; VAR7:=0;VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100 ;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*10 0;VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR11:=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);VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);买1:=VAR10;买2:=(VAR11+VAR13+VAR15+VAR17);卖1:=(VAR12+VAR14+VAR16+VAR18);B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;{利多方舟}VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34)); F:IF(CROSS(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3;股票公式交换分类:指数公式指标解释1.波段交易指标的解释源代码:获利了结:EMA(EMA(EMA(高,5),5)* 1.15,colorfffffff,linehick1;风险:EMA(EMA(EMA(高,5),5)* 1.1,黄色;返回值:EMA(EMA(EMA(高(5,5),5),5)* 1.05,color00ff00;余额:EMA(EMA(EMA(high,5),5),colorf00ff,linehigh1;回弹:EMA(EMA(EMA(高,5),5),5)* 0.95,灰色,linehick1;超卖:EMA(EMA(EMA(高,5),5),5)* 0.9,蓝色,linehick1;VAR3:= LLV(HIGH,240);VAR4:= 100 *(CLOSE-VAR3)/ VAR3;VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))* 100;VAR6:= [CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))* 100;VAR7:= 0;VAR8:= SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/ SMA(ABS(CLOSE-REF (CLOSE,1)),7,1)* 100;VAR9:= SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/ SMA(ABS(CLOSE-REF (CLOSE,1)),13,1)* 100;VAR10:= IF(TROUGHBARS(3,16,1)= 0 AND HIGH> LOW + 0.04,4,0);VAR11:= ZIG(3,6)> REF(ZIG(3,6),1)和REF(ZIG(3,6),1)<= REF(ZIG(3,6),2)和REF(ZIG (3,6),2)<= REF(ZIG(3,6),3);VAR12:= ZIG(3,6)= REF(ZIG(3,6),2)AND REF(ZIG(3,6),2)> = REF(ZIG (3,6),3);VAR13:= ZIG(3,22)> REF(ZIG(3,22),1)和REF(ZIG(3,22),1)<= REF(ZIG (3,22),2)和REF(ZIG (3,22),2)<= REF(ZIG(3,22),3);VAR14:= ZIG(3,22)= REF(ZIG(3,22),2)AND REF(ZIG(3,22),2)> = REF(ZIG (3,22),3);VAR15:= ZIG(3,51)> REF(ZIG(3,51),1)和REF(ZIG(3,51),1)<= REF(ZIG (3,51),2)和REF(ZIG (3,51),2)<= REF(ZIG(3,51),3);VAR16:= ZIG(3,51)= REF(ZIG(3,51),2)和REF(ZIG(3,51),2)> = REF(ZIG (3,51),3);VAR17:= ZIG(3,72)> REF(ZIG(3,72),1)和REF(ZIG(3,72),1)<= REF(ZIG (3,72),2)和REF(ZIG (3,72),2)<= REF(ZIG(3,72),3);VAR18:= ZIG(3,72)= REF(ZIG(3,72),2)AND REF(ZIG(3,72),2)> = REF(ZIG (3,72),3);VAR19:= EMA(CLOSE,2)-EMA(CLOSE,150);购买1:= var10;购买2:=(var11 + var13 + var15 + var17);卖出1:=(var12 + var14 + var16 + var18);B:如果(买入1> 0或买入2> 0,低* 0.99,画空),交叉点,linehick3,颜色为黄色;S:如果(卖出1> 0,高* 1.01,拉长),交叉点,linehigh3,绿色;丽都方舟VAR100:=(100-((90 *(HHV(HIGH,20)-CLOSE))/(HHV(HIGH,20)-LLV(LOW,20))));;VAR200:=(100-((90 *(HHV(HIGH,20)-CLOSE))/(HHV(HIGH,20)-LLV(LOW,20))));;VAR300:=(100-MA((((100 *(HHV(HIGH,5)-CLOSE))/(HHV(HIGH,5)-LLV (LOW,5))),34));F:IF(交叉(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3;解释:该指标的未来是不可能的。

(完整word版)20个极品通达信指标公式源码

(完整word版)20个极品通达信指标公式源码

公式1(未来函数)代码N1:=5;N2:=10;N3:=20;N4:=30;P:=2;M:=20;N:=250;M1:=55;W:=21;P3:=500;N9:=90; HR:=HHV(HIGH,M1);HRY:=LLV(LOW,M1);HRY11:=HR*HRY;HRY33:SQRT(HRY11),COLORGREEN,LINETHICK2;IF(C〉HRY33 AND HRY33 〉=REF(HRY33 ,1),HRY33 ,DRAWNULL),LINETHICK2,COLORRED;MA1:EMA(CLOSE,N1);MA2:EMA(CLOSE,N2);MA3:EMA(CLOSE,N3),COLOR00FFFF;MA4:EMA(CLOSE,N4),LINETHICK2;TJ1:=CROSS(MA1,MA2) AND C〉O AND C>REF(C,1) AND C/REF(C,1)>=1.018OR CROSS(MA1,MA4)AND C〉O AND C〉REF(C,1) AND C/REF(C,1)〉=1.018OR CROSS(MA2,MA3)AND C〉O AND C>REF(C,1) AND C/REF(C,1)>=1。

018OR CROSS(MA1,MA3)AND C〉O AND C〉REF(C,1)AND C/REF(C,1)>=1。

018;TJ2:=(MAX(MA1,MAX(MA2,MA3))—MIN(MA1,MIN(MA2,MA3)))/MIN(MA1,MIN(MA2,MA3))*100<=P;XG:=TJ1 AND TJ2;RSV:=(CLOSE—LLV(LOW,9))/(HHV(HIGH,9)—LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);DIFF:= EMA(CLOSE,12)- EMA(CLOSE,26);DEA :=EMA(DIFF,9);MACD:=2*(DIFF—DEA);做多:=IF(K〉D AND MACD>0 AND V>1,2,0),COLORRED;做空:=IF(K<D AND MACD〈0 AND V〉1,—2,0),COLOR00FF00;强洗:=IF(MACD〉0 AND K〈D AND V〉1,1,0),COLOR0099FF;弱升:=IF(MACD<0 AND K〉D AND V>1,-1,0),COLORFFFF00; STICKLINE(做多AND C>=O,C,O,3,1),COLORRED;STICKLINE(做多AND C<O,C,O,3,0),COLOR990099; STICKLINE(做多AND C〈O,C,O,1,0),COLORCC00CC; STICKLINE(做多AND C〈O,C,O,0.3,0),COLORFF00FF; STICKLINE(做多AND C>=O,C,O,3,1),COLOR0000FF;{STICKLINE(做多AND C〉=O,C,O,1.5,0),COLOR0000DD;STICKLINE(做多AND C>=O,C,O,0。

通达信指标公式实现源码大全

通达信指标公式实现源码大全

通达信指标公式实现源码大全本文档收集了一些通达信指标公式的实现源码,供使用通达信软件的用户参考。

以下是一些常用指标的代码示例:1. 移动平均线(MA)计算移动平均线数据def calculate_ma(data, n):ma = []for i in range(n, len(data)):ma.append(sum(data[i-n:i]) / n)return ma示例用法data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]n = 5ma = calculate_ma(data, n)print(ma)2. 指数移动平均线(EMA)计算指数移动平均线数据def calculate_ema(data, n):ema = [data[0]]alpha = 2 / (n + 1)for i in range(1, len(data)):ema.append(alpha * data[i] + (1 - alpha) * ema[-1]) return ema示例用法data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]n = 5ema = calculate_ema(data, n)print(ema)3. 相对强弱指标(RSI)计算相对强弱指标数据def calculate_rsi(data, n):diff = []for i in range(1, len(data)):diff.append(data[i] - data[i-1])rsi = []for i in range(n - 1, len(diff)):gain = sum([diff[j] for j in range(i-n+1, i+1) if diff[j] > 0])loss = -sum([diff[j] for j in range(i-n+1, i+1) if diff[j] < 0])rsi.append(100 - (100 / (1 + gain / loss)))return rsi示例用法data = [1, 2, 3, 4, 5, 4, 3, 2, 1]n = 5rsi = calculate_rsi(data, n)print(rsi)以上是一些通达信指标的代码实现,你可以根据自己的需求进行参数调整和逻辑优化。

通达信量能指标公式源码

通达信量能指标公式源码

通达信量能指标公式源码```周期=22if (BarNumber > 周期)当前成交量 = Volume前期成交量 = Ref(Volume, 周期)//计算主力买卖盘力量当前成交量力量 = IFF((Current成交量 - 前期成交量) > 0, (Current成交量 - 前期成交量), 0)主力买卖盘力量=SUM(当前成交量力量,周期)//计算散户买卖盘力量当前成交量力量反=IFF((前期成交量-当前成交量)>0,(前期成交量-当前成交量),0)散户买卖盘力量=SUM(当前成交量力量反,周期)//计算总体买卖盘力量总体买卖盘力量=主力买卖盘力量+散户买卖盘力量//计算主力买卖比例主力买卖比例=IFF(总体买卖盘力量>0,(主力买卖盘力量/总体买卖盘力量)*100,0)//计算散户买卖比例散户买卖比例=100-主力买卖比例//画出主力买卖比例曲线和散户买卖比例曲线Plot(主力买卖比例, "主力买卖比例", colorRed)Plot(散户买卖比例, "散户买卖比例", colorGreen)```这段源码采用了TradingView的Pine Script语言编写。

其中 `周期`为指定的周期长度,`BarNumber`为当前的K线数量,`Volume`为当前K 线的成交量。

通过计算当前成交量和前期成交量的差值,可以得到主力买卖盘力量和散户买卖盘力量。

然后将这些力量进行累计,并计算主力买卖比例和散户买卖比例。

最后,通过`Plot(`函数将主力买卖比例和散户买卖比例画在图表上,使用红色和绿色分别表示。

这段代码的作用是计算并绘制通达信量能指标中的主力买卖比例和散户买卖比例曲线。

这些曲线可以帮助分析市场的买卖力量和趋势,更好地理解市场的活跃度和价格行为。

通达信副图指标公式源码大全

通达信副图指标公式源码大全

通达信副图指标公式源码大全Prepared on 22 November 2020副图指标公式源码1、百万踏浪(相传为杨百万看图公式)N1:=9;N:=3;VAR1:=REF(CLOSE,1);标尺:SMA(MAX(CLOSE-VAR1,0),5,1)/SMA(ABS(CLOSE-VAR1),5,1)*100; VAR2:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;VAR3:=SMA(VAR2,3,1);VAR4:=SMA(VAR3,3,1);VAR5:=SMA(VAR4,3,1);浪:VAR3,COLORBLUE;波:VAR4,COLORRED;段:VAR5,COLORYELLOW;VAR6:=CROSS(VAR3,VAR4)ANDVAR4<25;STICKLINE(VAR6,0,VAR4+15,5,0),COLORGREEN;VAR7:=CROSS(VAR4,VAR5)ANDVAR4<25;VAR8:=VAR7ANDVOL>REF(VOL,1)*2ANDVOL>REF(MA(VOL,5),1)*2; STICKLINE(VAR7,0,VAR4+55,5,0),COLORWHITE;DRAWTEXT(VAR7ANDCOUNT(VAR7,10)=1,VAR4+25,'抄底'),COLORYELLOW;STICKLINE(VAR8,0,VAR4+15,5,0),COLORBLUE;DRAWTEXT(VAR8ANDCOUNT(VAR8,10)=1,VAR4-1,'放量'),COLORGREEN; VAR9:=CROSS(VAR3,VAR4)ANDVAR4>80ANDVAR4>VAR5;STICKLINE(VAR9ANDCOUNT(VAR9,5)=1,VAR4-5,100,5,0),COLORYELLOW; VARA:=CROSS(VAR5,VAR4)ANDREF(VAR4,1)>80;STICKLINE(VARA,VAR4-15,100,15,0),COLORYELLOW;DRAWTEXT(VARAANDCOUNT(VARA,10)=1,VAR4-25,'逃顶'),COLORYELLOW;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;VARE:=REF(LOW,1)*;VARF:=LOW*;VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;VAR11:=EMA(VAR10,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; VAR20:=VAR18<=25ANDVAR19<-95ANDVAR1F>20ANDVAR1B<-30ANDVAR1E<30ANDVAR11-CLOSE>=<22ANDVAR16<28ANDVAR17>50; STICKLINE(VAR20,0,50,10,0),LINETHICK2,COLORBLUE;DRAWTEXT(CROSS(VAR20,ANDCOUNT(VAR20=1,10)=1,60,'百万导弹'),LINETHICK7,COLORWHITE;2、分类资金A:=IF((CLOSE>,(AMOUNT)/(100000),VOL);主力:MA(A,4),LINETHICK0,COLORYELLOW;游资:MA(A,8),LINETHICK0,COLOR00FF00;大户:MA(A,16),LINETHICK0,COLORRED;散户:MA(A,32),LINETHICK0,COLORF0F000;主比:ABS(((主力)/(主力+游资+大户+散户))*(100)),LINESTICK,COLORYELLOW;游比:ABS(((游资)/(主力+游资+大户+散户))*(100)),LINESTICK,COLOR00FF00; 大比:ABS(((大户)/(主力+游资+大户+散户))*(100)),LINESTICK,COLORRED;散比:ABS(((散户)/(主力+游资+大户+散户))*(100)),LINESTICK,COLORF0F000; 警戒线:MA(A,180),COLORFF66FF,LINETHICK1;STICKLINE((主力>0),0,主力,3,0),COLOR009CFF;STICKLINE((主力>0),0,主力,,0),COLOR009CFF;STICKLINE((主力>0),0,主力,,0),COLOR00C0FF;STICKLINE((主力>0),0,主力,,0),COLOR00D1FF;STICKLINE((主力>0),0,主力,1,0),COLOR00EAFF;STICKLINE((主力>0),0,主力,,0),COLORYELLOW;STICKLINE((游资>0),0,游资,3,0),COLOR00C100;STICKLINE((游资>0),0,游资,,0),COLOR00CA00;STICKLINE((游资>0),0,游资,,0),COLOR00D300;STICKLINE((游资>0),0,游资,,0),COLOR00DB00;STICKLINE((游资>0),0,游资,1,0),COLOR00EA00;STICKLINE((游资>0),0,游资,,0),COLORGREEN;STICKLINE((大户>0),0,大户,3,0),COLOR1020AA;STICKLINE((大户>0),0,大户,,0),COLOR1020BB;STICKLINE((大户>0),0,大户,,0),COLOR1020CC;STICKLINE((大户>0),0,大户,,0),COLOR1020DD;STICKLINE((大户>0),0,大户,1,0),COLOR1020EE;STICKLINE((大户>0),0,大户,,0),COLORRED;STICKLINE((散户>0),0,散户,3,0),COLORFF7700;STICKLINE((散户>0),0,散户,,0),COLORFF8800;STICKLINE((散户>0),0,散户,,0),COLORFF9900;STICKLINE((散户>0),0,散户,,0),COLORFFAA00;STICKLINE((散户>0),0,散户,1,0),COLORFFBB00;STICKLINE((散户>0),0,散户,,0),COLORLIBLUE;3、黑马起爆点VAR1:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;VAR2:=(CLOSE-LLV(LOW,43))/(HHV(HIGH,43)-LLV(LOW,43))*100;VAR3:=SMA(VAR2,2,1);天:100+(-ABS(VAR1)),COLORRED;下:SMA(VAR3,2,1);无:ABS(VAR1),COLORGREEN;敌:50,COLORFFAA00,LINETHICK3;A:80;B:20;买:STICKLINE(CROSS(下,无),3,20,2,0),COLORRED,LINETHICK1; STICKLINE(CROSS(下,无),20,25,2,0),COLORFF9900,LINETHICK1; DRAWTEXT(CROSS(下,无),30,''),COLORFFFFCC;卖:STICKLINE(CROSS(下,天),70,90,2,0),COLORRED,LINETHICK1; STICKLINE(CROSS(下,天),90,99,2,0),COLORFF9900,LINETHICK1; DRAWTEXT(CROSS(下,天),70,''),COLORFFFFCC;选股2:IF(CROSS(下,20),1,0);DRAWICON((CROSS(下,20)),20,1);DRAWICON((CROSS(下,20)),-20,25);4、宁波绝密(相传为宁波涨停敢死队的绝密指标)WOL:IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWN ULL),NODRAW;STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,WOL,0,3,-1),COLORFFFFFF; VOLUME:VOL,VOLSTICK;V5:MA(VOLUME,5);V10:MA(VOLUME,10);V135:MA(VOLUME,135);VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));主买:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,POINTDOT;主卖:IF(CLOSE>OPEN,VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,VAR1*(HIGH-LOW),VOL/2)),COLOR00FF00,POINTDOT;STICKLINE(主买>0,0,主买,2,0),COLORRED;{STICKLINE(主卖>0,主买,VOL,2,1),COLOR00FF80;}STICKLINE(主买<REF(主买,1)AND主买>0,0,主买,2,0),COLOR00FFFF;换手:VOL/CAPITAL*100,POINTDOT;二十日换手:SUM(换手,20);5、起涨点换手率%:VOL/CAPITAL*100,LINETHICK0,COLORYELLOW;量比:V/(REF(MA(V,5),1)),LINETHICK0,COLORRED;VVOL:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRA WNULL),NODRAW;虚拟量比:VVOL/(REF(MA(V,5),1)),LINETHICK0,COLORRED;获利比例%:WINNER(C)*100,COLORLIBLUE;涨幅%:(C-REF(C,1))/REF(C,1)*100,LINETHICK0;换手率%1:=换手率%>5;量比1:=量比>虚拟量比>;获利比例%1:=获利比例%>70;涨幅%1:=涨幅%>3;启动:=换手率%1AND量比1AND获利比例%1AND涨幅%1;起涨点:IF(启动,101,0)COLORRED,LINETHICK2;6、庄家建仓VAR1:=REF(LOW,1);VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),13,1)*4;VAR3:=EMA(VAR2,13);VAR4:=LLV(LOW,34);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);主力进场:STICKLINE(VAR5>REF(VAR5,1),0,VAR5,7,0),COLORRED;7、出色超赢JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;VAR1:=(CLOSE>REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2));VAR2:=(REF(VAR1,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE, 2));VAR3:=(REF(VAR2,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE, 2));VAR4:=(REF(VAR3,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE, 2));VAR5:=(REF(VAR4,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE, 2));VAR6:=(REF(VAR5,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE, 2));VAR7:=(REF(VAR6,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE, 2));VAR8:=(REF(VAR7,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE, 2));VAR9:=(REF(VAR8,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE, 2));VARA:=(REF(VAR9,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE ,2));VARB:=(REF(VARA,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOS E,2));VARC:=(REF(VARB,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOS E,2));VARD:=(CLOSE<REF(CLOSE,1)ANDCLOSE<REF(CLOSE,2));VARE:=(REF(VARD,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOS E,2));VARF:=(REF(VARE,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE ,2));VAR10:=(REF(VARF,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOS E,2));VAR11:=(REF(VAR10,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLO SE,2));VAR12:=(REF(VAR11,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLO SE,2));VAR13:=(REF(VAR12,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLO SE,2));VAR14:=(REF(VAR13,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLO SE,2));VAR15:=(REF(VAR14,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLO SE,2));VAR16:=(REF(VAR15,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLO SE,2));VAR17:=(REF(VAR16,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLO SE,2));VAR18:=(REF(VAR17,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLO SE,2));VAR19:=((REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVA R13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,1))ANDVAR1);VAR1A:=((REF(VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7O RVAR8ORVAR9ORVARAORVARBORVARC,1))ANDVARD);红色持股:VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORV AR9ORVARAORVARBORVARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;青色观望:VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR1 4ORVAR15ORVAR16ORVAR17ORVAR18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLORFF0000,NODRAW;黄色低买:VAR19,COLOR33AACC,NODRAW;洋红离场:VAR1A,COLORMAGENTA,NODRAW;急跌关注:(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORWHITE,NODRAW;上市日期年:REF(YEAR,BARSCOUNT(CLOSE)-1),NODRAW,COLOR0000FF; 月:REF(MONTH,BARSCOUNT(CLOSE)-1),NODRAW,COLORFF00FF;日:REF(DAY,BARSCOUNT(CLOSE)-1),NODRAW,COLOR00FFFF; STICKLINE(ISLASTBARAND(红色持股ORREF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;STICKLINE(ISLASTBARAND(青色观望ORREF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<O,L,H,0,0),COLOR999900;STICKLINE(1,C,O,,0),COLOR858500;STICKLINE(C>=O,C,O,,0),COLOR0000E5;STICKLINE(红色持股,CLOSE,O,,0),COLOR000055;STICKLINE(红色持股,CLOSE,O,2,0),COLOR000088;STICKLINE(红色持股,CLOSE,O,,0),COLOR0000AA;STICKLINE(红色持股,CLOSE,O,1,0),COLOR0000CC;STICKLINE(红色持股,CLOSE,O,,0),COLOR0000EE;STICKLINE(青色观望,CLOSE,O,,0),COLOR555500;STICKLINE(青色观望,CLOSE,O,2,0),COLOR888800;STICKLINE(青色观望,CLOSE,O,,0),COLORAAAA00;STICKLINE(青色观望,CLOSE,O,1,0),COLORCCCC00;STICKLINE(青色观望,CLOSE,O,,0),COLOREEEE00;CO:=(C-O);STICKLINE(急跌关注,O,C-CO/2,,0),COLOR555555;STICKLINE(急跌关注,O,C-CO/2,2,0),COLOR888888;STICKLINE(急跌关注,O,C-CO/2,,0),COLORAAAAAA;STICKLINE(急跌关注,O,C-CO/2,1,0),COLORCCCCCC;STICKLINE(急跌关注,O,C-CO/2,,0),COLOREEEEEE;STICKLINE(黄色低买,O,O+CO/3,,0),COLOR335555;STICKLINE(黄色低买,O,O+CO/3,2,0),COLOR338888;STICKLINE(黄色低买,O,O+CO/3,,0),COLOR33AAAA;STICKLINE(黄色低买,O,O+CO/3,1,0),COLOR33CCCC;STICKLINE(黄色低买,O,O+CO/3,0,0),COLOR33EEEE;STICKLINE(洋红离场,O,O+CO/3,,0),COLOR550055;STICKLINE(洋红离场,O,O+CO/3,2,0),COLOR880088;STICKLINE(洋红离场,O,O+CO/3,,0),COLORAA00AA;STICKLINE(洋红离场,O,O+CO/3,1,0),COLORCC00CC;STICKLINE(洋红离场,O,O+CO/3,,0),COLOREE00EE;压力:MA(REF(HHV(C,30),1),2),POINTDOT,COLOR9DFFFF;支撑:MA(REF(LLV(C,30),1),2),POINTDOT,COLORABFF46;PMA:MA(C,5),COLORWHITE,LINETHICK2;IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2;IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK2;X:=(3*C+L+O+H)/6;多空线:(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,COLORFF00FF,LINETHICK2;DD:=多空线<REF(多空线,1);IF(DD,多空线,DRAWNULL),COLOR00FFFF,LINETHICK2;A:=(PMA>多空线);IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,9,1);D:=SMA(K,9,1);J:=3*K-2*D;X2:=LLV(J,2)=LLV(J,8);Y:=IF(CROSS(J,REF(J+,1))ANDX2ANDJ<20,30,0);DRAWTEXT(CROSS(J,REF(J+,1))ANDX2ANDJ<20,LOW*,'★'),COLORYELLOW;8、彩色成交量STICKLINE(VOL>0,VOL,0,3,0),COLOR333333;STICKLINE(VOL>0,VOL,0,,0),COLOR998855;STICKLINE(VOL>0,VOL,0,,0),COLORBBAA77;STICKLINE(VOL>0,VOL,0,,0),COLORDDCC99;STICKLINE(VOL>0,VOL,0,,0),COLORFFEEBB;换手:=VOL/CAPITAL*100,COLORRED;STICKLINE(换手>2,VOL,CAPITAL*,3,0),COLOR00AAAA;STICKLINE(换手>2,VOL,CAPITAL*,,0),COLOR00CCCC;STICKLINE(换手>2,VOL,CAPITAL*,,0),COLOR00EEEE;STICKLINE(换手>2,VOL,CAPITAL*,,0),COLOR00FFFF;STICKLINE(换手>4,VOL,CAPITAL*,3,0),COLOR009900;STICKLINE(换手>4,VOL,CAPITAL*,,0),COLOR00BB00;STICKLINE(换手>4,VOL,CAPITAL*,,0),COLOR00DD00;STICKLINE(换手>4,VOL,CAPITAL*,,0),COLOR00FF00;STICKLINE(换手>7,VOL,CAPITAL*,3,0),COLORBROWN;STICKLINE(换手>7,VOL,CAPITAL*,,0),COLOR0000AA;STICKLINE(换手>7,VOL,CAPITAL*,,0),COLOR0000CC;STICKLINE(换手>7,VOL,CAPITAL*,,0),COLOR0000DD;五天均量:MA(VOL,5),COLORRED,;廿天均量:MA(VOL,20),COLORWHITE,;HSS:=V/CAPITAL*100,NODRAW;{显示当日换手}五天换手率:SUM(HSS,5),NODRAW;廿天换手率:SUM(HSS,20),NODRAW;抛压:STICKLINE(CROSS(84,RSI),0,VOL,,0),COLORBLUE,LINETHICK5;V24:MA(VOL,24),COLORLIBLUE;V10:MA(VOL,10),COLORRED;V3:MA(VOL,3),COLORLIGRAY;9、涨停回马枪(有主图)均价线:=AMOUNT/V/100;C2:=REF(C,1);涨停:=IF(REF(C,1)*<,1,0);STICKLINE(涨停,0,5,6,0),COLORYELLOW;DRAWTEXT(涨停,8,'涨停'),COLORYELLOW;MA13:=MA(C,13),COLORGRAY;MA21:=MA(C,21),COLORWHITE;支撑线:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; LC:=REF(CLOSE,1);操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;趋势线:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;震仓线:=45;震仓线2:=50;逃命线:=80;抄底线:=20;绝底线:=5;PP2:=操作线<震仓线2ANDREF(操作线,1)>震仓线2;PP:=操作线<震仓线ANDREF(操作线,1)>震仓线;PP3:=操作线<抄底线ANDREF(操作线,1)>抄底线;HH:=COUNT(涨停,13)>=1;STICKLINE(PP2ANDHH,0,5,3,0),COLORRED;STICKLINE(PPANDHH,0,5,3,0),COLORRED;STICKLINE(PP3ANDHH,0,5,3,0),COLORRED;DRAWTEXT(PP2ANDHH,8,'预警'),COLORRED;DRAWTEXT(PPANDHH,8,'预警'),COLORRED;DRAWTEXT(PP3ANDHH,8,'预警'),COLORRED;A:=SMA(L,4,3);绿色买入:IF(((AANDREF(PP,1)ANDHH)OR(AANDREF(PP3,1)ANDHH)),1,0); STICKLINE(AANDREF(PP,1)ANDHH,0,10,1,0),COLORGREEN; DRAWICON(AANDREF(PP,1)ANDHH,12,1);STICKLINE(AANDREF(PP3,1)ANDHH,0,10,1,0)COLORGREEN; DRAWICON(AANDREF(PP3,1)ANDHH,12,1);10、海风3号M1:=MA(CLOSE,1);M2:=(LOW+HIGH+CLOSE)/3;M3:=MA(M2,5);M4:=HHV(M3,10);Z:=HHV((M1<M4),10)ORHHV((M1<M4),10);S:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,35)-LLV(LOW,34)),3); DRAWTEXT(FILTER(CROSS(S,60),20),L*,'▲'),COLORYELLOW;{DRAWTEXT(FILTER(Z,9),H*,'★'),COLORBLUE;STICKLINE(S>60,O,C,4,0),COLORFF9BFB;}STICKLINE(S>60,O,C,2,0),COLORRED;{STICKLINE(S>60,O,C,,0),COLORFD9BFB;}STICKLINE(S>60,H,L,0,0),COLORRED;{STICKLINE(S<60,O,C,4,0),COLOR01DC38;STICKLINE(S<60,O,C,,0),COLOR01FE41;}STICKLINE(S<60,O,C,2,0),COLORGREEN;STICKLINE(S<60,H,L,0,0),COLORGREEN;VAR1:MA(CLOSE,5);VAR2:MA(CLOSE,10);VAR3:MA(CLOSE,20);VAR60:MA(CLOSE,60);VAR120:MA(CLOSE,120);VAR4:=OPEN<VAR1OROPEN<VAR2OROPEN<VAR3;VAR5:=CLOSE>MAX(VAR1,MAX(VAR2,MAX(VAR3,VAR60)));VAR6:=VOL/MA(VOL,30)>;VAR7:=CLOSE/REF(CLOSE,1)>;VAR8:=VAR4ANDVAR5ANDVAR6ANDVAR7;VAR9:=VAR8AND(REF(BARSLAST(VAR8),1)>60ORBARSSINCE(VAR8)=0); DRAWICON(VAR9,L*,1);STICKLINE(VAR9,O,C,6,0),COLORYELLOW;STICKLINE(VAR9,H,L,,0),COLORYELLOW;11、涨停时间窗(通达信金融终端副图)N:=13;WR大于80考虑买:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)),LINETHICK0;均价:AMOUNT/(VOL*100),LINETHICK0,COLORYELLOW;ZT:=C/REF(C,1)>;XH:=FILTER(ZT,13);BH:=BARSLAST(ZT);STICKLINE(ZT,0,L*1,3,0),COLORYELLOW;DRAWTEXT(ZT,L*,'涨停'),COLORF00FF0;VARZT:=BARSLAST(C/REF(C,1)>;AA:=BETWEEN(C,REF(L,BH)*,REF(L,BH)*;STICKLINE(AA,0,L*,2,0),COLORBLUE;DRAWTEXT(AA,L*,'警戒'),COLORWHITE;STICKLINE(AAANDVARZT=2,0,L*,2,0),COLORRED;DRAWTEXT(AAANDVARZT=2,L*,'时间窗'),COLORWHITE; STICKLINE(AAANDVARZT=4,0,L*,2,0),COLORRED; DRAWTEXT(AAANDVARZT=4,L*,'时间窗'),COLORWHITE; STICKLINE(AAANDVARZT=7,0,L*,2,0),COLORRED; DRAWTEXT(AAANDVARZT=7,L*,'时间窗'),COLORWHITE; STICKLINE(AAANDVARZT=12,0,L*,2,0),COLORRED; DRAWTEXT(AAANDVARZT=12,L*,'时间窗'),COLORWHITE; STICKLINE(AAANDVARZT=20,0,L*,2,0),COLORRED; DRAWTEXT(AAANDVARZT=20,L*,'时间窗'),COLORWHITE;。

通达信 指标公式源码大全

通达信 指标公式源码大全

【通达信】魔鬼操盘(主图)-指标公式源码均5:MA(CLOSE,5) COLORYELLOW;均10:MA(CLOSE,10)COLORGREEN;均30: MA(CLOSE,30) COLORMAGENTA ;均60: MA(CLOSE, 60) COLORRED POINTDOT LINETHICK3;均250: MA(CLOSE, 250) COLORBLUE LINETHICK2 ;魔鬼通道上:均30 + 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2 ; 魔鬼通道下:均30 - 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2; VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=VAR1*1.05;VAR5:=MA(CLOSE,5);VAR6:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR7:=SMA(VAR6,5,1);VAR8:=VOL>REF(VOL,1);VAR9:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30);【通达信】平均价格(主图)-指标公式源码A:=(3*C+H+L+O)/6;XJ:=(A+0.618*REF(A,1)+0.382*REF(A,2)+0.236*REF(A,3)+0.146*REF(A,4))/2 .382;YCZXH:=(MA(HHV(A,2),5)+MA(HHV(A,2),13)+MA(HHV(A,2),21)+MA(HHV(A,2),32 ))/4;YCZXL:=(MA(LLV(A,2),5)+MA(LLV(A,2),13)+MA(LLV(A,2),21)+MA(LLV(A,2),32 ))/4;SMH:EMA(YCZXH,21),COLOR004000;SML:EMA(YCZXL,21),COLOR004000;SMJ:(SML+SMH)/2,COLOR004000;PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*REF(A,5)+4*RE F(A,6)+3*REF(A,7)+2*REF(A,8)+REF(A,9))/55;A1:=EMA(PJ,3),COLOR004000;A2:=EMA(PJ,5),COLOR004000;A3:=EMA(PJ,7),COLOR004000;A4:=EMA(PJ,9),COLOR004000;A5:=EMA(PJ,11),COLOR004000;LX:=REF(XJ,1);ZD:=(SMA(MAX(XJ-LX,0),5,1)/SMA(ABS(XJ-LX),5,1))*100;KX1:=(CLOSE>=OPEN) AND ZD>=50;KX2:=(CLOSE<OPEN) AND ZD>=50;KX3:=(CLOSE>=OPEN) AND ZD<50;KX4:=(CLOSE<OPEN) AND ZD<50;IF(A5<REF(A5,1),A5,DRAWNULL),COLOR820000,LINETHICK2;IF(A5>REF(A5,1),A5,DRAWNULL),COLOR00005B,LINETHICK2;IF(A4<REF(A4,1),A4,DRAWNULL),COLOR8C0000,LINETHICK1;IF(A4>REF(A4,1),A4,DRAWNULL),COLOR000055,LINETHICK1;IF(A3<REF(A3,1),A3,DRAWNULL),COLOR9B0000,LINETHICK1;IF(A3>REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1;IF(A2<REF(A2,1),A2,DRAWNULL),COLORBB0000,LINETHICK1;IF(A2>REF(A2,1),A2,DRAWNULL),COLOR00007D,LINETHICK1;IF(A1<REF(A1,1),A1,DRAWNULL),COLORCC0000,LINETHICK1;IF(A1>REF(A1,1),A1,DRAWNULL),COLOR00009B,LINETHICK1;STICKLINE(KX1,C,O,4,1),COLOR4440FF;STICKLINE(KX1,C,H,0.5,1),COLOR4440FF;STICKLINE(KX1,O,L,0.5,1),COLOR4440FF;STICKLINE(KX2,C,O,4,0),COLOR4440FF;STICKLINE(KX2,O,H,0.5,0),COLOR4440FF;STICKLINE(KX2,C,L,0.5,0),COLOR4440FF;STICKLINE(KX3,C,O,4,1),COLORFFFF33;STICKLINE(KX3,C,H,0.5,1),COLORFFFF33;STICKLINE(KX3,O,L,0.5,1),COLORFFFF33;STICKLINE(KX4,C,O,4,0),COLORFFFF33;STICKLINE(KX4,O,H,0.5,0),COLORFFFF33;STICKLINE(KX4,C,L,0.5,0),COLORFFFF33;【通达信】牛劲十足(副图)-指标公式源码VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));ZM:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CL OSE-LOW)),VOL/2)),COLORRED,POINTDOT;ZM1:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-V AR1*(HIGH-LOW),0-VOL/2)),COLOR00FF00,POINTDOT;MMB:=(SUM(ZM,30)+SUM(ZM1,30))/10,COLORYELLOW;SG:=MMB>0 AND REF(MMB,1)<MMB;上攻周期:COUNT(SG,5),LINESTICK,COLORWHITE;JSC:=上攻周期<1;DBQD:=FILTER(COUNT(JSC,5)>3 AND NOT(JSC),10);DRAWICON(DBQD,2,1);DRAWBAND(上攻周期,RGB(255,120,120),3,RGB(0,0,0));DRAWBAND(JSC,RGB(0,0,255),0.5,RGB(0,0,0));STICKLINE(COUNT(上攻周期>3,5)>=3 AND SG,0,上攻周期,1.5,0),COLORRED; XG: COUNT(COUNT(上攻周期>3,5)>=3 AND SG,20)>4;【通达信】魔鬼K线(副图)-指标公式源码VAR1:=REF(OPEN,1);VAR2:=SMA(MAX(OPEN-VAR1,0),6,1)/SMA(ABS(OPEN-VAR1),6,1)*100;VAR3:=REF(CLOSE,1);VAR4:=SMA(MAX(CLOSE-VAR3,0),6,1)/SMA(ABS(CLOSE-VAR3),6,1)*100;VAR5:=REF(HIGH,1);VAR6:=SMA(MAX(HIGH-VAR5,0),6,1)/SMA(ABS(HIGH-VAR5),6,1)*100;VAR7:=REF(LOW,1);VAR8:=SMA(MAX(LOW-VAR7,0),6,1)/SMA(ABS(LOW-VAR7),6,1)*100; STICKLINE(VAR4<VAR2,VAR2,VAR4,5,0),COLORGREEN , ;STICKLINE(VAR4>VAR2,VAR2,VAR4,5,0),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR8>VAR4,VAR4,VAR6,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR8<VAR4,VAR4,VAR6,0.5,1),COLORRED ,;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR6<VAR2,VAR2,VAR8,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR6>VAR2,VAR2,VAR8,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR8<VAR2,VAR2,VAR6,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR8>VAR2,VAR2,VAR6,0.5,1),COLORRED , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR4,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8<VAR4,VAR4,VAR6,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR2,VAR8,0.5,1),COLORGREEN ,;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6>VAR4,VAR2,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 AND VAR8<VAR2,VAR2,VAR6,0.5,1), COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8>VAR2,VAR2,VAR6,0.5,1),COLORGREEN , ;【通达信】牛熊分界(立桩量、中线)-指标公式源码AAA:=(3*C+H+L+O)/6;VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3 )+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;VAR2:=(HHV(VA R1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LL V(VAR1,20))/3;VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;VAR5:=( LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;DRAWBAND(VAR1,RGB(155,50,50),VAR6,RGB(250,250,0));短线:VAR1,COLORWHITE;中线:VAR6,COLORYELLOW;金叉:短线>中线 AND REF(短线,1)=REF(中线,1),NODRAW;下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;TJ1:=VOL=HHV(VOL,10)AND VOL>2*REF(VOL,1)AND CLOSE>VAR1;立桩量:=FILTER(TJ1,5);TJ2:=IF(BARSLAST(立桩量)=1 ANDCLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));突破:TJ2=1,NODRAW;STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;STICKLINE(C>=O,C,O,3,0),COLOR000045;STICKLINE(C >=O,C,O,2.5,0),COLOR000065;STICKLINE(C>=O,C,O,2,0),COLOR000085;STICKL INE(C>=O,C,O,1.5,0),COLOR0000A5;STICKLINE(C>=O,C,O,1,0),COLOR0000C5;S TICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;STICKLINE(C>=O,H,L,0,0),COLOR000 0F5;STICKLINE(C<O,C,O,3,0),COLOR353500;STICKLINE(C<O,C,O,2.5,0),COLOR 454500;STICKLINE(C<O,C,O,2,0),COLOR555500;STICKLINE(C<O,C,O,1.5,0),CO LOR656500;STICKLINE(C<O,C,O,1,0),COLOR757500;STICKLINE(C<O,C,O,0.5,0) ,COLOR858500;STICKLINE(C<O,H,L,0,0),COLOR959500;ZRR:=(YEAR-1992)*365+ INTPART((YEAR-1989)/4)+IF(MONTH<=2,DAY+(MONTH-1)*31,DAY+INTPART(13*(M ONTH+1)/5)-7+(MONTH-1)*28+IF(INTPART(YEAR/4)=YEAR/4,1,0)),NODRAW;T:=B ARSLAST(ZRR-REF(ZRR,1)>WEEKDAY-REF(WEEKDAY,1))+1,NODRAW;T1:=REF(T,T)+ T,NODRAW;T2:=REF(T,T1)+T1,NODRAW;T3:=REF(T,T2)+T2,NODRAW;T4:=REF(T,T3 )+T3,NODRAW;T5:=REF(T,T4)+T4,NODRAW;T6:=REF(T,T5)+T5,NODRAW;T7:=REF(T,T6)+T6,NODRAW;T8:=REF(T,T7)+T7,NODRAW;周10:(REF(CLOSE,T)+REF(CLOSE,T1)+REF(CLOSE,T2)+REF(CLOSE,T3)+REF(CLOSE, T4)+REF(CLOSE,T5)+REF(CLOSE,T6)+REF(CLOSE,T7)+REF(CLOSE,T8)+CLOSE)/10 ,LINETHICK2;【通达信】牛准反弹(快线、慢线)-指标公式源码N:=9;M1:=3;M2:=3;P:=9;快线:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;慢线:=SMA(快线,M1,1);ELI空:=SMA(慢线,M2,1);ELI牛股:=IF(BARSLAST(CROSS(慢线,ELI空))<P AND CROSS(慢线,ELI空) AND 慢线<20,90,0);LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),4.1,1)/SMA(ABS(CLOSE-LC),4.1,1)*100;牛准反弹:=CROSS(RSI,11)*80;XG:牛准反弹 OR ELI牛股;【通达信】启动提示(平台线、启动线)-指标公式源码启动线:SUM(EMA((C+L)/2,2),5)/10.158,COLORRED;平衡线:LLV(SUM( EMA((C+L)/2,2),5)/10.158,4),COLORFF00FF;平台线:LLV(SUM( EMA((C+L)/2,2),5)/10.158,10),COLORFFFFFF;强弱线:EMA(启动线,21),COLORYELLOW;STICKLINE(平台线<启动线,启动线,平台线,0.1,0),COLORFFCCAA; STICKLINE(平衡线<启动线,启动线,平衡线,0.1,0),COLORRED;VAR1:=2*MA(LLV((C+L)/2,8)*1.1,13)-EMA((C+L)/2,3)-((C+L)/2)*0.1;VAR2:=IF((EMA((C+L)/2,3)-VAR1)*5>0,POW((EMA((C+L)/2,3)-VAR1)*5,2)/10, -1*POW((EMA((C+L)/2,3)-VAR1)*5,2)/10);VAR3:=IF(VAR2>0,VAR2-0,0);STICKLINE(VAR3>0 AND REF(VAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),强弱线,强弱线+0.2,4,0),COLORFFAACC;DRAWTEXT(VAR3>0 AND REF(VAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),强弱线+0.35,'注意控制'),LINETHICK3,COLORFFAACC;【通达信】平台启动(主图)-指标公式源码圣:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;灵:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;石:=SMA(灵,13,8);仙:=CEILING(SMA(石,13,8));编著:=SMA(圣,21,8);AABB:=IF(L,CONST(L),DRAWNULL);平台启动:STICKLINE(仙-编著>75,AABB,AABB*0.99,15,1),COLOR0000FF; VARZT:=BARSLAST(平台启动);DRAWTEXT(VARZT=1,0.99*(AABB+AABB*0.98)/2,'平台启动'),COLORYELLOW;【通达信】牛熊线分水岭(中线强弱拐点)-指标公式源码JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);M1:=EMA(CLOSE,3);M2:EMA(CLOSE,8);分水岭:SMA(M2,2.5,1.5),LINETHICK2,COLORRED;牛线:3*M2-2*分水岭,LINETHICK2,COLORFF00FF ;熊线:4*分水岭-3*M2,LINETHICK2,COLORGREEN;IF (牛线<=熊线,牛线,熊线),COLORGREEN,LINETHICK2;IF (分水岭<=熊线,分水岭,熊线),COLORGREEN,LINETHICK2;IF(牛线>REF(熊线,1),熊线,DRAWNULL),COLORFF2200,LINETHICK2;M3:EMA(M2,13);M4:EMA(M2,55);VAR1:=EMA(M3,55);M5:EMA(M4,81), COLORRED,LINETHICK1;股道:=(1-C/SMA(C,13,1))*100;基础:=EMA(C,43);中线强弱拐点:EMA(股道*C/100+基础,3),COLORGRAY,LINETHICK1;。

通达信指标计算公式源码大全

通达信指标计算公式源码大全

通达信指标计算公式源码大全1. 指标计算公式的概述本文档提供了通达信指标计算公式的源码大全。

在通达信软件中,指标计算公式是用于生成各种技术指标的数学计算公式。

这些指标可以帮助投资者分析市场趋势,预测股票价格的走势,以及制定投资策略。

2. 常用指标计算公式2.1 移动平均线移动平均线是最常用的技术指标之一,可以平滑价格曲线,过滤噪音,显示价格的趋势。

以下是常见的移动平均线计算公式:- 简单移动平均线(SMA)- 加权移动平均线(WMA)- 指数移动平均线(EMA)2.2 相对强弱指标(RSI)相对强弱指标是一种衡量股票价格变动强度的指标。

以下是相对强弱指标的计算公式:\[RSI = 100 - \frac{100}{1 + RS}\]\[RS = \frac{\text{N日内收盘涨幅之和}}{\text{N日内收盘跌幅之和}}\]2.3 布林带指标(BOLL)布林带指标是一种测量股票价格波动性的指标。

以下是布林带指标的计算公式:\[MB = \frac{\text{N日收盘价之和}}{N}\]\[UP = MB + k \times \text{标准差}\]\[DN = MB - k \times \text{标准差}\]\[k\] 为参数,一般取值为2。

3. 自定义指标计算公式除了常见的指标计算公式之外,通达信软件还支持自定义指标计算公式。

用户可以根据自己的需求编写和修改指标计算公式。

4. 重要提示本文档提供的指标计算公式源码仅供参考和研究使用,请在投资交易中谨慎使用,切勿盲目依赖指标计算结果。

以上是《通达信指标计算公式源码大全》的内容概述,希望对您的投资分析和技术指标计算有所帮助。

通达信指标公式源码大全

通达信指标公式源码大全

通达信指标公式源码大全TPMK standardization office【 TPMK5AB- TPMK08- TPMK2C- TPMK18】【通达信】魔鬼操盘(主图)-指标公式源码均5:MA(CLOSE,5) COLORYELLOW;均10:MA(CLOSE,10)COLORGREEN;均30: MA(CLOSE,30) COLORMAGENTA ;均60: MA(CLOSE, 60) COLORRED POINTDOT LINETHICK3;均250: MA(CLOSE, 250) COLORBLUE LINETHICK2 ;魔鬼通道上:均30 + 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2 ;魔鬼通道下:均30 - 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2; VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=VAR1*1.05;VAR5:=MA(CLOSE,5);VAR6:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR7:=SMA(VAR6,5,1);VAR8:=VOL>REF(VOL,1);VAR9:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30);【通达信】平均价格(主图)-指标公式源码A:=(3*C+H+L+O)/6;XJ:=(A+0.618*REF(A,1)+0.382*REF(A,2)+0.236*REF(A,3)+0.146*REF(A,4))/2.382;YCZXH:=(MA(HHV(A,2),5)+MA(HHV(A,2),13)+MA(HHV(A,2),21)+MA(HHV(A,2),32))/4;YCZXL:=(MA(LLV(A,2),5)+MA(LLV(A,2),13)+MA(LLV(A,2),21)+MA(LLV(A,2),32))/4;SMH:EMA(YCZXH,21),COLOR004000;SML:EMA(YCZXL,21),COLOR004000;SMJ:(SML+SMH)/2,COLOR004000;PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*REF(A,5)+4*REF(A,6)+3* REF(A,7)+2*REF(A,8)+REF(A,9))/55;A1:=EMA(PJ,3),COLOR004000;A2:=EMA(PJ,5),COLOR004000;A3:=EMA(PJ,7),COLOR004000;A4:=EMA(PJ,9),COLOR004000;A5:=EMA(PJ,11),COLOR004000;LX:=REF(XJ,1);ZD:=(SMA(MAX(XJ-LX,0),5,1)/SMA(ABS(XJ-LX),5,1))*100;KX1:=(CLOSE>=OPEN) AND ZD>=50;KX2:=(CLOSE<OPEN) AND ZD>=50;KX3:=(CLOSE>=OPEN) AND ZD<50;KX4:=(CLOSE<OPEN) AND ZD<50;IF(A5<REF(A5,1),A5,DRAWNULL),COLOR820000,LINETHICK2;IF(A5>REF(A5,1),A5,DRAWNULL),COLOR00005B,LINETHICK2; IF(A4<REF(A4,1),A4,DRAWNULL),COLOR8C0000,LINETHICK1; IF(A4>REF(A4,1),A4,DRAWNULL),COLOR000055,LINETHICK1; IF(A3<REF(A3,1),A3,DRAWNULL),COLOR9B0000,LINETHICK1; IF(A3>REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1; IF(A2<REF(A2,1),A2,DRAWNULL),COLORBB0000,LINETHICK1; IF(A2>REF(A2,1),A2,DRAWNULL),COLOR00007D,LINETHICK1; IF(A1<REF(A1,1),A1,DRAWNULL),COLORCC0000,LINETHICK1; IF(A1>REF(A1,1),A1,DRAWNULL),COLOR00009B,LINETHICK1; STICKLINE(KX1,C,O,4,1),COLOR4440FF;STICKLINE(KX1,C,H,0.5,1),COLOR4440FF;STICKLINE(KX1,O,L,0.5,1),COLOR4440FF;STICKLINE(KX2,C,O,4,0),COLOR4440FF;STICKLINE(KX2,O,H,0.5,0),COLOR4440FF;STICKLINE(KX2,C,L,0.5,0),COLOR4440FF;STICKLINE(KX3,C,O,4,1),COLORFFFF33;STICKLINE(KX3,C,H,0.5,1),COLORFFFF33;STICKLINE(KX3,O,L,0.5,1),COLORFFFF33;STICKLINE(KX4,C,O,4,0),COLORFFFF33;STICKLINE(KX4,O,H,0.5,0),COLORFFFF33;STICKLINE(KX4,C,L,0.5,0),COLORFFFF33;【通达信】牛劲十足(副图)-指标公式源码VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));ZM:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,POINTDOT;ZM1:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),COLOR00FF00,POINTDOT;MMB:=(SUM(ZM,30)+SUM(ZM1,30))/10,COLORYELLOW;SG:=MMB>0 AND REF(MMB,1)<MMB;上攻周期:COUNT(SG,5),LINESTICK,COLORWHITE;JSC:=上攻周期<1;DBQD:=FILTER(COUNT(JSC,5)>3 AND NOT(JSC),10);DRAWICON(DBQD,2,1);DRAWBAND(上攻周期,RGB(255,120,120),3,RGB(0,0,0));DRAWBAND(JSC,RGB(0,0,255),0.5,RGB(0,0,0));STICKLINE(COUNT(上攻周期>3,5)>=3 AND SG,0,上攻周期,1.5,0),COLORRED;XG: COUNT(COUNT(上攻周期>3,5)>=3 AND SG,20)>4;【通达信】魔鬼K线(副图)-指标公式源码VAR1:=REF(OPEN,1);VAR2:=SMA(MAX(OPEN-VAR1,0),6,1)/SMA(ABS(OPEN-VAR1),6,1)*100;VAR3:=REF(CLOSE,1);VAR4:=SMA(MAX(CLOSE-VAR3,0),6,1)/SMA(ABS(CLOSE-VAR3),6,1)*100;VAR5:=REF(HIGH,1);VAR6:=SMA(MAX(HIGH-VAR5,0),6,1)/SMA(ABS(HIGH-VAR5),6,1)*100;VAR7:=REF(LOW,1);VAR8:=SMA(MAX(LOW-VAR7,0),6,1)/SMA(ABS(LOW-VAR7),6,1)*100;STICKLINE(VAR4<VAR2,VAR2,VAR4,5,0),COLORGREEN , ;STICKLINE(VAR4>VAR2,VAR2,VAR4,5,0),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 AND VAR8>VAR4,VAR4,VAR6,0.5,1),COLORRED , ; STICKLINE(VAR4>VAR2 AND VAR6>VAR8 AND VAR8<VAR4,VAR4,VAR6,0.5,1),COLORRED ,; STICKLINE(VAR4>VAR2 AND VAR6<VAR8 AND VAR6>VAR4,VAR4,VAR8,0.5,1),COLORRED , ; STICKLINE(VAR4>VAR2 AND VAR6>VAR8 AND VAR6<VAR2,VAR2,VAR8,0.5,1),COLORRED , ; STICKLINE(VAR4>VAR2 AND VAR6>VAR8 AND VAR6>VAR2,VAR2,VAR8,0.5,1),COLORRED , ; STICKLINE(VAR4>VAR2 AND VAR6<VAR8 AND VAR8<VAR2,VAR2,VAR6,0.5,1),COLORRED , ; STICKLINE(VAR4>VAR2 AND VAR6<VAR8 AND VAR8>VAR2,VAR2,VAR6,0.5,1),COLORRED , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR4,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8<VAR4,VAR4,VAR6,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 AND VAR6<VAR4,VAR2,VAR8,0.5,1),COLORGREEN ,;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6>VAR4,VAR2,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 AND VAR8<VAR2,VAR2,VAR6,0.5,1), COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 AND VAR8>VAR2,VAR2,VAR6,0.5,1),COLORGREEN , ;【通达信】牛熊分界(立桩量、中线)-指标公式源码AAA:=(3*C+H+L+O)/6;VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(A AA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;VAR2:=(HHV(VAR1,5)+HHV(VAR1,10) +HHV(VAR1,20))/3;VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;VAR4:=(HHV(VA R2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20 ))/3;VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;DRAWBAND(VAR1,RGB(155,50,50 ),VAR6,RGB(250,250,0));短线:VAR1,COLORWHITE;中线:VAR6,COLORYELLOW;金叉:短线>中线 AND REF(短线,1)=REF(中线,1),NODRAW;下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;TJ1:=VOL=HHV(VOL,10)ANDVOL>2*REF(VOL,1)AND CLOSE>VAR1;立桩量:=FILTER(TJ1,5);TJ2:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));突破:TJ2=1,NODRAW;STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;STICKLINE(C>=O,C,O,3,0),COLOR000045;STICKLINE(C>=O,C,O,2 .5,0),COLOR000065;STICKLINE(C>=O,C,O,2,0),COLOR000085;STICKLINE(C>=O,C,O,1.5,0 ),COLOR0000A5;STICKLINE(C>=O,C,O,1,0),COLOR0000C5;STICKLINE(C>=O,C,O,0.5,0),CO LOR0000E5;STICKLINE(C>=O,H,L,0,0),COLOR0000F5;STICKLINE(C<O,C,O,3,0),COLOR3535 00;STICKLINE(C<O,C,O,2.5,0),COLOR454500;STICKLINE(C<O,C,O,2,0),COLOR555500;STI CKLINE(C<O,C,O,1.5,0),COLOR656500;STICKLINE(C<O,C,O,1,0),COLOR757500;STICKLINE (C<O,C,O,0.5,0),COLOR858500;STICKLINE(C<O,H,L,0,0),COLOR959500;ZRR:=(YEAR-1992)*365+INTPART((YEAR-1989)/4)+IF(MONTH<=2,DAY+(MONTH-1)*31,DAY+INTPART(13*(MONTH+1)/5)-7+(MONTH-1)*28+IF(INTPART(YEAR/4)=YEAR/4,1,0)),NODRAW;T:=BARSLAST(ZRR-REF(ZRR,1)>WEEKDAY-REF(WEEKDAY,1))+1,NODRAW;T1:=REF(T,T)+T,NODRAW;T2:=REF(T,T1)+T1,NODRAW;T3:=REF (T,T2)+T2,NODRAW;T4:=REF(T,T3)+T3,NODRAW;T5:=REF(T,T4)+T4,NODRAW;T6:=REF(T,T5)+T5,NODRAW;T7:=REF(T,T6)+T6,NODRAW;T8:=REF(T,T7)+T7,NODRAW;周10:(REF(CLOSE,T)+REF(CLOSE,T1)+REF(CLOSE,T2)+REF(CLOSE,T3)+REF(CLOSE,T4)+REF(C LOSE,T5)+REF(CLOSE,T6)+REF(CLOSE,T7)+REF(CLOSE,T8)+CLOSE)/10,LINETHICK2;【通达信】牛准反弹(快线、慢线)-指标公式源码N:=9;M1:=3;M2:=3;P:=9;快线:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;慢线:=SMA(快线,M1,1);ELI空:=SMA(慢线,M2,1);ELI牛股:=IF(BARSLAST(CROSS(慢线,ELI空))<P AND CROSS(慢线,ELI空) AND 慢线<20,90,0);LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),4.1,1)/SMA(ABS(CLOSE-LC),4.1,1)*100;牛准反弹:=CROSS(RSI,11)*80;XG:牛准反弹 OR ELI牛股;【通达信】启动提示(平台线、启动线)-指标公式源码启动线:SUM(EMA((C+L)/2,2),5)/10.158,COLORRED;平衡线:LLV(SUM( EMA((C+L)/2,2),5)/10.158,4),COLORFF00FF;平台线:LLV(SUM( EMA((C+L)/2,2),5)/10.158,10),COLORFFFFFF;强弱线:EMA(启动线,21),COLORYELLOW;STICKLINE(平台线<启动线,启动线,平台线,0.1,0),COLORFFCCAA;STICKLINE(平衡线<启动线,启动线,平衡线,0.1,0),COLORRED;VAR1:=2*MA(LLV((C+L)/2,8)*1.1,13)-EMA((C+L)/2,3)-((C+L)/2)*0.1;VAR2:=IF((EMA((C+L)/2,3)-VAR1)*5>0,POW((EMA((C+L)/2,3)-VAR1)*5,2)/10,-1*POW((EMA((C+L)/2,3)-VAR1)*5,2)/10);VAR3:=IF(VAR2>0,VAR2-0,0);STICKLINE(VAR3>0 AND REF(VAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),强弱线,强弱线+0.2,4,0),COLORFFAACC;DRAWTEXT(VAR3>0 AND REF(VAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),强弱线+0.35,'注意控制'),LINETHICK3,COLORFFAACC;【通达信】平台启动(主图)-指标公式源码圣:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;灵:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;石:=SMA(灵,13,8);仙:=CEILING(SMA(石,13,8));编着:=SMA(圣,21,8);AABB:=IF(L,CONST(L),DRAWNULL);平台启动:STICKLINE(仙-编着>75,AABB,AABB*0.99,15,1),COLOR0000FF; VARZT:=BARSLAST(平台启动);DRAWTEXT(VARZT=1,0.99*(AABB+AABB*0.98)/2,'平台启动'),COLORYELLOW;【通达信】牛熊线分水岭(中线强弱拐点)-指标公式源码JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);M1:=EMA(CLOSE,3);M2:EMA(CLOSE,8);分水岭:SMA(M2,2.5,1.5),LINETHICK2,COLORRED;牛线:3*M2-2*分水岭,LINETHICK2,COLORFF00FF ;熊线:4*分水岭-3*M2,LINETHICK2,COLORGREEN;IF (牛线<=熊线,牛线,熊线),COLORGREEN,LINETHICK2;IF (分水岭<=熊线,分水岭,熊线),COLORGREEN,LINETHICK2;IF(牛线>REF(熊线,1),熊线,DRAWNULL),COLORFF2200,LINETHICK2; M3:EMA(M2,13);M4:EMA(M2,55);VAR1:=EMA(M3,55);M5:EMA(M4,81), COLORRED,LINETHICK1;股道:=(1-C/SMA(C,13,1))*100;基础:=EMA(C,43);中线强弱拐点:EMA(股道*C/100+基础,3),COLORGRAY,LINETHICK1;。

通达信三个公式源码准确率90%以上超级指标精准买卖绝世指标

通达信三个公式源码准确率90%以上超级指标精准买卖绝世指标

通达信三个公式源码准确率90%以上超级指标精准买卖绝世指标1 超级指标指标公式:买卖提示非常明显(适合通达信)指标源码如下:M:3 100 60N 3 100 30散户线: 100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M));RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,5,1);D:=SMA(K,3,1);J:=3*K-2*D;主力线:EMA(J,6),COLORYELLOW;VAR2:=REF(LOW,1);VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);VAR5:=LLV(LOW,30);VAR6:=HHV(VAR4,30);VAR7:=IF(MA(CLOSE,58),1,0);VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VA R7;VAR9:=IF(VAR8>100,100,VAR8);吸筹:STICKLINE(VAR9>-120,0,VAR9,2,5),COLORMAGENTA;AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;AA5:=SMA(AA4,13,8);走势:CEILING(SMA(AA5,13,8)),COLORRED,LINETHICK2;AA6:=SMA(AA3,21,8);买观注: STICKLINE(走势-AA6<-65,0,7,15,1);DRAWICON(FILTER(J>REF(J,1)AND 走势>=REF(走势,1)AND 走势<25 ,5),走势,4);卖观注: STICKLINE(走势-AA6>85,98,90,15,1),COLORFFFF00;DRAWICON(FILTER(J<REF(J,1)AND 走势<=REF(走势,1)AND J>85 ,5),J,5);DIF1:=EMA(CLOSE,7)-EMA(CLOSE,19),COLORWHITE;DEA1:=EMA(DIF1,9);MACD1:=(DIF1-DEA1)*100,COLORSTICK;STICKLINE(MACD1>REF(MACD1,1) AND MACD1>0,0,MACD1,0,0),COLORRED;STICKLINE(MACD1<=REF(MACD1,1) AND MACD1>0,0,MACD1,0,0),COLORYELLOW;STICKLINE(MACD1<REF(MACD1,1) AND MACD1<0,0,MACD1,0,0),COLOR00FF00;STICKLINE(MACD1>=REF(MACD1,1) AND MACD1<0,0,MACD1,0,0),COLORMAGENTA;STICKLINE(C>0,0,0,50,1),COLORBLUE;RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K日:SMA(RSV1,3,1),COLORWHITE;D日:SMA(K日,3,1),COLORYELLOW;J日:3*K日-2*D日,COLORFF00FF;底部:0,COLORF00FF0,LINETHICK2;DRAWICON(CROSS(J日,底部),底部,1);2 精准买卖支撑价:LLV(LOW,19),LINETHICK2 , COLOR00FF00;阻力价:HHV(HIGH,19),COLORBLUE, LINETHICK2;VAR1:=EMA(CLOSE,12)-EMA(CLOSE,26);VAR2:=EMA(VAR1,9);VAR3:=(CLOSE*2.5/100+CLOSE);VAR4:EMA(C,3);VAR5:=LLV(HIGH,240);VAR6:=100*(CLOSE-VAR5)/VAR5;VAR7:=REF(LLV(CLOSE,480),1);VAR8:=REF(HHV(CLOSE,480),1);VAR9:=100*(CLOSE-VAR7)/(VAR8-VAR7);VARA:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100;VARB:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100;VARC:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100;VARD:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100;VARE:=VARC>98.5 OR VARD>98.5;VARF:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4;VAR13:=VARA=0 AND VARC=0 AND VAR6<0;VAR14:=VARA=100 AND VARC=100;VAR15:=VARB=0 OR VARD=0 AND VAR9<0;VAR16:=VARB=100 AND VARD=100;VAR17:=VAR6<0 AND VAR9<0;VAR18:=VAR13 AND VAR15;VAR19:=VAR14 AND VAR16;VAR1B:=SMA(MAX(CLOSE-REF(CLOSE,1),0),49,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;VAR1C:=SMA(MAX(CLOSE-REF(CLOSE,1),0),14,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),14,1)*100;VAR1D:=BARSCOUNT(CLOSE);VAR1E:=VAR1B<20 AND VAR1C<23 AND VAR1D>35;VAR1F:=VAR1E AND COUNT(VAR1E,1)=1;VAR20:=REF(CLOSE,1);VAR21:=SMA(MAX(CLOSE-VAR20,0),34,1)/SMA(ABS(CLOSE-VAR20),7,1)*100;VAR22:=SMA(MAX(CLOSE-VAR20,0),13,1)/SMA(ABS(CLOSE-VAR20),13,1)*100;VAR23:=BARSCOUNT(CLOSE);VAR24:=VAR21<20 AND VAR22<23 AND VAR23>35;VAR25:=VARA=0 AND VARF<1.2 AND VAR17;VAR27:=VAR18 AND VARF<1.2 AND VAR17;VAR29:=SUM(HIGH-OPEN,77)/SUM(OPEN-LOW,77)*100;VAR2A:=SUM(MAX(0,HIGH-REF(CLOSE,1)),77)/SUM(MAX(0,REF(CLOSE,1)-LOW),77)*100;VAR2B:=CROSS(VAR29,69) AND CROSS(VAR2A,80)<150;VAR2C:=VAR24 AND VAR1F AND COUNT(VAR24,30)=1;买点:=VAR25 AND VAR2B;绝对卖点:=(VAR19 OR VARA)AND VARF>23 OR VARE ;VAR2D:=VAR1F AND VAR2C AND VAR25;股海万元户:=(CLOSE/REF(CLOSE,1)>1.04 AND (CLOSE>10.8 AND CLOSE<10.83 OR CLOSE>6.86 AND CLOSE<6.88 OR CLOSE>13.82 AND CLOSE<13.84 OR CLOSE>7.28 AND CLOSE<7.3 OR CLOSE>12.4 AND CLOSE<12.42 OR CLOSE>22.33 AND CLOSE<22.35 OR CLOSE>4.68 AND CLOSE<4.7 OR CLOSE>26.29 AND CLOSE<26.31 OR CLOSE>7.65 AND CLOSE<7.67 OR CLOSE>13.4 AND CLOSE<13.42 OR CLOSE>7.58 AND CLOSE<7.6 OR CLOSE>20.43 AND CLOSE<20.45 ORCLOSE>19.57 AND CLOSE<19.59 OR CLOSE>6.26 AND CLOSE<6.28 OR CLOSE>7.14 AND CLOSE<7.16 OR CLOSE>6.61 AND CLOSE<6.63 OR CLOSE>11.9 AND VOL<11.92 OR CLOSE>6.7 AND CLOSE<6.72 OR CLOSE>8.19 AND CLOSE<8.21));DRAWTEXT(FILTER(绝对卖点>0,3),H,'别贪'), COLOR00FF00;DRAWTEXT(股海万元户>0,L,'☆追涨'),COLORYELLOW ;DRAWICON(买点>0,L,4);DRAWTEXT(买点>0,L,'扫描神针'),COLORF00FF0;DRAWTEXT(VARF<0.7 AND VAR27 AND VAR25>0,L,'万元'),COLORYELLOW;STICKLINE(VAR2D>0,O,C,10,0), COLORRED;DRAWTEXT(VAR2D>0,L,'大方神针'),COLORRED;DRAWICON(COUNT(REF(VAR4,1)<REF(VAR4,2),5)=5 AND VAR4>REF(VAR4,1),L*0.98,5);DRAWICON(FILTER(COUNT(VAR6<0,5)ANDCROSS(VAR6,0)AND VARF>REF(VARF,1)AND C>O,3),L,1);DRAWICON(FILTER(REF(VAR4,1)>REF(VAR4,2)ANDVAR4<REF(VAR4,1)AND VARF>17 AND VAR1>VAR2,5),H,2);DRAWICON(阻力价>REF(阻力价,1)AND CROSS(阻力价,VAR3)AND C<O,H*1.02,15);DIF1:=EMA(CLOSE,7)-EMA(CLOSE,19),COLORWHITE;DEA1:=EMA(DIF1,9);MACD1:=(DIF1-DEA1)*100,COLORSTICK;STICKLINE(MACD1>REF(MACD1,1) AND MACD1>0,0,MACD1,0,0),COLORRED;STICKLINE(MACD1<=REF(MACD1,1) AND MACD1>0,0,MACD1,0,0),COLORYELLOW;STICKLINE(MACD1<REF(MACD1,1) AND MACD1<0,0,MACD1,0,0),COLOR00FF00;STICKLINE(MACD1>=REF(MACD1,1) ANDMACD1<0,0,MACD1,0,0),COLORMAGENTA;STICKLINE(C>0,0,0,50,1),COLORBLUE;RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K日:SMA(RSV1,3,1),COLORWHITE;D日:SMA(K日,3,1),COLORYELLOW;J日:3*K日-2*D日,COLORFF00FF;底部:0,COLORF00FF0,LINETHICK2;DRAWICON(CROSS(J日,底部),底部,1);3 绝世指标GLL:-4;顶:80,COLORFFA500;大顶:100,COLORBLUE;VAR1:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80;VAR2:=SMA(VAR1,10,1);慢速:SMA(VAR2,5,1),COLORRED;RSV:= ((HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100)-70;RSV1:= (CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;FATK:=SMA(RSV1,3,1);形态:SMA(FATK,3,1),COLORBB24DB;VARA:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VARB:=SMA(VARA,3,1);VARC:=SMA(VARB,3,1);加速: EMA(3*VARB-2*VARC,3),COLORYELLOW;底:6,COLOR00BF00;大底:-6,COLOR007300;VAR11:=LLV(LOW,5)=LLV(LOW,45) AND CLOSE>=OPEN*1.04;VAR22:=CLOSE>(REF(HIGH,1)+REF(LOW,1))/2;买入:=VAR11 AND VAR22,STICK,LINETHICK2,COLORRED;VAR3:=REF(CLOSE,1);VAR4:=SMA(MAX(CLOSE-VAR3,0),6,1)/SMA(ABS(CLOSE-VAR3),6,1)*100;卖出:=CROSS(80,VAR4),STICK,LINETHICK2,COLORGREEN;{波段介入点}A1:=REF(CLOSE,2);A2:=SMA(MAX(CLOSE-A1,0),7,1)/SMA(ABS(CLOSE-A1),7,1)*100;波段介入点:IF(A2<19,19,0)COLORWHITE;。

通达信指标公式源码K线形态

通达信指标公式源码K线形态

通达信指标公式源码K线形态通达信是国内一款常用的股票分析软件,其拥有丰富的指标库。

下面是我随机选取的一些通达信指标公式源码,主要涉及K线形态的指标:1. 三重顶(ThreeTop)公式源码如下:```C:=REF(CLOSE,1);AVGMA:=(MAX(HIGH,C)+MIN(LOW,C))/2;XG:=AVGMA>REF(AVGMA,1)ANDAVGMA>REF(AVGMA,2)ANDREF(AVGMA,1)>R EF(AVGMA,2);COUNT1:=SUM(IF(XG,1,0),30);DST:=(C-LOW)/(HIGH-LOW)>IF(HIGH>REF(HIGH,1),0.75,1);COUNT2:=SUM(DST,30);THREETOP:CROSS(COUNT1,COUNT2)ANDCOUNT1>15ANDCOUNT2<5;```此公式计算了三重顶的形态,利用三个条件来判断:前一天的平均价大于前两天,前一天的收盘价高于前两天,且最近30天中出现三重顶的数量大于15个,且没有出现破位的情况。

2. 三重底(ThreeBottom)公式源码如下:```C:=REF(CLOSE,1);AVGMA:=(MAX(HIGH,C)+MIN(LOW,C))/2;XG:=AVGMA<REF(AVGMA,1)ANDAVGMA<REF(AVGMA,2)ANDREF(AVGMA,1)<R EF(AVGMA,2);COUNT1:=SUM(IF(XG,1,0),30);DST:=(C-LOW)/(HIGH-LOW)<IF(LOW<REF(LOW,1),0.25,0);COUNT2:=SUM(DST,30);THREEBTM:CROSS(COUNT1,COUNT2)ANDCOUNT1>15ANDCOUNT2<5;```此公式计算了三重底的形态,利用三个条件来判断:前一天的平均价小于前两天,前一天的收盘价低于前两天,且最近30天中出现三重底的数量大于15个,且没有出现破位的情况。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

均5:MA(CLOSE,5) COLORYELLOW;均10:MA(CLOSE,10)COLORGREEN;均30: MA(CLOSE,30) COLORMAGENTA ;均60: MA(CLOSE, 60) COLORRED POINTDOT LINETHICK3;均250: MA(CLOSE, 250) COLORBLUE LINETHICK2 ;魔鬼通道上:均30 + 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2 ;魔鬼通道下:均30 - 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2; VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=VAR1*;VAR5:=MA(CLOSE,5);VAR6:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR7:=SMA(VAR6,5,1);VAR8:=VOL>REF(VOL,1);VAR9:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30);【通达信】平均价格(主图)-指标公式源码A:=(3*C+H+L+O)/6;XJ:=(A+*REF(A,1)+*REF(A,2)+*REF(A,3)+*REF(A,4))/;YCZXH:=(MA(HHV(A,2),5)+MA(HHV(A,2),13)+MA(HHV(A,2),21)+MA(HHV(A,2),32 ))/4;YCZXL:=(MA(LLV(A,2),5)+MA(LLV(A,2),13)+MA(LLV(A,2),21)+MA(LLV(A,2),32 ))/4;SMH:EMA(YCZXH,21),COLOR004000;SML:EMA(YCZXL,21),COLOR004000;SMJ:(SML+SMH)/2,COLOR004000;PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*REF(A,5)+4*RE F(A,6)+3*REF(A,7)+2*REF(A,8)+REF(A,9))/55;A1:=EMA(PJ,3),COLOR004000;A2:=EMA(PJ,5),COLOR004000;A3:=EMA(PJ,7),COLOR004000;A4:=EMA(PJ,9),COLOR004000;A5:=EMA(PJ,11),COLOR004000;LX:=REF(XJ,1);ZD:=(SMA(MAX(XJ-LX,0),5,1)/SMA(ABS(XJ-LX),5,1))*100;KX1:=(CLOSE>=OPEN) AND ZD>=50;KX2:=(CLOSE<OPEN) AND ZD>=50;KX3:=(CLOSE>=OPEN) AND ZD<50;KX4:=(CLOSE<OPEN) AND ZD<50;IF(A5<REF(A5,1),A5,DRAWNULL),COLOR820000,LINETHICK2;IF(A5>REF(A5,1),A5,DRAWNULL),COLOR00005B,LINETHICK2;IF(A4<REF(A4,1),A4,DRAWNULL),COLOR8C0000,LINETHICK1;IF(A4>REF(A4,1),A4,DRAWNULL),COLOR000055,LINETHICK1;IF(A3<REF(A3,1),A3,DRAWNULL),COLOR9B0000,LINETHICK1;IF(A3>REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1;IF(A2<REF(A2,1),A2,DRAWNULL),COLORBB0000,LINETHICK1;IF(A2>REF(A2,1),A2,DRAWNULL),COLOR00007D,LINETHICK1;IF(A1<REF(A1,1),A1,DRAWNULL),COLORCC0000,LINETHICK1;IF(A1>REF(A1,1),A1,DRAWNULL),COLOR00009B,LINETHICK1;STICKLINE(KX1,C,O,4,1),COLOR4440FF;STICKLINE(KX1,C,H,,1),COLOR4440FF;STICKLINE(KX1,O,L,,1),COLOR4440FF;STICKLINE(KX2,C,O,4,0),COLOR4440FF;STICKLINE(KX2,O,H,,0),COLOR4440FF;STICKLINE(KX2,C,L,,0),COLOR4440FF;STICKLINE(KX3,C,O,4,1),COLORFFFF33;STICKLINE(KX3,C,H,,1),COLORFFFF33;STICKLINE(KX3,O,L,,1),COLORFFFF33;STICKLINE(KX4,C,O,4,0),COLORFFFF33;STICKLINE(KX4,O,H,,0),COLORFFFF33;STICKLINE(KX4,C,L,,0),COLORFFFF33;【通达信】牛劲十足(副图)-指标公式源码VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));ZM:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CL OSE-LOW)),VOL/2)),COLORRED,POINTDOT;ZM1:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-V AR1*(HIGH-LOW),0-VOL/2)),COLOR00FF00,POINTDOT;MMB:=(SUM(ZM,30)+SUM(ZM1,30))/10,COLORYELLOW;SG:=MMB>0 AND REF(MMB,1)<MMB;上攻周期:COUNT(SG,5),LINESTICK,COLORWHITE;JSC:=上攻周期<1;DBQD:=FILTER(COUNT(JSC,5)>3 AND NOT(JSC),10);DRAWICON(DBQD,2,1);DRAWBAND(上攻周期,RGB(255,120,120),3,RGB(0,0,0));DRAWBAND(JSC,RGB(0,0,255),,RGB(0,0,0));STICKLINE(COUNT(上攻周期>3,5)>=3 AND SG,0,上攻周期,,0),COLORRED; XG: COUNT(COUNT(上攻周期>3,5)>=3 AND SG,20)>4;【通达信】魔鬼K线(副图)-指标公式源码VAR1:=REF(OPEN,1);VAR2:=SMA(MAX(OPEN-VAR1,0),6,1)/SMA(ABS(OPEN-VAR1),6,1)*100;VAR3:=REF(CLOSE,1);VAR4:=SMA(MAX(CLOSE-VAR3,0),6,1)/SMA(ABS(CLOSE-VAR3),6,1)*100;VAR5:=REF(HIGH,1);VAR6:=SMA(MAX(HIGH-VAR5,0),6,1)/SMA(ABS(HIGH-VAR5),6,1)*100;VAR7:=REF(LOW,1);VAR8:=SMA(MAX(LOW-VAR7,0),6,1)/SMA(ABS(LOW-VAR7),6,1)*100; STICKLINE(VAR4<VAR2,VAR2,VAR4,5,0),COLORGREEN , ;STICKLINE(VAR4>VAR2,VAR2,VAR4,5,0),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR8>VAR4,VAR4,VAR6,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR8<VAR4,VAR4,VAR6,,1),COLORRED ,;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR6<VAR2,VAR2,VAR8,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR6>VAR2,VAR2,VAR8,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR8<VAR2,VAR2,VAR6,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR8>VAR2,VAR2,VAR6,,1),COLORRED , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR4,VAR8,,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8<VAR4,VAR4,VAR6,,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR2,VAR8,,1),COLORGREEN ,;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6>VAR4,VAR2,VAR8,,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 AND VAR8<VAR2,VAR2,VAR6,,1), COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8>VAR2,VAR2,VAR6,,1),COLORGREEN , ;【通达信】牛熊分界(立桩量、中线)-指标公式源码AAA:=(3*C+H+L+O)/6;VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3 )+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LL V(VAR1,20))/3;VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;VAR5:=( LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;VAR6:=(LLV(VAR1,2)+LLV(VAR1, 4)+LLV(VAR1,6))/3;DRAWBAND(VAR1,RGB(155,50,50),VAR6,RGB(250,250,0));短线:VAR1,COLORWHITE;中线:VAR6,COLORYELLOW;金叉:短线>中线 AND REF(短线,1)=REF(中线,1),NODRAW;下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;TJ1:=VOL=HHV(VOL,10)AND VOL>2*REF(VOL,1)AND CLOSE>VAR1;立桩量:=FILTER(TJ1,5);TJ2:=IF(BARSLAST(立桩量)=1 ANDCLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));突破:TJ2=1,NODRAW;STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;STICKLINE(C>=O,C,O,3,0),COLOR000045;STICKLINE(C >=O,C,O,,0),COLOR000065;STICKLINE(C>=O,C,O,2,0),COLOR000085;STICKLINE (C>=O,C,O,,0),COLOR0000A5;STICKLINE(C>=O,C,O,1,0),COLOR0000C5;STICKLI NE(C>=O,C,O,,0),COLOR0000E5;STICKLINE(C>=O,H,L,0,0),COLOR0000F5;STICK LINE(C<O,C,O,3,0),COLOR353500;STICKLINE(C<O,C,O,,0),COLOR454500;STICK LINE(C<O,C,O,2,0),COLOR555500;STICKLINE(C<O,C,O,,0),COLOR656500;STICK LINE(C<O,C,O,1,0),COLOR757500;STICKLINE(C<O,C,O,,0),COLOR858500;STICK LINE(C<O,H,L,0,0),COLOR959500;ZRR:=(YEAR-1992)*365+INTPART((YEAR-1989 )/4)+IF(MONTH<=2,DAY+(MONTH-1)*31,DAY+INTPART(13*(MONTH+1)/5)-7+(MONT H-1)*28+IF(INTPART(YEAR/4)=YEAR/4,1,0)),NODRAW;T:=BARSLAST(ZRR-REF(ZR R,1)>WEEKDAY-REF(WEEKDAY,1))+1,NODRAW;T1:=REF(T,T)+T,NODRAW;T2:=REF(T ,T1)+T1,NODRAW;T3:=REF(T,T2)+T2,NODRAW;T4:=REF(T,T3)+T3,NODRAW;T5:=RE F(T,T4)+T4,NODRAW;T6:=REF(T,T5)+T5,NODRAW;T7:=REF(T,T6)+T6,NODRAW;T8:=REF(T,T7)+T7,NODRAW;周10:(REF(CLOSE,T)+REF(CLOSE,T1)+REF(CLOSE,T2)+REF(CLOSE,T3)+REF(CLOSE, T4)+REF(CLOSE,T5)+REF(CLOSE,T6)+REF(CLOSE,T7)+REF(CLOSE,T8)+CLOSE)/10 ,LINETHICK2;【通达信】牛准反弹(快线、慢线)-指标公式源码N:=9;M1:=3;M2:=3;P:=9;快线:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;慢线:=SMA(快线,M1,1);ELI空:=SMA(慢线,M2,1);ELI牛股:=IF(BARSLAST(CROSS(慢线,ELI空))<P AND CROSS(慢线,ELI空) AND 慢线<20,90,0);LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),,1)/SMA(ABS(CLOSE-LC),,1)*100;牛准反弹:=CROSS(RSI,11)*80;XG:牛准反弹 OR ELI牛股;【通达信】启动提示(平台线、启动线)-指标公式源码启动线:SUM(EMA((C+L)/2,2),5)/,COLORRED;平衡线:LLV(SUM( EMA((C+L)/2,2),5)/,4),COLORFF00FF;平台线:LLV(SUM( EMA((C+L)/2,2),5)/,10),COLORFFFFFF;强弱线:EMA(启动线,21),COLORYELLOW;STICKLINE(平台线<启动线,启动线,平台线,,0),COLORFFCCAA;STICKLINE(平衡线<启动线,启动线,平衡线,,0),COLORRED;VAR1:=2*MA(LLV((C+L)/2,8)*,13)-EMA((C+L)/2,3)-((C+L)/2)*;VAR2:=IF((EMA((C+L)/2,3)-VAR1)*5>0,POW((EMA((C+L)/2,3)-VAR1)*5,2)/10, -1*POW((EMA((C+L)/2,3)-VAR1)*5,2)/10);VAR3:=IF(VAR2>0,VAR2-0,0);STICKLINE(VAR3>0 AND REF(VAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),强弱线,强弱线+,4,0),COLORFFAACC;DRAWTEXT(VAR3>0 AND REF(VAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),强弱线+,'注意控制'),LINETHICK3,COLORFFAACC;【通达信】平台启动(主图)-指标公式源码圣:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;灵:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;石:=SMA(灵,13,8);仙:=CEILING(SMA(石,13,8));编著:=SMA(圣,21,8);AABB:=IF(L,CONST(L),DRAWNULL);平台启动:STICKLINE(仙-编著>75,AABB,AABB*,15,1),COLOR0000FF;VARZT:=BARSLAST(平台启动);DRAWTEXT(VARZT=1,*(AABB+AABB*/2,'平台启动'),COLORYELLOW;【通达信】牛熊线分水岭(中线强弱拐点)-指标公式源码JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);M1:=EMA(CLOSE,3);M2:EMA(CLOSE,8);分水岭:SMA(M2,,,LINETHICK2,COLORRED;牛线:3*M2-2*分水岭,LINETHICK2,COLORFF00FF ;熊线:4*分水岭-3*M2,LINETHICK2,COLORGREEN;IF (牛线<=熊线,牛线,熊线),COLORGREEN,LINETHICK2;IF (分水岭<=熊线,分水岭,熊线),COLORGREEN,LINETHICK2;IF(牛线>REF(熊线,1),熊线,DRAWNULL),COLORFF2200,LINETHICK2;M3:EMA(M2,13);M4:EMA(M2,55);VAR1:=EMA(M3,55);M5:EMA(M4,81), COLORRED,LINETHICK1;股道:=(1-C/SMA(C,13,1))*100;基础:=EMA(C,43);中线强弱拐点:EMA(股道*C/100+基础,3),COLORGRAY,LINETHICK1;。

相关文档
最新文档