通达信_指标公式源码大全
通达信副图指标公式源码大全
副图指标公式源码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。
通达信指标大全
通达信指标公式大全通达信指标公式大全分类:指标公式源码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 0 1 1短线5日:EMA(C,5),COLOR00FF00,LINETHICK1;红升5:IF(短线5日>REF(短线5日,1),短线5日,DRAWNULL),COLORFFFFFF,LINETHICK2; 绿降5:IF(短线5日<REF(短线5日,1),短线5日,DRAWNULL)DOTLINE,COLORFFFFFF,LINETHICK1;短线13日:EMA(C,13),COLOR00FF00,LINETHICK1;升:IF(短线13日>REF(短线13日,1),短线13日,DRAWNULL),COLOR00E8E8,LINETHICK2; 降:IF(短线13日<REF(短线13日,1),短线13日,DRAWNULL)DOTLINE,COLOR00FFFF,LINETHICK1;操作线21日:EMA(C,21),COLOR00FF00,LINETHICK1;红升:IF(操作线21日>REF(操作线21日,1),操作线21日,DRAWNULL),COLOR0000FF,LINETHICK3;绿降:IF(操作线21日<REF(操作线21日,1),操作线21日,DRAWNULL)DOTLINE,COLOR00FF00,LINETHICK3;生命线62日:EMA(C,62),COLORYELLOW,LINETHICK1,NODRAW;红升4:IF(生命线62日>REF(生命线62日,1),生命线62日,DRAWNULL),COLORFF00FF,LINETHICK2;绿降4:IF(生命线62日<REF(生命线62日,1),生命线62日,DRAWNULL),COLORFF00FF,DOTLINE;趋势线半年:EMA(C,120),COLORYELLOW,LINETHICK1,NODRAW;半年红升:IF(趋势线半年>REF(趋势线半年,1),趋势线半年,DRAWNULL)POINTDOT,COLOR0000BF,LINETHICK4;半年绿降:IF(趋势线半年<REF(趋势线半年,1),趋势线半年,DRAWNULL),COLOR0000BF,POINTDOT;年线:EMA(C,250),COLORYELLOW,LINETHICK1,NODRAW;年红升:IF(年线>REF(年线,1),年线,DRAWNULL),COLORFF0000,LINETHICK1;年绿降:IF(年线<REF(年线,1),年线,DRAWNULL),COLORFF0000,DOTLINE,LINETHICK1;R1:=(C+L+H)/3;R2:=EMA(R1,6);R3:=EMA(R2,5);N:=5;M1:=6;M2:=6;M3:=8;R:=IF(DATE<1910612,1,0);EE:=(H+MAX(C,O))/2;EE1:=MA(EE,3);EE2:=(L+MIN(C,O))/2;EE3:=MA(EE2,3);超短线3日:MA(EE,3),COLOR00FF00;红升1:IF(超短线3日>REF(超短线3日,1),超短线3日,DRAWNULL),COLOR8EB3FF,LINETHICK2;绿降1:IF(超短线3日<REF(超短线3日,1),超短线3日,DRAWNULL),COLOR8EB3FF,LINETHICK1,DOTLINE;FF:=(H+L+C+O)/4,COLORWHITE;FF1:=MA(FF,3),COLORGREEN;FF3:=REF((C+O)/2,1)>REF((C+O)/2,2) AND REF(MIN(C,O),1)>REF(MAX(C,O),2);实际乖离:=(MAX(FF,FF1)-MIN(FF,FF1))/MIN(FF,FF1)*100,LINETHICK;FF4:=(((FF1-(REF(FF1,1)-FF1))-L)/L)*100;FF5:=(((EE1+(EE1-REF(EE1,1)))-L)/L)*100;FF6:=FF1-(REF(FF1,1)-FF1);FF7:=EE1+(EE1-REF(EE1,1));期望获利率:=IF(FF3,FF5,FF4),LINETHICK;YY1:=REF(EVERY(C>=O,4),1) AND REF(EVERY((C+O)/2>FF1,4),1) AND (C+O)/2<FF1; YY2:=NOT(YY1) AND (FF1-O)/O*1000>5 AND O<REF(MIN(C,O),1);A:=SMA(L,4,3);B:=SMA(H,4,3);BB:=SMA(MIN(C,O),4,3);BB1:=REF(L,1)-HHV((MAX(REF(L,2),REF(L,1))-MIN(REF(L,2),REF(L,1))),2);BB2:=REF((C+O)/2,1)>REF((C+O)/2,2);BB3:=L<=BB1+BB1*0.01 AND O>REF(O,2) AND O>=REF(L,3) AND COUNT(C>O,7)>3; BB6:=(BB1-L)/L*100;BB7:=(REF(L,1)-BB1)/BB1*100;A1:=(A-L)/L>N/1000 ;A8:=A1;A9:=(REF(H,1)-O)/O*100-(REF(MAX(C,O),2)-REF(MAX(C,O),1))/REF(MAX(C,O),1)*100; A10:=IF(BB2,BB6,A9);BB4:=BB6+A10>2;BB5:=IF(BB2,BB3,BB4) AND 期望获利率>2;D5:=R AND A8 AND BB5;STICKLINE(D5,A*0.995,A*0.992,3,0)COLOR00FFFF;DRAWICON(R AND (REF((D5),1)) AND (L<REF((L/0.995),1)),L*0.97,23); STICKLINE(C>=O,C,O,3.4,0),COLOR0000AA;STICKLINE(C>=O,C,O,3.0,0),COLOR0000BB ;STICKLINE(C>=O,C,O,2.4,0),COLOR0000CC;STICKLINE(C>=O,C,O,2.0,0),COLOR0000DD ;STICKLINE(C>=O,C,O,1.6,0),COLOR0000EE;STICKLINE(C>=O,C,O,1.2,0),COLOR0000FF;STICKLINE(C>=O,C,O,0.6,0),COLOR0000FF;STICKLINE(C>=O,H,L,0,0),COLORRED;STICKLINE(C<=O,C,O,3.4,0),COLORAAAA00;STICKLINE(C<=O,C,O,3.0,0),COLORBBBB00;STICKLINE(C<=O,C,O,2.4,0),COLORCCCC00;STICKLINE(C<=O,C,O,2.0,0),COLORDDDD00;STICKLINE(C<=O,C,O,1.6,0),COLOREEEE00;STICKLINE(C<=O,C,O,1.2,0),COLORFFFF00;STICKLINE(C<=O,C,O,0.6,0),COLORFFFF00;STICKLINE(C<=O,H,L,0,0),COLORFFFF00;{===================================================== =}范围高A:=REFDATE(HHV(H,120),DATE)*1.05;范围低A:=REFDATE(LLV(L,120),DATE)*0.95;MA5:=MA(C,5),COLORCYAN,LINETHICK2;MA24:=MA(C,24),COLORGREEN,LINETHICK2;MA72:=MA(C,72),COLORRED,LINETHICK2;MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) ORC>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2;{=======================仪表盘=========================} 主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 ANDMA72>IF(MA200=DRAWNULL,0,MA200);主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 ANDMA72>IF(MA200=DRAWNULL,0,MA200);主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 ANDMA5>IF(MA200=DRAWNULL,0,MA200);初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 ANDMA72>MA24 AND MA5>MA24;探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 ANDMA72>MA24 AND MA24>MA5;观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 ANDC>=MA72,MA72<MA200 AND C>=MA200);放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0)COLOR00BF00;DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0)COLORFF00FF;DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0)COLORFF8080; DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0)COLOR009500; DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0)COLORFFFF00; DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0)COLORFFFF00;DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0)COLOR00BF00;引差:=REF(C,1)-LOW,LINETHICK1,NODRAW;引跌幅:IF((REF(C,1)-LOW)/REF(C,1)*100>0,(REF(C,1)-LOW)/REF(C,1)*100,0),LINETHICK1,N ODRAW;三日均跌:MA(引跌幅,3),COLORWHITE,NODRAW;今最高:HIGH,LINETHICK1,COLORRED,NODRAW;今最低:LOW,LINETHICK1,COLORGREEN,NODRAW;Z0T:=C/REF(C,1)>1.097;XH:=FILTER(Z0T,13);BH:=BARSLAST(Z0T);CZ:=REF(H,BH)-REF(L,BH);STICKLINE(Z0T,REF(O,BH),REF(C,BH),5,0),COLORYELLOW;DRAWTEXT(Z0T,L*0.98,'★涨停'),COLORFFFFFF;AAA:=CONST(HHV(H,50));PL5:=HHV(H,45);F:=100*(C-REF(C,1))/REF(C,1);博尔:=IF(C<REF(O,1) AND F<0,1,0);P1:=博尔;量化:=IF(C<REF(O,2) AND F<0,1,0);P2:=量化;STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 ANDREF(P2,1)=1,OPEN,CLOSE,3,0),COLORFF09FF;ME2:=EMA(CLOSE,6);五天:=EXPMA(CLOSE,5),COLORRED;超短线:=EMA(ME2,11),COLORGREEN; LJL07:=(3*C+L+O+H)/6;牛线:=(20*LJL07+19*REF(LJL07,1)+18*REF(LJL07,2)+17*REF(LJL07,3)+16*REF(LJL07,4) +15*REF(LJL07,5)+14*REF(LJL07,6)+13*REF(LJL07,7)+12*REF(LJL07,8)+11*REF(LJL0 7,9)+10*REF(LJL07,10)+9*REF(LJL07,11)+8*REF(LJL07,12)+7*REF(LJL07,13)+6*REF(L JL07,14)+5*REF(LJL07,15)+4*REF(LJL07,16)+3*REF(LJL07,17)+2*REF(LJL07,18)+REF( LJL07,20))/210,COLORRED;熊线:=MA(牛线,5),COLORYELLOW,LINETHICK4,POINTDOT;持股:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,COLORWHITE; {趋势}赚了:=IF(EMA(CLOSE,3)>超短线,超短线,DRAWNULL),COLORRED;持股角度:=ATAN((持股/REF(持股,1)-1)*100)*180/3.1416,COLORRED,NODRAW;月线:=EMA(持股,30),COLORYELLOW,DOTLINE;双月线:=EMA(持股,60),COLORCYAN,DOTLINE;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI">"DMI.MDI") ANDUPNDAY("DMI.ADXR",1) AND ("DMI.ADX">"DMI.ADXR"),0.460,0.26,0,'DMI 火箭升空'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI"<"DMI.MDI") ANDUPNDAY("DMI.ADXR",1) AND ("DMI.ADX">"DMI.ADXR"),0.460,0.26,0,'DMI 空中炸弹'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI">"DMI.MDI"),0.460,0.21,0,'DMI 多头趋势'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("DMI.PDI"<"DMI.MDI"),0.460,0.21,0,'DMI 空头趋势'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS("KDJ.J","KDJ.K"),0.460,0.31,0,'K D J 金叉'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS("KDJ.K","KDJ.J"),0.460,0.31,0,'K D J死叉'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("KDJ.J">"KDJ.K"),0.460,0.36,0,'K D J 多头趋势'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("KDJ.J"<"KDJ.K"),0.460,0.36,0,'K D J 空头趋势'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.DIF">"MACD.DEA") AND "MACD.MACD">0,0.460,0.41,0,'MACD 中线看多'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.DIF"<"MACD.DEA") AND "MACD.MACD"<0,0.460,0.41,0,'MACD 中线看空'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND("MACD.DIF">"MACD.DEA"),0.460,0.46,0,'MACD 多头趋势'),COLOR8080FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND("MACD.DIF"<"MACD.DEA"),0.460,0.46,0,'MACD 空头趋势'),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDCROSS("MACD.DIF","MACD.DEA"),0.460,0.51,0,'MACD 金叉'),COLOR8080FF; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDCROSS("MACD.DEA","MACD.DIF"),0.460,0.51,0,'MACD 死叉'),COLORGREEN;上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 上涨,0.460,0.15,0,'上涨趋势'),COLORFF00FF;短线上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);短线上涨0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);短线上涨1:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线上涨OR 短线上涨0 OR 短线上涨1),0.460,0.15,0,'短线上涨'),COLOR8080FF;短线回调:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);短线回调0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线回调OR 短线回调0),0.460,0.15,0,'短线回调'),COLORYELLOW;短线看空:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);短线看空0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1)AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);短线空仓:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);短线空仓0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线空仓OR 短线空仓0 OR 短线看空OR 短线看空0),0.460,0.15,0,'短线空仓'),COLORYELLOW;短线震荡:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);短线震荡0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);短线震荡1:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);注意该股:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线震荡OR 短线震荡0 OR 短线震荡1 OR 注意该股),0.460,0.15,0,'短线震荡'),COLORYELLOW;短线反弹:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);短线反弹0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线反弹OR 短线反弹0),0.460,0.15,0,'短线反弹'),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ,0.360,0.09,0,'★---今日操作提示---★')COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.MACD">0) AND(CROSS("MACD.DIF","MACD.DEA") OR CROSS(持股,超短线)) AND UPNDAY(超短线,1),0.55,0.09,0,' 决策:中线全仓买入'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.MACD"<0) AND(CROSS("MACD.DEA","MACD.DIF") OR CROSS(超短线,持股)) AND DOWNNDAY(超短线,1),0.55,0.09,0,' 决策:中线空仓'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1),0.55,0.09,0,' 决策:短线空(减) 仓【关注:阴线买、V 转、止跌买信号】'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1),0.55,0.09,0,' 决策:短线买入30 %'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(超短线,1) AND UPNDAY(持股,1),0.55,0.09,0,' 决策:短线买入60 %'),COLOR95B8FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1),0.55,0.09,0,' 决策:短线震荡看看再说【关注:阴线买信号】'),COLOR95B8FF;DRAWICON(CROSS(MA(C,3),C),H,15);DRAWTEXT_FIX(ISLASTBAR,0.1,0.05,0,HYBLOCK)COLOR80FFFF;DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,DYBLOCK)COLOR80FFFF;DRAWTEXT_FIX(ISLASTBAR,0.55,0.85,0,GNBLOCK)COLOR80FFFF;DRAWTEXT_FIX(ISLASTBAR,0.55,0.90,0,FGBLOCK)COLOR80FFFF;DRAWTEXT_FIX(ISLASTBAR,0.55,0.95,0,ZSBLOCK)COLOR80FFFF;止损:=REF(HHV(H,13),1)*0.95,COLORGRAY,DOTLINE;STICKLINE(CURRBARSCOUNT=1,止损,止损,40,-1),COLORGREEN;DRAWTEXT(CURRBARSCOUNT=1,止损*0.995,'破止损'),COLORFFFF00;MAA10:=MA(CLOSE,10),COLORYELLOW,LINETHICK0;MAA54:=MA(CLOSE,54),COLORFFCCCC,LINETHICK0;PL1:=(((CLOSE - MAA54) / MAA54) < 0.1);PL2:=(((CLOSE - MAA10) / MAA10) < 0.3); 偏离率:=(((PL1 = 1) AND (PL2 = 1)) * 0.2);突破加仓:=((((偏离率= 0) AND (REF(偏离率,1) = 0.2)) AND (REF((COUNT((偏离率= 0.2),10) = 10),1) = 1)) * 1);DRAWTEXT(突破加仓,L,'----------突破加仓'),COLORFFFFFF;。
通达信_指标公式源码大全
通达信_指标公式源码大全通达信是国内最早的股票行情软件之一,其强大的技术分析指标系统是其最大的特点之一、通达信的指标公式源码可以帮助广大投资者深入理解和研究不同的技术指标,并且根据自己的需求进行二次开发。
以下是通达信中一些常用指标的简要介绍和其对应的指标公式源码: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)需要注意的是,在使用这些源码时,要理解每个指标的具体计算过程和意义,以及与股票行情数据之间的关系。
同时,根据自身的需求进行适当的修改和优化,以满足个人的投资研究需求。
通达信指标公式源码 阳包阴副图选股指标
A1:=(REF(C,2)-REF(C,1))/REF(C,2)*100>3;A2:= REF(C,0) > REF(O,1) ;A3:= REF(C,0) > REF(C,1) ;A4:= REF(H,0) > REF(H,1) ;A5:= (C-REF(C,1))/REF(C,1)*100>3;阳包阴1:= A1 AND A2 AND A3 AND A4 AND A5;B1:=(REF(C,2)-REF(C,1))/REF(C,2)*100>4;B2:= REF(C,0) > REF(O,1) ;B3:= REF(C,0) > REF(C,1) ;B4:= REF(H,0) > REF(H,1) ;B5:= (C-REF(C,1))/REF(C,1)*100>5;B6:=V-REF(V,1)<0;B7:=REF(V,2)-REF(V,1)>0;B8:=(H-L)/REF(C,1)*100>5;缩量阳包阴2:= B1 AND B2 AND B3 AND B4 AND B5 AND B6 AND B7 AND B8; C1:=(REF(C,2)-REF(C,1))/REF(C,2)*100>3;{好}C2:= REF(O,0)<REF(L,1);C3:= REF(C,0) > REF(O,1) ;C4:= REF(C,0) > REF(C,1) ;C5:= REF(H,0) > REF(H,1) ;下跳空阳包阴3:= C1 AND C2 AND C3 AND C4 AND C5;D1:=(REF(C,3)-REF(C,2))/REF(C,3)*100>5;D2:= REF(C,1) >= REF(O,1) AND REF(C,1)< REF(O,2);D3:= REF(C,0) > REF(O,0) AND REF(C,0)>REF(C,3);两阳接力包大阴4:(D1 AND D2 AND D3)*100;E1:= REF(C,2) < REF(O,2) AND REF(C,1) <= REF(O,1);E2:=(REF(C,3)-REF(C,1))/ REF(C,3)*100>5;E3:= REF(C,0) > REF(O,0) AND REF(C,0)>REF(C,3);E4:= REF(C,3) > REF(O,3);大阳包二阴5:( E1 AND E2 AND E3 AND E4)*100;阳包阴:(阳包阴1 OR 缩量阳包阴2 OR 下跳空阳包阴3 OR 两阳接力包大阴4 OR 大阳包二阴5)*100,COLOR00FF00,LINETHICK2;DRAWTEXT(阳包阴,80,'★买'),COLOR00FF00;DRAWTEXT(阳包阴,10,'阳包阴'),COLOR00FF00;。
通达信指标公式源码大全
通达信指标公式源码大全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。
通达信指标公式源码 操盘主图源码
A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1:=(D2 AND NOT(D1 AND E1<E2));H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);短期压力:DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORRED;短期支撑:DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORGREEN;MA5:MA(CLOSE,M1),COLORWHITE;MA10:MA(CLOSE,M2),COLORYELLOW;MA30:MA(CLOSE,M3),COLORMAGENTA;MA60:MA(CLOSE,M4),COLORBLUE;VAR30:MA(C,30),COLORRED;上升:IF(VAR30>REF(VAR30,1),VAR30,DRAWNULL),COLORRED,LINETHICK2; 下降:IF(VAR30<REF(VAR30,1),VAR30,DRAWNULL),COLORGREEN,LINETHICK2; BU:=CROSS(HIGH,SAR(3,1,20));SEL:=CROSS(SAR(3,1,20),LOW);DRAWTEXT(BU,LOW,'B'),COLORYELLOW,LINETHICK6;DRAWTEXT(SEL,1.01*HIGH,'S'),COLORGREEN,LINETHICK6;HH:=CONST(HHV(H,160));LL:=CONST(LLV(L,160));{160可改成你习惯锁定的日K线数}HL1:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.76,0.04)); HL2:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.80,0.08)); HL3:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.84,0.12)); HL4:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.88,0.16)); HL5:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.92,0.20)); HL6:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.96,0.24)); DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR0080FF;DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR0080FF;DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;DRAWTEXT_FIX(1,0.00,0.04,0,'主题投资:')COLOR0000FF;DRAWTEXT_FIX(1,0.07,0.04,0,EXTERNSTR(0,1))COLOR0000FF; {生成数据时第1项输1与这里1一致,描述部分输"主题投资"}DRAWTEXT_FIX(1,0.00,0.08,0,'主营业务:')COLORFF00FF;DRAWTEXT_FIX(1,0.07,0.08,0,EXTERNSTR(0,2))COLORFF00FF; {生成数据时第1项输2与这里2一致,描述部分输"主营业务"}DRAWTEXT_FIX(1,0.00,0.12,0,'出千概念:')COLORFF88FF;DRAWTEXT_FIX(1,0.07,0.12,0,EXTERNSTR(0,3))COLORFF88FF; {生成数据时第1项输3与这里3一致,描述部分输"出千概念"}DRAWTEXT_FIX (1,0.80,HL1,0,'股本:');DRAWNUMBER_FIX(1,0.84,HL1,0,CONST(FINANCE(1)/100000000)); DRAWTEXT_FIX (1,0.80,HL2,0,'流通:');DRAWNUMBER_FIX(1,0.84,HL2,0,CONST(FINANCE(7)/100000000)); DRAWTEXT_FIX (1,0.80,HL3,0,'动PE:');DRAWNUMBER_FIX(1,0.84,HL3,0,CONST(DYNAINFO(39)));DRAWTEXT_FIX (1,0.80,HL4,0,'换手:');DRAWNUMBER_FIX(1,0.84,HL4,0,CONST(DYNAINFO(37)*100)); DRAWTEXT_FIX (1,0.80,HL5,0,'量比:');DRAWNUMBER_FIX(1,0.84,HL5,0,CONST(DYNAINFO(17))); DRAWTEXT_FIX (1,0.80,HL6,0,'涨幅:');DRAWNUMBER_FIX(1,0.84,HL6,0,CONST(DYNAINFO(14)*100)),COLORFF00F F;DRAWNUMBER_FIX(1,0.84,HL6,0,IF(CONST(DYNAINFO(14)*100)<0,CONST( DYNAINFO(14)*100),DRAWNULL))COLOR00FF00;。
实战分析思路通达信指标公式源码
实战分析思路通达信指标公式源码通达信是中国股市中使用较为广泛的一种技术分析软件。
该软件提供了丰富的指标工具,包括均线、MACD、KDJ等等。
对于想要实战分析的投资者,了解这些指标的计算公式是非常重要的。
下面将介绍一些常用指标的计算公式和通达信源码。
1.均线(MA)指标的计算公式如下:MA(n)=(C1+C2+…+Cn)/n其中,MA(n)表示平均线的值,C1、C2、Cn分别表示n个周期内的收盘价。
通达信源码如下:_MA:MA(CLOSE,N);上述代码表示计算周期为N的收盘价的均线。
2.MACD指标的计算公式如下:DIFF = EMA(short) - EMA(long)DEA=EMA(DIFF,M)MACD=(DIFF-DEA)*2其中,EMA表示指数移动平均线,DIFF表示快线与慢线的差值,DEA 为DIFF的M周期指数移动平均,MACD为DIFF与DEA的差值的两倍。
通达信源码如下:_DIFF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);_DEA:EMA(_DIFF,M);_MACD:(_DIFF-_DEA)*2;上述代码表示计算DIFF、DEA和MACD三个指标。
3.KDJ指标的计算公式如下:RSV=(CLOSE-LOWEST(CLOSE,N))/(HIGHEST(CLOSE,N)-LOWEST(CLOSE,N))*100K=(1-a)*PREV.K+a*RSVD=(1-a)*PREV.D+a*KJ=3*K-2*D其中,RSV表示未成熟随机值,K、D、J分别表示K、D、J三条曲线的值,N为周期,a为平滑因子。
通达信源码如下:_RSV:(CLOSE-LOWEST(CLOSE,N))/(HIGHEST(CLOSE,N)-LOWEST(CLOSE,N))*100;_k1:(1-a)*REF(_k1,1)+a*_RSV;_d1:(1-a)*REF(_d1,1)+a*_k1;_j1:3*_k1-2*_d1;上述代码表示计算RSV、K、D和J四个指标。
通达信指标公式实现源码大全
通达信指标公式实现源码大全本文档收集了一些通达信指标公式的实现源码,供使用通达信软件的用户参考。
以下是一些常用指标的代码示例: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)以上是一些通达信指标的代码实现,你可以根据自己的需求进行参数调整和逻辑优化。
通达信 指标公式源码大全
【通达信】魔鬼操盘(主图)-指标公式源码均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;。
通达信公式指标源码涨跌尺指标公式
通达信涨跌尺指标公式{涨幅:-30,30,3。
TP转换PW:0,1,1。
}移动线:IF(LLVBARS(V,5), REF (C,LLVBARS(V,5)),C),COLORGREEN,DOTLINE; TP线:PEAK(移动线,0.2,1),COLORLIRED,NODRAW;STICKLINE(TP线>0 ,TP线,TP线,4,-1),COLORLIRED;PW线:TROUGH(移动线,0.2,1),COLORCYAN,NODRAW;STICKLINE(PW线>0 ,PW线,PW线,4,-1),COLORCYAN;PW:=CONST(PW线);TP:=CONST(TP线);ZH:=IF(TP转换PW=1,PW,TP);最低:=TROUGHBARS(移动线,0.2,1);幅度:=1+(涨幅/100);涨幅尺%:DRAWLINE(最低=0,ZH*幅度,ISLASTBAR,ZH*幅度,1),COLOR00BBFF; DRAWTEXT(ISLASTBAR,涨幅尺%,'涨幅尺'),COLOR00BBFF;SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));量能饱和:=IF(SAT>1,1,SAT)*100,NODRAW;获利筹码:=WINNER(C)*100,NODRAW;LC:=REF(CLOSE,1);RSI值:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;活跃:=(RSI值-WR10);活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2)),NODRAW; DRAWRECTREL(80,10,240,60,RGB(0,75,200));DRAWRECTREL(80,10,160,60,RGB(0,100,0));DRAWRECTREL(80,10,80+CONST(活跃度比*160/100),60,RGB(200,0,50)); DRAWTEXT_FIX(1,0.00,0.01,0,STRCAT(STRCAT('活跃度比:',CON2STR(活跃度比,2)),'%')),COLORYELLOW;DRAWRECTREL(80,70,240,120,RGB(0,75,200));DRAWRECTREL(80,70,160,120,RGB(0,100,0));DRAWRECTREL(80,70,80+CONST(获利筹码*160/100),120,RGB(200,0,50)); DRAWTEXT_FIX(1,0.00,0.07,0,STRCAT(STRCAT('获利筹码:',CON2STR(获利筹码,2)),'%')),COLORYELLOW;DRAWRECTREL(80,130,240,180,RGB(0,75,200));DRAWRECTREL(80,130,160,180,RGB(0,100,0));DRAWRECTREL(80,130,80+CONST(量能饱和*160/100),180,RGB(200,0,50)); DRAWTEXT_FIX(1,0.00,0.13,0,STRCAT(STRCAT('量能饱和:',CON2STR(量能饱和,2)),'%')),COLORYELLOW;N:=27;{预测当天最低价公式}A1:=REF(O,1);A2:=ABS((REF(C,1)-A1)/A1);A3:=ABS((REF(H,1)-A1)/A1);A4:=ABS((REF(L,1)-A1)/A1);B1:=ABS((A2+A3+A4)/3);B2:=O*B1;预测低一:=O-B2;预测高一:=O+B2;开盘价1:=OPEN;开盘价2:=REF(OPEN,1);最高价1:=HIGH;最高价2:=REF(HIGH,1);最低价1:=LOW;最低价2:=REF(LOW,1);收盘价1:=CLOSE;收盘价2:=REF(CLOSE,1);AA:=最高价2;BB:=最低价2;CC:=开盘价2;DD:=收盘价2;EE:=(AA+BB+CC+2*DD)/5;AAA:=EE+(AA-BB);BBB:=2*EE-BB;CCC:=2*EE-AA;DDD:=EE-(AA-BB);上升突破价:=AAA;上升阻力价:=BBB;下跌支撑价:=CCC;下跌反转价:=DDD;EEE:=(EE+上升突破价+上升阻力价+下跌支撑价+下跌反转价)/5;心理价:=EEE;FFF:=(EEE+开盘价1)/2;GGG:=(预测低一+FFF)/2;预测低二:=GGG;预测高二:=MA(REF(HIGH,1)/REF(CLOSE,2),N)*REF(CLOSE,1);买回价:=预测低二*1.015;卖出价:=买回价*(1+0.03);DRAWTEXT_FIX(1,0.085,0.21,1,'买回价格:'),COLOR8080FF; DRAWNUMBER_FIX(1,0.15,0.21,1,CONST(买回价)),COLOR8080FF; DRAWTEXT_FIX(1,0.17.5,0.21,1,'元'),COLOR8080FF,LINETHICK1; DRAWTEXT_FIX(1,0.085,0.25,1,'预测低一:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.15,0.25,1,CONST(预测低一)),COLORYELLOW; DRAWTEXT_FIX(1,0.17,0.25,1,'元'),COLORYELLOW,LINETHICK1; DRAWTEXT_FIX(1,0.085,0.29,1,'预测低二:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.15,0.29,1,CONST(预测低二)),COLORYELLOW; DRAWTEXT_FIX(1,0.17,0.29,1,'元'),COLORYELLOW,LINETHICK1;DRAWTEXT_FIX(1,0.085,0.33,1,'卖出价格:'),COLOR8080FF; DRAWNUMBER_FIX(1,0.15,0.33,1,CONST(卖出价)),COLOR8080FF; DRAWTEXT_FIX(1,0.17,0.33,1,'元'),COLOR8080FF,LINETHICK1; DRAWTEXT_FIX(1,0.085,0.37,1,'预测高一:'),COLORFFFFFF; DRAWNUMBER_FIX(1,0.15,0.37,1,CONST(预测高一)),COLORFFFFFF; DRAWTEXT_FIX(1,0.17,0.37,1,'元'),COLORFFFFFF,LINETHICK1; DRAWTEXT_FIX(1,0.085,0.41,1,'预测高二:'),COLORFFFFFF; DRAWNUMBER_FIX(1,0.15,0.41,1,CONST(预测高二)),COLORFFFFFF; DRAWTEXT_FIX(1,0.17,0.41,1,'元'),COLORFFFFFF,LINETHICK1;红色雷达:IF(CLOSE>SAR(4,2,20),SAR(4,2,20),DRAWNULL),COLORRED,CIRCLEDOT; 绿色雷达:IF(CLOSE<=SAR(4,2,20),SAR(4,2,20),DRAWNULL),COLORGREEN,CIRCLED OT;。
通达信指标公式源码 自动画线主图指标公式
N1:=10;N2:=10;DISP:=2;K:=IF(PERIOD=5,1,{日}IF(PERIOD=6,1,{周}IF(PERIOD=7,1,{月}IF(PERIOD=8,1,{多分钟}IF(PERIOD=9,1,{多日}IF(PERIOD=10,1,{季}IF(PERIOD=11,2,{年}IF(PERIOD=4,1,{60F}IF(PERIOD=3,1,{30F}IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10;P1:=PEAK(1,K*N1,1);P2:=PEAK(1,K*N1,2);WP1:=PEAKBARS(1,K*N1,1);WP2:=PEAKBARS(1,K*N1,2);T1:=TROUGH(2,K*N2,1);T2:=TROUGH(2,K*N2,2);WT1:=TROUGHBARS(2,K*N2,1);WT2:=TROUGHBARS(2,K*N2,2);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4 ),1));TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA; DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;中枢高:=PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED; 中枢低:=PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGRE EN;{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;} 趋势高:=PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;趋势低:=PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0); 局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0); 缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0); 距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0); 高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0); 低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) ORREF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;{大折线}A1:=REF(HIGH,10)=HHV(HIGH,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);D1:=FILTER(C1,10);{高点}A2:=REF(LOW,10)=LLV(LOW,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);D2:=FILTER(C2,10);{低点}E1:=(REF(LLV(LOW,2*10),1)+REF(HHV(HIGH,2*10),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;L1:=(D2 AND NOT((D1 AND E1<E2)));H2:=D1 AND NOT((D2 AND E1>=E2));X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1)); G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORMAGENTA,DOTLINE,LINETHICK1; DRAWLINE(HD,H,LD,L,0),COLORMAGENTA,DOTLINE,LINETHICK1;J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BARSLAST(LD),H,L ),0),COLORWHITE,LINETHICK1;{趋势线}UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);DRAWLINE(XX,L,VV,L,1),COLORRED,LINETHICK2;UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);DRAWLINE(XX2,H,VV2,H,1),COLORGREEN,LINETHICK2;。
通达信指标公式源码大全
通达信指标公式源码大全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%以上超级指标精准买卖绝世指标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;。
通达信公式大全
{MACD、KDJ、RSI底背离}DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,9);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));底背离:B1>0 OR B2>0 OR B3>0;{集成了MACD、KDJ、RSI三个指标的底背离};老鼠仓AA1:=AMOUNT/VOL;BB1:=L< AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100> 1.2;DD1:=L< MA(C,5)*0.921;EE1:=VOL< MA(V,5)*1.5;老鼠仓:BB1 AND CC1 AND DD1 AND EE1;抄底高手{M 15 35 30N 12 32 27D 18 50 42}V AR1:=(CLOSE-MA(CLOSE,48))/MA(CLOSE,48)*100+M<0;V AR2:=(CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100+N<0;V AR3:=V AR1 AND V AR2;V AR4:=V AR1 AND V AR2 AND COUNT(V AR3,2)=1 AND DA TE>940101 AND (CLOSE>OPEN OR CLOSE<OPEN) AND (OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.07 AND (REF(OPEN,1)>REF(CLOSE,1) OR REF(OPEN,1)<REF(CLOSE,1)) AND(REF(OPEN,2)>REF(CLOSE,2) OR REF(OPEN,2)<REF(CLOSE,2)) AND (REF(OPEN,3)>REF(CLOSE,3) OR REF(OPEN,3)<REF(CLOSE,3)) AND (REF(OPEN,4)>REF(CLOSE,4) OR REF(OPEN,4)<REF(CLOSE,4)) AND (REF(OPEN,5)>REF(CLOSE,5) OR REF(OPEN,5)<REF(CLOSE,5));V AR5:=DMA(EMA(CLOSE,8),SUM(VOL,9)/2.8/CAPITAL);V AR6:=(CLOSE-V AR5)/V AR5*100;V AR7:=REF(VAR6,1)+D<0 AND V AR6>REF(V AR6,1) AND REF(VAR6,1)<REF(VAR6,2) AND V AR6-REF(V AR6,1)>1.8 AND (HIGH>LOW) AND (REF(HIGH,1)>REF(LOW,1)) AND (REF(HIGH,2)>REF(LOW,2)) AND (REF(HIGH,3)>REF(LOW,3)) AND (REF(HIGH,4)>REF(LOW,4)) AND (REF(HIGH,5)>REF(LOW,5));V AR4 OR V AR7;短线黑马{K 100 140 100}V AR1:=DMA(CLOSE,VOL/MA(VOL,4)/4);V AR2:=DMA(CLOSE,VOL/MA(VOL,33)/33);V AR3:=(CLOSE-V AR1)/V AR1*100<-11/K*100;V AR4:=(V AR1-VAR2)/V AR2*100<-22.3/K*100;V AR5:=V AR3 AND V AR4 AND (OPEN>CLOSE OR OPEN<CLOSE) AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.07 AND(REF(CLOSE,1)>REF(OPEN,1) OR REF(CLOSE,1)<REF(OPEN,1)) AND(REF(OPEN,2)>REF(CLOSE,2) OR REF(OPEN,2)<REF(CLOSE,2)) AND (REF(OPEN,3)>REF(CLOSE,3) OR REF(OPEN,3)<REF(CLOSE,3)) AND (REF(OPEN,4)>REF(CLOSE,4) OR REF(OPEN,4)<REF(CLOSE,4)) AND (REF(OPEN,5)>REF(CLOSE,5) OR REF(OPEN,5)<REF(CLOSE,5)) AND (REF(OPEN,6)>REF(CLOSE,6) OR REF(OPEN,6)<REF(CLOSE,6)) AND (REF(OPEN,7)>REF(CLOSE,7) OR REF(OPEN,7)<REF(CLOSE,7));V AR6:=DMA(CLOSE,VOL/MA(VOL,3)/3);V AR7:=DMA(CLOSE,VOL/MA(VOL,33)/33);V AR8:=(CLOSE-V AR6)/V AR6*100<-5;V AR9:=(V AR6-VAR7)/V AR7*100<-18;V ARA:=(INDEXC-LLV(INDEXL,250))/(HHV(INDEXH,250)-LLV(INDEXL,250))*100;V ARB:=SMA(V ARA,30,1);V ARC:=SMA(V ARB,50,1);V ARD:=V AR8 AND VAR9 AND (OPEN>CLOSE OR OPEN<CLOSE) AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.05 AND(REF(CLOSE,1)>REF(OPEN,1) OR REF(CLOSE,1)<REF(OPEN,1));V ARE:=V ARD AND COUNT(V ARD,2)=1 ;V AR5 OR V ARE;逆势操作V AR1:=DMA(CLOSE,VOL/MA(VOL,4)/4);V AR2:=DMA(CLOSE,VOL/MA(VOL,32)/32);V AR3:=(CLOSE-V AR1)/V AR1*100<-8;V AR4:=(V AR1-V AR2)/V AR2*100<-21;V AR5:=V AR3 AND V AR4 AND (OPEN>CLOSE OR OPEN<CLOSE) AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.05 AND(REF(CLOSE,1)>REF(OPEN,1) OR REF(CLOSE,1)<REF(OPEN,1)) AND (REF(OPEN,2)>REF(CLOSE,2) OR REF(OPEN,2)<REF(CLOSE,2)) AND (REF(OPEN,3)>REF(CLOSE,3) OR REF(OPEN,3)<REF(CLOSE,3)) AND (REF(OPEN,4)>REF(CLOSE,4) OR REF(OPEN,4)<REF(CLOSE,4)) AND (REF(OPEN,5)>REF(CLOSE,5) OR REF(OPEN,5)<REF(CLOSE,5)) AND (REF(OPEN,6)>REF(CLOSE,6) OR REF(OPEN,6)<REF(CLOSE,6)) AND (REF(OPEN,7)>REF(CLOSE,7) OR REF(OPEN,7)<REF(CLOSE,7));V AR6:=(CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100<-23;V AR7:=(INDEXC-LLV(INDEXL,275))/(HHV(INDEXH,275)-LLV(INDEXL,275))*100;V AR8:=SMA(V AR7,50,1);V AR9:=SMA(V AR8,40,1);V ARA:=V AR6 AND V AR9<23 AND COUNT(V AR6,2)=1 AND (OPEN>CLOSE OR OPEN<CLOSE) AND OPEN/REF(CLOSE,1)>0.96 ;(V AR5 OR V ARA) ;成交量变异率VR买入WVR := SUM((IF(CLOSE>OPEN,VOL,0)+IF(CLOSE=OPEN,VOL/2,0)),N)/SUM((IF(CLOSE<OPEN,V OL,0)+IF(CLOSE=OPEN,VOL/2,0)),26)*100;VOL变异率VR买入:CROSS(LL,WVR);{N 5 100 26 5}{LL 0 80 70 5};MA5:=MA(C,5);MA10:=MA(C,10);MA20:=MA(C,20);MA30:=MA(C,30);MA120:=SMA(C,120,1);ZH520:=ABS(MA5-MA20)/MA20*100<=10;ZH530:=ABS(MA5-MA30)/MA30*100<=10;QSXS1:=MA5>REF(MA5,1);QSXS2:=MA20>REF(MA20,1);QSXS3:=MA30>REF(MA30,1);DTPL:=MA20>MA30 AND MA30>MA120;L YT:=DTPL AND QSXS2 AND QSXS3 AND COUNT(QSXS1,4)<=1;GJHS:=C>MA5 AND ((QSXS1 AND NOT(REF(QSXS1,1))) OR C>REF(C,3));L YKK:=GJHS AND (ZH520 OR ZH530) AND L YT;买:L YKK AND NOT(REF(LYKK,1));虚拟成交量>昨日VOL的2倍的股VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL); 昨日VOL:=REF(VOL,1)*2.0;ABS(VVOL)-昨日VOL>=0;{大于昨日的2.0倍};成交量是昨日的1.8倍VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL); 昨日VOL:=REF(VOL,1)*1.8;ABS(VVOL)-昨日VOL>=0;{大于昨日的1.8倍};PDI上穿三线选股公式源码:TR0:= SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),1 4);HD := HIGH-REF(HIGH,1);LD := REF(LOW,1)-LOW;DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),14);DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);PDI:=DMP*100/TR0,colorred;MDI:=DMM*100/TR0;ADX:=MA(ABS(MDI-PDI)/(MDI+PDI)*100,6);ADXR:=(ADX+REF(ADX,6))/2;CROSS(PDI,MDI) AND CROSS(PDI,ADX) AND CROSS(PDI,ADXR)今日量比昨放大1倍后三日股价不跌回当日收盘价的选股公式选股公式:{成交量比前一天放大1倍,后3天,股价没有跌破放量那天的收盘价}var1:=v>ref(v,1)*2;ref(var1,3) and count(c>ref(c,3),3)=3;倍量柱加三天量减价升喇叭形的真黄金柱公式倍数:=1.9;倍量1:=REF(VOL,3)>倍数*REF(VOL,4) AND REF(C,3)>=REF(O,3);价升量缩:= LLV(C,3)>=REF(L,3) AND HHV(VOL,3)<=REF(VOL,3);连阳:= COUNT(C>=O,4)=4;选股:倍量1 AND 价升量缩AND 连阳;根据王子老师“凹口起柱”理论编写的凹口指标王子老师的平台起柱、过顶起柱、凹口起柱理论真是了不得,十分佩服,这里我冒昧的加一个,那就是顶部起柱。
通达信经典分时主图 源码指标公式
DRAWGBK(O>=0,RGB(60,35,0),RGB(0,60,60),0,'背景图',0),LINETHICK2;{========================额外==========================} Z1:=STRCAT(DYBLOCK,' ');Z2:=STRCAT(Z1,HYBLOCK);Z3:=STRCAT(Z2,' ');Z4:=STRCAT(Z3,GNBLOCK);Z5:=STRCAT(Z4,' ');Z6:=STRCAT(Z5,FGBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.01,0.012,0,STRCAT(Z6,ZHBLOCK)),COLORCYAN;DRAWTEXT_FIX(ISLASTBAR,0,0.14,0,STRCAT('概念: ',GNBLOCK)),COLORWHITE;A1:=(VOL/CLOSE)/3;A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);A3:=SUM((IF(((A1>40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);A4:=SUM((IF(((A1<40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);突破:=REF(EMA(C,14),1);A1X:=(EMA(C,10)-突破)/突破*100;多方:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);空方:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL); STICKLINE(A1X>=0,多方,突破,0,0),COLOR000099;STICKLINE(A1X<0,空方,突破,0,0),COLOR00CC66;最新:CLOSE,LINETHICK1,COLORWHITE;AA:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C));BB:=BETWEEN(C/AA,C+H,C-H);DRAWTEXT( ISLASTBAR AND 最新>REF(最新,1),最新,STRCAT(' 涨▲',CON2STR(最新,2))),COLORMAGENTA;DRAWTEXT( ISLASTBAR AND 最新<REF(最新,1),最新,STRCAT(' 跌▼',CON2STR(最新,2))),COLOR00FF00;DRAWTEXT_FIX(1,0.880,1-0.97,0,DYBLOCK),COLORWHITE;DRAWTEXT_FIX(1,0.940,1-0.97,0,HYBLOCK),COLORYELLOW;均价:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;DXJP:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,21)-LLV(LOW,34))*100;FSZX:=(EMA(DXJP,3)-50)*2,COLORGRAY;BGTYU:=IF(DATE<=1150530,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)) )/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU))) ));DRAWICON(FSZX<=-95,C,38);DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.04),C,'板'),COLORCYAN; DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),C,'追'),COLORYELLOW;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:=L1+P1*7/8,COLORGREEN;支撑:=L1+P1*0.5/8,COLORMAGENTA;DRAWICON(LONGCROSS(支撑,C,2),C,5);AYGB1:=(DVOL/C)/2,NODRAW;AYGB2:=SUM(IF(AYGB1>100 AND CLOSE>REF(CLOSE,1),AYGB1,0),0);AYGB3:=SUM(IF(AYGB1>100 AND CLOSE<REF(CLOSE,1),AYGB1,0),0);AYGB4:=SUM(IF(AYGB1<100 AND CLOSE>REF(CLOSE,1),AYGB1,0),0);AYGB5:=SUM(IF(AYGB1<100 AND CLOSE<REF(CLOSE,1),AYGB1,0),0);AYGB6:=AYGB2+AYGB3+AYGB4+AYGB5;机买:=(AYGB2/AYGB6)*100-100,LINETHICK1,COLORRED;机卖:=(AYGB3/AYGB6)*100-100,LINETHICK1,COLORGREEN;主力差:=机买-机卖;LQH:=主力差>0 AND REF(主力差,1)<=0;DRAWICON(LQH,C,25);JJXX:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM( AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW;JJXXH:=(JJXX*1.007 ),COLORFF6600;FFLL:=SUM(VOL,6)>REF(MA(VOL,30),1)*10;HHPP:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/CLOSE)< 1;HHZZ:=HHPP AND FFLL AND (C>JJXXH);TTPP2:=FILTER(HHZZ,100);DRAWICON(TTPP2,C,26);ZS:=DYNAINFO(3);KP:=DYNAINFO(4);ZX:=DYNAINFO(7);ZG:=DYNAINFO(5);ZD:=DYNAINFO(6);分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW;RC:=DYNAINFO( 3);量比超2.5:=IF(DYNAINFO(17)>2.5,RC-0.15,DRAWNULL),COLORFF9933;量比超5:=IF(DYNAINFO(17)>5,RC-0.15,DRAWNULL),COLORBA75FF;DRAWBAND(量比超2.5,RGB(51,153,255),量比超2.5+0.015,RGB(51,153,255)); DRAWBAND(量比超5,RGB(255,118,188),量比超5+0.015,RGB(255,118,188));{首次起爆}TT:=BARSCOUNT(C);{取得有效收盘价}均价黄:SUM(C*V,TT)/SUM(V,TT),LINETHICK1,COLOR00FFE1;{分时均线的取值}量两步:=MA(V,5)>REF(MA(V,5),1) AND REF(MA(V,5),1)>REF(MA(V,5),2);价两步:= C>=REF(C,1) AND REF(C,1)>REF(C,2);价上岗量破5:=C>均价黄AND V>MA(V,5);量起爆:=V>=REF(V,1)*2 ;价创新高:=C>=HHV(C,0);量创新高:=V>=HHV(V,0);对昨日涨幅:=C/DYNAINFO(3)<=1.02;{涨幅控制2个点以内}每日一点:=量两步AND 价两步AND 价上岗量破5 AND 量起爆AND 价创新高AND 量创新高AND 对昨日涨幅;{计算收益、已爆分钟}VC:=BARSSINCE(每日一点)+1;首次起爆价:REF(C,VC-1),NODRAW;今天收益:(DYNAINFO(7)-首次起爆价)/首次起爆价*100,NODRAW;起爆时间:REF(TIME/10000,VC),NODRAW;已爆分钟:VC-1,NODRAW;首次起爆量:=REF(VOL,VC-1);DRAWICON(已爆分钟>=2,RC-0.1,11);{出现金手指,至少已经确认2分钟了};R1:=MA(C,13);R2:=SMA(R1,5,2);DRAWBAND(R1,RGB(255,0,125),R2,RGB(0,111,255));C,LINETHICK2,COLORDDDDDD;{涨停}地:=DYNAINFO(11)+(DYNAINFO(11)*0.021);涨停:IF(DYNAINFO(7)>地,1,0),NODRAW,COLOR0088FF;涨:=IF(涨停=1,C+0.0075,DRAWNULL),COLOR8000FF,LINETHICK2;DRAWBAND(涨,RGB(255,211,0),C-0.0075,RGB(255,125,0));时间:=TIME=100000;N:=BARSLAST(时间);常数:=CONST(IF(N=0,C,REF(C,N))),COLORGREEN,DOTLINE;CS1:=CONST(IF(N,HHV(H,0),REF(HHV(H,0),N)));CS2:=CONST(IF(N,LLV(L,0),REF(LLV(L,0),N)));STICKLINE(时间=1,CS1,CS2,1.2,0),COLOR008888;{涨停2}AAZ:=BARSLAST(TIME=103000);CC:=REF(HHV(C,0),AAZ+1);VV:=REF(HHV(V,0),AAZ+1);ZF:=CC/DYNAINFO(3)<1.05;涨停2:=CROSS(C,CC) AND V>VV AND ZF,COLOR0000FF; DRAWICON(涨停2,RC-0.06,13);A:=O>C AND C>REF(C,1) AND O/REF(C,1)>1.03; DRAWTEXT(ABS(A)>0,L, '假阴'),COLORYELLOW;均价5:AMOUNT/VOL/100,NODRAW;假阴0:=O>C AND 均价5>REF(C,1);DRAWTEXT(假阴0,L-0.2,'假阴真阳'),COLORE8E8E8; STICKLINE(假阴0,O,C,1,0),COLORRED;时间N:=TIME=100000;NN:=BARSLAST(时间N),COLOR808080;常数N:CONST(IF(NN=0,C,REF(C,N))),COLOR004848,DOTLINE;。
通达信通道主图指标通达信指标源码公式
MID_TDMS:=(3*C+L+H)/5;波动中枢:=EMA(EMA(EMA(MID_TDMS,20),2),2),POINTDOT;BDUP:=REF(HHV(100*(HIGH-波动中枢)/波动中枢,120),1),NODRAW; BDDN:=REF(LLV(100*(LOW-波动中枢)/波动中枢,120),1),NODRAW;顶:=EMA(EMA(EMA(REF(波动中枢,1)*(1+BDUP/100),2),2),2);底:=EMA(EMA(EMA(REF(波动中枢,1)*(1+BDDN/100),2),2),2);地线:=底;中线:=REF(波动中枢,1);天线:=顶;绘图范围:=IFF(BARSCOUNT(CLOSE)>120,1,0);STICKLINE(绘图范围,地线,地线+(中线-地线)*(20/20),11,0),COLOR000000; STICKLINE(绘图范围,地线,地线+(中线-地线)*(19/20),11,0),COLOR000008; STICKLINE(绘图范围,地线,地线+(中线-地线)*(18/20),11,0),COLOR000010; STICKLINE(绘图范围,地线,地线+(中线-地线)*(17/20),11,0),COLOR000018; STICKLINE(绘图范围,地线,地线+(中线-地线)*(16/20),11,0),COLOR000020; STICKLINE(绘图范围,地线,地线+(中线-地线)*(15/20),11,0),COLOR000028; STICKLINE(绘图范围,地线,地线+(中线-地线)*(14/20),11,0),COLOR000030; STICKLINE(绘图范围,地线,地线+(中线-地线)*(13/20),11,0),COLOR000038; STICKLINE(绘图范围,地线,地线+(中线-地线)*(12/20),11,0),COLOR000040; STICKLINE(绘图范围,地线,地线+(中线-地线)*(11/20),11,0),COLOR000048; STICKLINE(绘图范围,地线,地线+(中线-地线)*(10/20),11,0),COLOR000050; STICKLINE(绘图范围,地线,地线+(中线-地线)*(9/20),11,0),COLOR000058; STICKLINE(绘图范围,地线,地线+(中线-地线)*(8/20),11,0),COLOR000060; STICKLINE(绘图范围,地线,地线+(中线-地线)*(7/20),11,0),COLOR000068; STICKLINE(绘图范围,地线,地线+(中线-地线)*(6/20),11,0),COLOR000070; STICKLINE(绘图范围,地线,地线+(中线-地线)*(5/20),11,0),COLOR000078; STICKLINE(绘图范围,地线,地线+(中线-地线)*(4/20),11,0),COLOR000080; STICKLINE(绘图范围,地线,地线+(中线-地线)*(3/20),11,0),COLOR000088; STICKLINE(绘图范围,地线,地线+(中线-地线)*(2/20),11,0),COLOR000090; STICKLINE(绘图范围,地线,地线+(中线-地线)*(1/20),11,0),COLOR000098; STICKLINE(绘图范围,天线,天线-(天线-中线)*(20/20),11,0),COLOR000000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(19/20),11,0),COLOR080800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(18/20),11,0),COLOR101000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(17/20),11,0),COLOR181800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(16/20),11,0),COLOR202000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(15/20),11,0),COLOR282800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(14/20),11,0),COLOR303000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(13/20),11,0),COLOR383800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(12/20),11,0),COLOR404000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(11/20),11,0),COLOR484800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(10/20),11,0),COLOR505000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(9/20),11,0),COLOR585800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(8/20),11,0),COLOR606000;STICKLINE(绘图范围,天线,天线-(天线-中线)*(7/20),11,0),COLOR686800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(6/20),11,0),COLOR707000;STICKLINE(绘图范围,天线,天线-(天线-中线)*(5/20),11,0),COLOR787800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(4/20),11,0),COLOR808000;STICKLINE(绘图范围,天线,天线-(天线-中线)*(3/20),11,0),COLOR888800;STICKLINE(绘图范围,天线,天线-(天线-中线)*(2/20),11,0),COLOR909000;STICKLINE(绘图范围,天线,天线-(天线-中线)*(1/20),11,0),COLOR989800;回归上限:IFF(绘图范围,天线,DRAWNULL),COLOR989800,LINETHICK2;回归下限:IFF(绘图范围,地线,DRAWNULL),COLOR000098,LINETHICK2;上涨偏离度:=100*(HIGH-波动中枢)/波动中枢,NODRAW;下跌偏离度:=100*(LOW-波动中枢)/波动中枢,NODRAW;STICKLINE(绘图范围AND CLOSE>OPEN,HIGH,CLOSE,0,0),COLORRED;STICKLINE(绘图范围AND CLOSE>OPEN,LOW,OPEN,0,0),COLORRED;STICKLINE(绘图范围AND CLOSE>OPEN,CLOSE,OPEN,3,1),COLORRED;STICKLINE(绘图范围AND CLOSE==OPEN,HIGH,LOW,0,0),COLORWHITE; STICKLINE(绘图范围AND CLOSE==OPEN,CLOSE,OPEN,3,0),COLORWHITE; STICKLINE(绘图范围AND CLOSE<OPEN,HIGH,LOW,0,0),COLORGREEN;STICKLINE(绘图范围AND CLOSE<OPEN,CLOSE,OPEN,3,0),COLORGREEN;波动敞口:((回归上限-波动中枢)/波动中枢+(波动中枢-回归下限)/波动中枢)*100,NODRAW,COLOR00C6FF;涨过头:=IFF(HIGH>回归上限,1,0);跌过头:=IFF(LOW<回归下限,1,0);风险标记:IFF(涨过头,CLOSE,DRAWNULL),NODRAW,COLORCYAN;机会标记:IFF(跌过头,CLOSE,DRAWNULL),NODRAW,COLORYELLOW;DRAWICON(涨过头,HIGH*1.01,2);DRAWICON(跌过头,LOW*0.99,1);VARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*10 0;逃顶:=IFF(CROSS(84,VARC) AND 上涨偏离度>20,1,0),NODRAW;VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;VAR2:=REF(VAR1,1);VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100;VAR4:=FILTER(IFF(COUNT(VAR3<20,5)>=1 AND COUNT(VAR1==LLV(VAR1,10),10)>=1AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0),5);抄底:=IFF(VAR4 AND EXIST(下跌偏离度*(-1)>15,3),1,0);DRAWICON(绘图范围AND 逃顶,HIGH*1.02,14);DRAWICON(绘图范围AND 抄底,LOW*0.98,13);DRAWTEXT(绘图范围AND 逃顶,MAX(H*1.05,回归上限*1.03),'逃'),COLORCYAN; DRAWTEXT(绘图范围AND 抄底,MIN(LOW*0.995,回归下限),'抄'),COLORYELLOW;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 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*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 一年做一股!忠告,轻易不抛牛股,毕业。