通达信指标公式源码大全
通达信指标大全
通达信指标公式大全通达信指标公式大全分类:指标公式源码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、百万踏浪(相传为杨百万看图公式)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,VAR4) AND V AR4<25;STICKLINE(V AR6,0,V AR4+15,5,0), COLORGREEN;V AR7:=CROSS(V AR4,VAR5) AND V AR4<25;V AR8:=V AR7 AND VOL>REF(VOL,1)*2 AND VOL>REF(MA(VOL,5),1)*2; STICKLINE(V AR7,0,V AR4+55,5,0),COLORWHITE;DRAWTEXT(V AR7 AND COUNT(V AR7,10)=1,V AR4+25,'抄底'),COLORYELLOW; STICKLINE(V AR8,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,VAR4) AND V AR4>80 AND V AR4>VAR5;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(V ARA,V AR4-15,100,15,0), COLORYELLOW;DRAWTEXT(V ARA 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.9;V ARF:=LOW*0.9;V AR10:=(V ARF*VOL+V ARE*(CAPITAL-VOL))/CAPITAL;V AR11:=EMA(V AR10,30);V AR12:=CLOSE-REF(CLOSE,1);V AR13:=MAX(V AR12,0);V AR14:=ABS(V AR12);V AR15:=SMA(VAR13,7,1)/SMA(V AR14,7,1)*100;V AR16:=SMA(VAR13,13,1)/SMA(V AR14,13,1)*100;V AR17:=BARSCOUNT(CLOSE);V AR18:=SMA(MAX(V AR12,0),6,1)/SMA(ABS(V AR12),6,1)*100;V AR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;V AR20:=V AR18<=25 AND V AR19<-95 AND V AR1F>20 AND V AR1B<-30 AND V AR1E<30 AND V AR11-CLOSE>=-0.25 AND V AR15<22 AND V AR16<28 AND V AR17>50; STICKLINE(V AR20,0,50,10,0),LINETHICK2,COLORBLUE;DRAWTEXT(CROSS(V AR20,0.5) AND COUNT(V AR20=1,10)=1,60,'百万导弹?'),LINETHICK7,COLORWHITE;2、分类资金A:=IF((CLOSE>126.32),(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,主力,2.8,0),COLOR009CFF;STICKLINE((主力> 0),0,主力,2.5,0),COLOR00C0FF;STICKLINE((主力> 0),0,主力,1.5,0),COLOR00D1FF;STICKLINE((主力> 0),0,主力,1,0),COLOR00EAFF;STICKLINE((主力> 0),0,主力,0.7,0),COLORYELLOW;STICKLINE((游资> 0),0,游资,3,0),COLOR00C100;STICKLINE((游资> 0),0,游资,2.8,0),COLOR00CA00;STICKLINE((游资> 0),0,游资,2.5,0),COLOR00D300;STICKLINE((游资> 0),0,游资,1.5,0),COLOR00DB00;STICKLINE((游资> 0),0,游资,1,0),COLOR00EA00;STICKLINE((游资> 0),0,游资,0.7,0),COLORGREEN;STICKLINE((大户> 0),0,大户,3,0),COLOR1020AA;STICKLINE((大户> 0),0,大户,2.8,0),COLOR1020BB;STICKLINE((大户> 0),0,大户,2.5,0),COLOR1020CC;STICKLINE((大户> 0),0,大户,1.5,0),COLOR1020DD;STICKLINE((大户> 0),0,大户,1,0),COLOR1020EE;STICKLINE((大户> 0),0,大户,0.7,0),COLORRED;STICKLINE((散户> 0),0,散户,3,0),COLORFF7700;STICKLINE((散户> 0),0,散户,2.8,0),COLORFF8800;STICKLINE((散户> 0),0,散户,2.5,0),COLORFF9900;STICKLINE((散户> 0),0,散户,1.5,0),COLORFFAA00; STICKLINE((散户> 0),0,散户,1,0),COLORFFBB00;STICKLINE((散户> 0),0,散户,0.7,0),COLORLIBLUE;3、黑马起爆点V AR1:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;V AR2:=(CLOSE-LLV(LOW,43))/(HHV(HIGH,43)-LLV(LOW,43))*100;V AR3:=SMA(V AR2,2,1);天:100+(-ABS(V AR1)),COLORRED;下:SMA(V AR3,2,1);无:ABS(V AR1),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=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,WOL,0,3,-1),COLORFFFFFF; VOLUME:VOL,VOLSTICK;V5:MA(VOLUME,5);V10:MA(VOLUME,10);V135:MA(VOLUME,135);V AR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));主买:IF(CLOSE>OPEN,V AR1*(HIGH-LOW),IF(CLOSE<OPEN,V AR1*((HIGH-OPEN)+(CLOSE -LOW)),VOL/2)),COLORRED,POINTDOT;主卖:IF(CLOSE>OPEN,V AR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,V AR1*(HIG H-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=1 ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL),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.5 OR 虚拟量比>1.5;获利比例%1:=获利比例%>70;涨幅%1:=涨幅%>3;启动:=换手率%1 AND 量比1 AND 获利比例%1 AND 涨幅%1 ;起涨点:IF(启动,101,0)COLORRED,LINETHICK2;6、庄家建仓V AR1:=REF(LOW,1);V AR2:=SMA(ABS(LOW-V AR1),13,1)/SMA(MAX(LOW-VAR1,0),13,1)*4;V AR3:=EMA(VAR2,13);V AR4:=LLV(LOW,34);V AR5:=EMA(IF(LOW<=V AR4,V AR3,0),3);主力进场:STICKLINE(V AR5>REF(V AR5,1),0,V AR5,7,0 ),COLORRED;7、出色超赢JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;V AR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));V AR2:=(REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR3:=(REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR4:=(REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR5:=(REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR6:=(REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR7:=(REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR8:=(REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR9:=(REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V ARA:=(REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V ARB:=(REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V ARC:=(REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V ARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));V ARE:=(REF(V ARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V ARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));V AR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));V AR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));V AR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));V AR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));V AR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));V AR19:=((REF(VARD OR V ARE OR V ARF OR V AR10 OR V AR11 OR V AR12 OR V AR13 OR V AR14 OR V AR15 OR VAR16 OR V AR17 OR V AR18,1)) AND V AR1);V AR1A:=((REF(VAR1 OR V AR2 OR V AR3 OR V AR4 OR V AR5 OR V AR6 OR V AR7 OR V AR8 OR V AR9 OR V ARA OR V ARB OR V ARC,1)) AND V ARD);红色持股:V AR1 OR V AR2 OR V AR3 OR V AR4 OR V AR5 OR V AR6 OR V AR7 OR V AR8 OR V AR9 OR V ARA OR V ARB OR V ARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;青色观望:V ARD OR V ARE OR V ARF OR VAR10 OR V AR11 OR V AR12 OR V AR13 OR V AR14 OR V AR15 OR VAR16 OR V AR17 OR V AR18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLORFF0000,NODRAW;黄色低买:V AR19,COLOR33AACC,NODRAW;洋红离场:V AR1A,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(ISLASTBAR AND (红色持股OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (青色观望OR REF(青色观望,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,3.5,0),COLOR858500;STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5;STICKLINE(红色持股,CLOSE,O,2.8,0),COLOR000055;STICKLINE(红色持股,CLOSE,O,2,0),COLOR000088;STICKLINE(红色持股,CLOSE,O,1.5,0),COLOR0000AA;STICKLINE(红色持股,CLOSE,O,1,0),COLOR0000CC;STICKLINE(红色持股,CLOSE,O,0.5,0),COLOR0000EE;STICKLINE(青色观望,CLOSE,O,2.8,0),COLOR555500;STICKLINE(青色观望,CLOSE,O,2,0),COLOR888800;STICKLINE(青色观望,CLOSE,O,1.5,0),COLORAAAA00;STICKLINE(青色观望,CLOSE,O,1,0),COLORCCCC00;STICKLINE(青色观望,CLOSE,O,0.5,0),COLOREEEE00;CO:=(C-O);STICKLINE(急跌关注,O,C-CO/2,2.8,0),COLOR555555;STICKLINE(急跌关注,O,C-CO/2,2,0),COLOR888888;STICKLINE(急跌关注,O,C-CO/2,1.5,0),COLORAAAAAA;STICKLINE(急跌关注,O,C-CO/2,1,0),COLORCCCCCC;STICKLINE(急跌关注,O,C-CO/2,0.5,0),COLOREEEEEE;STICKLINE(黄色低买,O,O+CO/3,2.8,0),COLOR335555;STICKLINE(黄色低买,O,O+CO/3,2,0),COLOR338888;STICKLINE(黄色低买,O,O+CO/3,1.5,0),COLOR33AAAA;STICKLINE(黄色低买,O,O+CO/3,1,0),COLOR33CCCC;STICKLINE(黄色低买,O,O+CO/3,0,0),COLOR33EEEE;STICKLINE(洋红离场,O,O+CO/3,2.8,0),COLOR550055;STICKLINE(洋红离场,O,O+CO/3,2,0),COLOR880088;STICKLINE(洋红离场,O,O+CO/3,1.5,0),COLORAA00AA;STICKLINE(洋红离场,O,O+CO/3,1,0),COLORCC00CC;STICKLINE(洋红离场,O,O+CO/3,0.5,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+0.01,1)) AND X2 AND J<20,30,0);DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X2 AND J<20,LOW*0.98,'★'),COLORYELLOW;8、彩色成交量STICKLINE(VOL > 0,VOL,0,3,0),COLOR333333;STICKLINE(VOL > 0,VOL,0,2.5,0),COLOR998855;STICKLINE(VOL > 0,VOL,0,1.7,0),COLORBBAA77;STICKLINE(VOL > 0,VOL,0,0.9,0),COLORDDCC99;STICKLINE(VOL > 0,VOL,0,0.04,0),COLORFFEEBB;换手:=VOL/CAPITAL*100,COLORRED;STICKLINE(换手>2 ,VOL ,CAPITAL*0.02,3,0),COLOR00AAAA; STICKLINE(换手>2 ,VOL ,CAPITAL*0.02,2.5,0),COLOR00CCCC; STICKLINE(换手>2 ,VOL ,CAPITAL*0.02,1.7,0),COLOR00EEEE; STICKLINE(换手>2 ,VOL ,CAPITAL*0.02,0.08,0),COLOR00FFFF; STICKLINE(换手>4 ,VOL ,CAPITAL*0.04,3,0 ),COLOR009900; STICKLINE(换手>4 ,VOL ,CAPITAL*0.04,2.5,0 ),COLOR00BB00; STICKLINE(换手>4 ,VOL ,CAPITAL*0.04,1.7,0 ),COLOR00DD00; STICKLINE(换手>4 ,VOL ,CAPITAL*0.04,0.8,0 ),COLOR00FF00; STICKLINE(换手>7 ,VOL ,CAPITAL*0.07,3,0),COLORBROWN; STICKLINE(换手>7 ,VOL ,CAPITAL*0.07,2.5,0),COLOR0000AA; STICKLINE(换手>7 ,VOL ,CAPITAL*0.07,1.7,0),COLOR0000CC; STICKLINE(换手>7 ,VOL ,CAPITAL*0.07,0.8,0),COLOR0000DD;五天均量:MA(VOL,5),COLORRED,LINETHICK0.01;廿天均量:MA(VOL,20),COLORWHITE,LINETHICK0.01;HSS:=V/CAPITAL*100,NODRAW;{显示当日换手}五天换手率:SUM(HSS,5),NODRAW;廿天换手率:SUM(HSS,20),NODRAW;抛压:STICKLINE(CROSS(84,RSI),0 ,VOL,1.5,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.1-C<0.01 ,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:=操作线<震仓线2 AND REF(操作线,1)>震仓线2 ;PP:=操作线<震仓线AND REF(操作线,1)>震仓线;PP3:=操作线<抄底线AND REF(操作线,1)>抄底线;HH:=COUNT(涨停,13)>=1;STICKLINE(PP2 AND HH,0,5,3,0),COLORRED;STICKLINE(PP AND HH,0,5,3,0),COLORRED;STICKLINE(PP3 AND HH,0,5,3,0),COLORRED;DRAWTEXT(PP2 AND HH,8,'预警'),COLORRED;DRAWTEXT(PP AND HH,8,'预警'),COLORRED;DRAWTEXT(PP3 AND HH,8,'预警'),COLORRED;A:=SMA(L,4,3) ;绿色买入:IF (((A AND REF(PP,1) AND HH) OR (A AND REF(PP3,1) AND HH)),1,0 ); STICKLINE(A AND REF(PP,1) AND HH ,0,10,1,0),COLORGREEN;DRAWICON(A AND REF(PP,1) AND HH,12,1);STICKLINE(A AND REF(PP3,1) AND HH ,0,10,1,0)COLORGREEN;DRAWICON(A AND REF(PP3,1) AND HH,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) OR HHV((M1<M4),10);S:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,35)-LLV(LOW,34)),3); DRAWTEXT( FILTER(CROSS(S ,60 ),20),L*0.98,'▲'),COLORYELLOW ; {DRAWTEXT(FILTER( Z,9),H*1.028,'★') ,COLORBLUE;STICKLINE( S>60,O,C,4,0) ,COLORFF9BFB;}STICKLINE( S>60,O,C,2,0) ,COLORRED;{STICKLINE( S>60,O,C,1.5,0) ,COLORFD9BFB; }STICKLINE( S>60,H,L,0,0) ,COLORRED;{STICKLINE( S<60,O,C,4,0) ,COLOR01DC38;STICKLINE( S<60,O,C,2.5,0) ,COLOR01FE41;}STICKLINE( S<60,O,C,2,0) ,COLORGREEN;STICKLINE( S<60,H,L,0,0) ,COLORGREEN;V AR1:MA(CLOSE,5);V AR2:MA(CLOSE,10);V AR3:MA(CLOSE,20);V AR60:MA(CLOSE,60);V AR120:MA(CLOSE,120);V AR4:=OPEN<V AR1 OR OPEN<V AR2 OR OPEN<V AR3;V AR5:=CLOSE>MAX(V AR1,MAX(V AR2,MAX(V AR3,V AR60)));V AR6:=VOL/MA(VOL,30)>1.2;V AR7:=CLOSE/REF(CLOSE,1)>1.049;V AR8:=V AR4 AND V AR5 AND V AR6 AND V AR7;V AR9:=V AR8 AND (REF(BARSLAST(V AR8),1)>60 OR BARSSINCE(V AR8)=0); DRAWICON(V AR9 ,L*0.98,1) ;STICKLINE( VAR9,O,C,6,0) ,COLORYELLOW;STICKLINE( VAR9,H,L,0.6,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)>1.097;XH:=FILTER(ZT,13);BH:=BARSLAST(ZT);STICKLINE(ZT,0,L*1,3,0),COLORYELLOW;DRAWTEXT(ZT,L*1.1,'涨停'),COLORF00FF0;V ARZT:=BARSLAST(C/REF(C,1)>1.097);AA:=BETWEEN(C,REF(L,BH)*1.01,REF(L,BH)*0.987);STICKLINE(AA,0,L*0.5,2,0),COLORBLUE;DRAWTEXT(AA,L*0.6,'警戒'),COLORWHITE;STICKLINE(AA AND V ARZT=2,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=2,L*0.9,'时间窗'),COLORWHITE;STICKLINE(AA AND V ARZT=4,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=4,L*0.9,'时间窗'),COLORWHITE;STICKLINE(AA AND V ARZT=7,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=7,L*0.9,'时间窗'),COLORWHITE;STICKLINE(AA AND V ARZT=12,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=12,L*0.9,'时间窗'),COLORWHITE;STICKLINE(AA AND V ARZT=20,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=20,L*0.9,'时间窗'),COLORWHITE;。
通达信技术指标公式源码大全
通达信技术指标公式源码大全简介该文档收集了通达信软件中的各种技术指标的公式源码,为用户提供了便于研究和使用的资源。
通达信软件是一款常用的股票分析软件,其技术指标功能强大且灵活,能够帮助用户进行股票分析和决策。
内容该文档包含了以下技术指标的公式源码:1. 移动平均线(MA)2. 相对强弱指标(RSI)3. 随机指标(KDJ)4. 布林线指标(BOLL)5. 指数移动平均线(EMA)6. 平滑异同移动平均线(MACD)7. 加权移动平均线(WMA)8. 成交量指标(VOL)9. 威廉指标(W%R)10. 动向指标(DMI)11. 随机相对强弱指数(W%R)12. 平均成交量(AVP)13. 梅斯线(MS)使用方法1. 打开通达信软件,并进入相应的分析页面。
2. 在计算指标的输入框中输入相应的公式源码。
3. 确认输入正确无误后,点击计算按钮。
4. 通达信软件将根据公式源码计算指标数值,并在图表中展示。
注意事项1. 在使用该文档中的公式源码时,建议仔细检查输入的代码是否与文档中的一致。
2. 请谨慎使用该文档提供的公式源码,并在实际操作前先进行充分的理论和实践研究。
3. 本文档中的公式源码仅供参考,不保证在所有情况下都能正确使用和产生预期效果。
结论通过收集通达信软件中的各种技术指标的公式源码,该文档为用户提供了便于研究和使用的资源。
希望用户在使用时能够注意检查代码准确性,并充分理解和实践相关的理论知识。
祝愿用户在股票分析和决策中取得良好的效果。
注意:本文档中的内容仅供参考,请自行验证和确认后使用。
简单明了通达信指标公式源码
简单明了通达信指标公式源码
以下是通达信指标公式的源码(部分):
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)需要注意的是,在使用这些源码时,要理解每个指标的具体计算过程和意义,以及与股票行情数据之间的关系。
同时,根据自身的需求进行适当的修改和优化,以满足个人的投资研究需求。
通达信_指标公式源码大全(20200618074821)
【通达信】魔鬼操盘(主图)-指标公式源码均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));金叉:短线>中线 AND REF(短短线:VAR1,COLORWHITE;中线:VAR6,COLORYELLOW;线,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;STICKLINE(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),COLOR0000F5;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),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*(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 一年做一股!忠告,轻易不抛牛股,毕业。
通达信指标公式源码大全
通达信指标公式源码大全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。
(完整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(`函数将主力买卖比例和散户买卖比例画在图表上,使用红色和绿色分别表示。
这段代码的作用是计算并绘制通达信量能指标中的主力买卖比例和散户买卖比例曲线。
这些曲线可以帮助分析市场的买卖力量和趋势,更好地理解市场的活跃度和价格行为。
通达信 指标公式源码大全
【通达信】魔鬼操盘(主图)-指标公式源码均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;。
基础指标公式源码(通达信版)
基础指标公式源码(通达信版)
介绍
本文档将提供一些通达信版基础指标的公式源码,帮助用户更好地理解和使用这些指标。
移动平均线指标公式源码
简单移动平均线(MA)
MA(CLOSE,N)
公式中,CLOSE 表示收盘价,N 表示计算的周期数。
加权移动平均线(WMA)
WMA(CLOSE,N)
公式中的参数意义与简单移动平均线相同。
指数移动平均线(EMA)
EMA(CLOSE,N)
公式中的参数意义与简单移动平均线相同。
平滑异同平均线(MACD)
MACD(SHORT, LONG, M)
公式中,SHORT 表示较短的移动平均线周期数,LONG 表示
较长的移动平均线周期数,M 表示计算离差值的移动平均线周期数。
相对强弱指标公式源码
相对强弱指标(RSI)
RSI(CLOSE,N1)
公式中,CLOSE 表示收盘价,N1 表示计算 RS1 的周期数。
平均动向指标(ADX)
ADX(N)
公式中,N 表示计算 ADX 的周期数。
总结
本文档提供了通达信版的基础指标公式源码,供用户使用和参考。
这些指标可以帮助用户分析市场走势和判断交易信号。
用户可
以根据自己的需求和实际情况,选择适合的指标进行使用。
精品指标通达信指标公式源码
抓买点的套装!极品!{XS薛斯通道}{N:80,120,102;M:2,20,7;}AA:=MA((2*CLOSE+HIGH+LOW)/4,5);通道1:AA*N/100;通道2:AA*(200-N)/100;CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20); DD:=DMA(CLOSE,CC);通道3:(1+M/100)*DD;通道4:(1-M/100)*DD;DIF:=EMA(DCLOSE,9)-EMA(DCLOSE,17);DEA:=EMA(DIF,6);AAA:=(DIF-DEA)*2*60;起爆:=CROSS(AAA-REF(AAA,1),12);DRAWTEXT(起爆,L*0.975,'爆'),COLORRED;DRAWTEXT(起爆,L*0.95,'涨'),COLORRED;{红}STICKLINE(起爆,CLOSE,OPEN,3,0),COLOR000099;STICKLINE(起爆,CLOSE,OPEN,2.2,0),COLOR0000CC;STICKLINE(起爆,CLOSE,OPEN,1.5,0),COLOR0000FF;STICKLINE(起爆,CLOSE,OPEN,0.5,0),COLORCC66FF;STICKLINE(起爆,OPEN,CLOSE,0.5,0),COLORYELLOW;MACD:=(DIF-DEA)*2,COLORSTICK;TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,21))/(0.015*AVEDEV(TYP,21));DRAWICON(CROSS(MA2,MA3) AND MACD>=0 AND CCI>=100,MA2,1);DRAWTEXT(CROSS(MA2,MA3) AND MACD>=0 AND CCI>=100,L*0.95,'黑马')COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR,0.0,0,0,HYBLOCK),COLORCYAN;DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,DYBLOCK),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR,0.2,0,0,GNBLOCK),COLORGREEN;DRAWTEXT_FIX(ISLASTBAR,0.5,0,0,FGBLOCK),COLORWHITE;{MA2报警器K线图上变成蓝色,立马出局,别犹豫,切记};VAR1P:=ZIG(3,13);STICKLINE((REF(VAR1P,2) < REF(VAR1P,1)) AND (VAR1P < REF(VAR1P,1)),CLOSE,OPEN,3,0),COLORBLUE;DRAWICON(CROSS(REF(ZIG(3,12),1),ZIG(3,12)),HIGH*1.02,2);STICKLINE((REF(VAR1P,2) > REF(VAR1P,1)) AND (VAR1P >REF(VAR1P,1)),CLOSE,OPEN,3,0),COLORYELLOW;DRAWICON(CROSS(ZIG(3,10),REF(ZIG(3,10),1)),LOW*0.99,1);超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;DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;DRAWRECTREL(15,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(47,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));DRAWRECTREL(107,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(141,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0))); DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORMAGENTA; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORCYAN;DRAWBMP((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)),LOW*1.02,'BUY1');DRAWBMP((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)),HIGH*1.03,'SELL1');DRAWTEXT(CROSS(83,RSI),H*1.04,' 逃顶')COLORYELLOW;今日保护价:(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),COLORMAGENTA,DOTLINE; STICKLINE(CCI>=200 AND H>=顶点,O,C,3,0),COLORWHITE;STICKLINE(CCI<=100 AND L<=低点,O,C,3,0),COLORMAGENTA;DRAWTEXT(ISLASTBAR,顶点,'顶点'),COLORMAGENTA;DRAWTEXT(ISLASTBAR,低点,'低点'),COLORRED;{COLORWHITE;};{暴涨信号主图}VAR5A:=EMA(DCLOSE,12)-EMA(DCLOSE,26);VAR6A:=EMA(VAR5A,9);VAR7A:=(VAR5A-VAR6A)*2*60;VAR8A:=CROSS(VAR7A-REF(VAR7A,1),15);DRAWICON(VAR8A,LOW*1.09,25);空:=EMA(CLOSE,5);均衡:=EMA(空,0),COLORFFFFFF;下趋势双线持币:HHV(MA(HIGH,3),2),LINETHICK0,COLORGREEN;上趋势单线持股:LLV(MA(HIGH,3),1),LINETHICK0,COLORRED;VAR5:=FILTER(均衡>REF(均衡,1) AND 下趋势双线持币<REF(下趋势双线持币,1) AND CLOSE>REF(CLOSE,1),11);IF(VAR5>=1,L*0.996,DRAWNULL),COLORMAGENTA,CIRCLEDOT;B1:=REF(C,1);B2:=REF(C,2);SS:=IF(C>REF(C,1) AND REF(C,1)>=REF(C,2),1,IF(C<REF(C,1) ANDREF(C,1)<=REF(C,2),-1,IF(C>REF(C,2) AND REF(C,2)>REF(C,1),2,IF(C<REF(C,2) AND REF(C,2)<REF(C,1),-2,0))));VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3)/VAR3;VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;VAR7:=0;VAR8:=MA(HHV(CLOSE-REF(CLOSE,1),0),34)/MA(ABS(CLOSE-REF(CLOSE,1)),7)*100; VAR9:=MA(HHV(CLOSE-REF(CLOSE,1),0),13)/MA(ABS(CLOSE-REF(CLOSE,1)),13)*100; VARA:=BARSCOUNT(CLOSE);VARB:=VAR8<20 AND VAR9<23 AND VARA>35;VARC:=VARB AND COUNT(VARB,1)=1;VARD:=EMA(CLOSE,21)-EMA(CLOSE,8);VARE:=EMA(VARD,5);VARF:=TROUGH(3,6,1)<4 AND CROSS(VARD,VARE);VAR10:=IF(TROUGH(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),1) AND REF(ZIG(3,6),1)>=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),1) AND REF(ZIG(3,22),1)>=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),1) AND REF(ZIG(3,51),1)>=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),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);VAR1A:=EMA(VAR19,100);VAR1B:=2*(VAR19-VAR1A);VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1);VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));VAR1E:=EMA(VAR1D*0.97,3);VAR1F:=(HIGH+LOW+CLOSE)/3;VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));VAR21:=CROSS(VAR1E,LOW);买点1:=VAR10;买点2:=(VAR11+VAR13+VAR15+VAR17);卖点1:=(VAR12+VAR14+VAR16+VAR18),LINETHICK2;VAR22:=买点1 AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND VAR6=0 AND VAR20<(-110);DRAWTEXT(买点1>0,LOW+0.2,'买'),COLORRED;DRAWTEXT(买点2>0,LOW+0.2,'买'),COLORFF00FF;DRAWTEXT(卖点1>0,HIGH+0.1,'逃'), COLOR33FF33;黑马线:15,POINTDOT,COLORFFFFFF;主力:VAR7A-REF(VAR7A,1),COLORRED;DRAWICON(CROSS(主力,黑马线),黑马线,25);LING0:0,POINTDOT,COLOR0FFFFF;。
通达信指标公式源码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、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
源代码:
获利:EMA(EMA(EMA(高,5),5)*1.15,colorfffff,LINETHICK1;
风险:EMA(EMA(高,5),5)*1.1,颜色黄色;
回溯:EMA(均线(EMA(高,5),5),5)*1.05,COLOR00FF00;
平衡:EMA(EMA(EMA(高,5),5),COLORFF00FF,LINETHICK1;
反弹:均线(均线(均线(高,5),5)*0.95,灰线,线厚1;
超卖:均线(均线(均线,5),5)*0.9,颜色蓝,线厚1;
VAR3:=LLV(高,240);
VAR4:=100*(闭合VAR3)/VAR3;
VAR5:=(CLOSE-LLV(低,528))/(HHV(高,528)-LLV(低,528))*100;VAR6:=(CLOSE-LLV(关闭,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;变量7:=0;
VAR8:=SMA(最大(闭合参考(CLOSE-REF(闭合,1)),34,1)/SMA(ABS(闭合参考(CLOSE,1)),7,1)*100;
VAR9:=SMA(最大(闭合参考(CLOSE-REF(闭合,1)),0),13,1)/SMA(ABS(闭合参考(CLOSE,1)),13,1)*100;
VAR10:=IF(槽巴(3,16,1)=0且高>低+0.04,4,0);
VAR11:=ZIG(3,6)>参考(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)=参考(ZIG(3,6),2)和REF(ZIG(3,6),2)>=参考(ZIG(3,6),3);
VAR13:=ZIG(3,22)>参考(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)=参考(ZIG(3,22),2)和REF(ZIG(3,22),2)>=参考(ZIG (3,22),3);
VAR15:=ZIG(3,51)>参考(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)=参考(ZIG(3,51),2)和REF(ZIG(3,51),2)>=参考(ZIG (3,51),3);
VAR17:=ZIG(3,72)>参考(ZIG(3,72),1)和REF(ZIG(3,72),1)<=参考(ZIG (3,72),2)和REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)=参考(ZIG(3,72),2)和REF(ZIG(3,72),2)>=参考(ZIG (3,72),3);
VAR19:=EMA(关闭,2)-EMA(关闭,150);
买1:=VAR10;
购买2:=(VAR11+VAR13+VAR15+VAR17);
卖出1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(buy 1>0或buy 2>0,LOW*0.99,DRAWNULL),交叉点,LINETHICK3,COLORYELLOW;
S:IF(卖出1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
{丽都方舟}
VAR100:=(100-((90*(HHV(高,20)-关))/(HHV(高,20)-LLV(低,20)));
VAR200:=(100-((90*(HHV(高,20)-关闭))/(HHV(高,20)-LLV(低,20)));
VAR300:=(100-MA(((100*(HHV(高,5)-关))/(HHV(高,5)-LLV(低,5)),34));
F:IF(CROSS(VAR200,MA(VAR300,5)),低*0.98,DRAWNULL),交叉点,LINETHICK3;
股票公式交换分类:指数公式
索引说明
1摆动交易指标说明
源代码:
获利:EMA(EMA(EMA(高,5),5)*1.15,colorfffffff,linehick1;
风险:EMA(均线(EMA(高,5),5)*1.1,黄色;
返回值:EMA(EMA(EMA(EMA(高(5,5)),5)*1.05,color00ff00;
平衡:EMA(EMA(EMA(高,5),5),colorf00ff,linehigh1;
反弹:均线(均线(均线,5),5)*0.95,灰色,线高1;
超卖:均线(均线(均线,5),5)*0.9,蓝线,线高1;
VAR3:=LLV(高,240);
VAR4:=100*(闭合VAR3)/VAR3;
VAR5:=(CLOSE-LLV(低,528))/(HHV(高,528)-LLV(低,528))*100;
VAR6:=[CLOSE-LLV(关闭,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
变量7:=0;
VAR8:=SMA(最大(闭合参考(闭合,1)),34,1)/SMA(ABS(闭合参考(闭合,1)),7,1)*100;
VAR9:=SMA(最大(闭合参考(CLOSE-REF(闭合,1)),0),13,1)/SMA(ABS (闭合参考(CLOSE,1)),13,1)*100;
VAR10:=IF(槽巴(3,16,1)=0且高>低+0.04,4,0);
VAR11:=ZIG(3,6)>参考(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)=参考(ZIG(3,6),2)和REF(ZIG(3,6),2)>=参考(ZIG (3,6),3);
VAR13:=ZIG(3,22)>参考(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)=参考(ZIG(3,22),2)和REF(ZIG(3,22),2)>=参考(ZIG (3,22),3);
VAR15:=ZIG(3,51)>参考(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)=参考(ZIG(3,51),2)和REF(ZIG(3,51),2)>=参考(ZIG (3,51),3);
VAR17:=ZIG(3,72)>参考(ZIG(3,72),1)和REF(ZIG(3,72),1)<=参考(ZIG (3,72),2)和REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)=参考(ZIG(3,72),2)和REF(ZIG(3,72),2)>=参考(ZIG (3,72),3);
VAR19:=EMA(关闭,2)-EMA(关闭,150);
购买1:=var10;
购买2:=(var11+var13+var15+var17);
卖出1:=(var12+var14+var16+var18);
B:如果(买入1>0或买入2>0,低*0.99,做空),交叉点,行距3,颜色为黄色;
S:if(卖出1>0,高位*1.01,拉长),交叉点,linehigh3,绿色;
丽都方舟
VAR100:=(100-((90*(HHV(高,20)-关))/(HHV(高,20)-LLV(低,20)));
VAR200:=(100-((90*(HHV(高,20)-关闭))/(HHV(高,20)-LLV(低,20)));
VAR300:=(100-MA(((100*(HHV(高,5)-关))/(HHV(高,5)-LLV(低,5))),34);
F:IF(cross(VAR200,MA(VAR300,5)),低*0.98,DRAWNULL),交叉点,LINETHICK3;
说明:这个指标的未来是不可能的。
乍一看,他使用未来数据ZLG来描述一系列模式。
如果不使用ZLG函数,恐怕无法描述这种形态特征。
前六句的核心句子是:平衡:EMA(EMA(EMA(EMA(高,5)),5),colorf00ff,linehigh1;
这是一条基本线,用5天的时间形成三个嵌套循环。