指标源码

合集下载

各种指标源码公式

各种指标源码公式

各种指标源码公式1、OBV(On-Balance Volume):OBV=阳性成交量之和-阴性成交量之和公式:当价格上涨时,OBV(t)=OBV(t-1)+Vt当价格下跌时,OBV(t)=OBV(t-1)-Vt当价格不变时,OBV(t)=OBV(t-1)其中,Vt表示t时刻的成交量。

2、MACD(Moving Average Convergence Divergence):MACD是指数平滑移动平均线(Exponential Moving Average,EMA)之间的变化趋势。

信号线:MACD信号线(Signal line)是由一条简单移动平均线(Simple Moving Average,SMA)绘制而成。

基线:偏离率(divergence)称为基线(Base Line)。

公式:MACD=12日EMA-26日EMA信号线:MACD信号线=9日EMA偏离率(divergence):MACD偏离率=MACD-信号线3、RSI(Relative Strength Index):RSI是通过相对强度指数(Relative Strength Index,RSI)测量股价趋势的指标。

RSI在0-100之间,越接近0说明股价越超卖,越接近100表示股价越涨。

公式:RSI=(N日内上涨之和)/(N日内上涨之和+N日内下跌之和)×100%其中:N表示RSI的时间窗口,例如14日RSI,则N=144、KDJ(Stochastic Oscillator):KDJ指标兼具动量趋势分析和随机指标性质,用于确定超买超卖状态。

KDJ指标主要由三条线组成,K线,D线和J线。

K线表示短期趋势,D线表示长期趋势,J线表示超买超卖状态。

公式:K=100×(C-Ln)/(Hn-Ln)。

各种指标源码

各种指标源码

超级短线指标源码:Var3:=(CLOSE-MA(CLOSE,3))/MA(CLOSE,3)*100;Var4:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;Var5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;Var6:=(Var3+Var4+Var5)/3;Var7:=EMA(Var6,5);指标: EMA(EMA(Var3,5),5)*3, COLORSTICK;Var8:=IF(Var6<=-20,10,0);Var9:=HHV(Var8,10);STICKLINE(Var8=10,20,10,5,0),COLOR6666FF;VarA:=IF(Var9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);K:EMA(Var7,5)*2,COLORff00ff;D:EMA(K,5),colorwhite;J:K*3-D*2, coloryellow;VarB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10;换手: VOL/CAPITAL*100,colorgreen;DRAWTEXT(VarA=20,15,'底部'),linethick1,colorwhite;STICKLINE((VarA=20),0,10,5,0),colorwhite;VARC:=(ZIG(3,6)>=REF(ZIG(3,6),1)) AND (REF(ZIG(3,6),1)<=REF(ZIG(3,6),2)) AND (REF(ZIG (3,6),2)<=REF(ZIG(3,6),3))AND (REF(ZIG(3,6),3)<=REF(ZIG(3,6),4));VARD:=(ZIG(3,6)<=REF(ZIG(3,6),1)) AND (REF(ZIG(3,6),1)>=REF(ZIG(3,6),2)) AND (REF(ZIG (3,6),2)>=REF(ZIG(3,6),3))AND (REF(ZIG(3,6),3)>=REF(ZIG(3,6),4));STICKLINE((VARC=1),(j),j+2,4,0),Color0000FF;DRAWTEXT((VARC=1),(j-6),'买'),Color0000FF;STICKLINE((VARD=1),(j-2),0,4,0),Color00FF00;DRAWTEXT((VARD=1),(j+5),'卖'),Color00FF00;VarE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VarF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);Var10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);Var11:=VarF<REF(Var10,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);DRAWTEXT(Var11 AND COUNT(Var11,30)=1,15,'大资金活动'),linethick1,COLORff00ff; STICKLINE(Var11 AND COUNT(Var11,30)=1,1,10,5,0),colorff00ff;Var12:=(HIGH+LOW+CLOSE)/3;Var13:=(Var12-MA(Var12,14))/(0.015*AVEDEV(Var12,14));Var14:=(Var12-MA(Var12,70))/(0.015*AVEDEV(Var12,70));Var15:=IF(Var13>=150AND Var13<200AND Var14>=150AND Var14<200,10,0);Var16:=IF(Var13<=-150AND Var13>-200AND Var14<=-150AND Var14>-200,-10,Var15);Var17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;Var18:=100-ABS(Var17);Var19:=IF(Var18<90,Var18,100);Var1A:=IF(VarE>0,VarE,0);Var1B:=IF(Var14>=200AND Var13>=150,15,IF(Var14<=-200AND Var13<=-150,-15,Var16))+60; Var1C:=Var1A>48AND Var1B>60AND Var19<100;DRAWTEXT(Var1C AND COUNT(Var1C,30)=1,15,'大笔出货'),linethick1,COLORffcc66; STICKLINE(Var1C AND COUNT(Var1C,30)=1,0,10,5,0),colorffcc66;短痛指标VAR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25);VAR2:=HIGH-REF(HIGH,1);VAR3:=REF(LOW,1)-LOW;VAR4:=SUM(IF(VAR2>0AND VAR2>VAR3,VAR2,0),25);VAR5:=SUM(IF(VAR3>0AND VAR3>VAR2,VAR3,0),25);VAR6:=VAR4*100/VAR1;VAR7:=VAR5*100/VAR1;VAR8:=MA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,15);VAR9:=(VAR8+REF(VAR8,15))/2;A:=(VAR7>VAR6 AND VAR7>25AND VAR6<25);B:ZIG(3,50/5)*100,colorwhite;G:MA(B,2),colorffcc66;D:=CROSS(B,G)*1000,colorred;W:=CROSS(G,B)*1000,colorblue;E:=REF(INDEXC,1);F:=SMA(MAX(INDEXC-E,0),3,1)/SMA(ABS(INDEXC-E),3,1);VAR10:=F AND F<8;VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR12:=SMA(VAR11,3,1);VAR13:=SMA(VAR12,3,1);VAR14:=VAR13 AND VAR13<20;MM:=A AND D AND VAR10 AND VAR14 ;DRAWTEXT(W=1000,B*1.05,'要射了' ),COLOR00FF00;DRAWTEXT(D=1000,B*1.05,'打飞机'),colorred;提前预支指标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);资金入场: EMA(IF(LOW<=VarE,(VarD+VarF*2)/2,0),3)/618*Var10;资金入场: IF(资金入场>0,资金入场,0),STICK,linethick2, COLOR0000ff;今量: 资金入场;a1:IF(资金入场>0,今量*1.2,0),STICK,linethick5, COLOR0000ff;a2:IF(资金入场>0,今量*0.8,0),STICK,linethick5, COLOR0066ff;a3:IF(资金入场>0,今量*0.6,0),STICK,linethick5, COLOR0099ff;a4:IF(资金入场>0,今量*0.4,0) ,STICK,linethick5,COLOR00ccff;a5:IF(资金入场>0,今量*0.2,0) ,STICK,linethick5,COLOR00ffff;很有公式VAR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25); VAR2:=HIGH-REF(HIGH,1);VAR3:=REF(LOW,1)-LOW;VAR4:=SUM(IF(VAR2>0AND VAR2>VAR3,VAR2,0),25);VAR5:=SUM(IF(VAR3>0AND VAR3>VAR2,VAR3,0),25);VAR6:=VAR4*100/VAR1;VAR7:=VAR5*100/VAR1;VAR8:=MA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,15);VAR9:=(VAR8+REF(VAR8,15))/2;A:=(VAR7>VAR6 AND VAR7>25AND VAR6<25);B:ZIG(3,50/5)*100,colorwhite;G:MA(B,2),colorffcc66;D:=CROSS(B,G)*1000,colorred;W:=CROSS(G,B)*1000,colorblue;E:=REF(INDEXC,1);F:=SMA(MAX(INDEXC-E,0),3,1)/SMA(ABS(INDEXC-E),3,1);VAR10:=F AND F<8;VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR12:=SMA(VAR11,3,1);VAR13:=SMA(VAR12,3,1);VAR14:=VAR13 AND VAR13<20;MM:=A AND D AND VAR10 AND VAR14 ;DRAWTEXT(W=1000,B*1.05,'要射了' ),COLOR00FF00;DRAWTEXT(D=1000,B*1.05,'打飞机'),colorred;CctvQ2:=(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,LINETHICK3;趋势线:EMA(Q3, 3),colorred,LINETHICK3;DRAWTEXT(CROSS(趋势线, 长趋势) AND REF(长趋势,1)>80, REF(长趋势,3), '顶'),colorred,LINETHICK5;逢低买: DRAWTEXT(REF(CROSS(趋势线,长趋势),82) AND趋势线>1.3*长趋势,长趋势,'逢低买'),LINETHICK1;买: DRAWTEXT(REF(CROSS(长趋势,趋势线),1) AND长趋势>1.3*趋势线,趋势线,'买'),colorred,LINETHICK1;VAR3:=PEAKBARS(3,15,1)<10;VAR5:=IF(VAR3=1,2,0);顶:= IF(VAR5=2,2,0);顶A:IF(顶>REF(顶,1),50,0),colorgreen;DRAWTEXT(顶A=50,45,'快逃'),COLOR00FF00;金叉: CROSS(长趋势,趋势线);DRAWTEXT(金叉,趋势线,'★'),colorred;V1:=EMA(CLOSE,60)-EMA(CLOSE,300);V2:=EMA(V1,300);V3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;V4:SMA(V3,2,1);V5:SMA(V4,2,1);V6:=CLOSE/REF(CLOSE,3)>=1.1;V7:=BACKSET(V6,3);买入:IF((V7 AND COUNT(V7,3)=1),30,0),coloryellow,LINETHICK3;DRAWTEXT(买入,35,'买入 '),coloryellow,LINETHICK3;骗线指标VAR1:= EMA(EMA(CLOSE,13),13);控盘指数: (VAR1-REF(VAR1,1))/REF(VAR1,1)*1000,POINTDOT,COLORFFCCCC;STICKLINE(控盘指数<0,控盘指数,0,2,0),colorgray;无庄控盘: 控盘指数<0,LINETHICK0,colorgray;STICKLINE(控盘指数>REF(控盘指数,1) AND控盘指数>0AND控盘指数<3,控盘指数,0,2,1),colorred; STICKLINE(控盘指数>REF(控盘指数,1) AND控盘指数>0AND控盘指数>3,控盘指数,0,2,1),colorred; STICKLINE(控盘指数>REF(控盘指数,1) AND控盘指数>3,控盘指数,3,4,1),COLORFF00FF;主力控盘: 控盘指数>REF(控盘指数,1) AND控盘指数>0,LINETHICK0,colorred;本帖隐藏的内容需要回复才可以浏览资金秘密V1:=(C*2+H+L)/4*10;V2:=EMA(V1,13)-EMA(V1,34);V3:=EMA(V2,5);V4:=2*(V2-V3)*5.5;庄家秘密撤: IF(V4<=0,V4,0),COLOR00FF00,LINETHICK2;庄家秘密进: IF(V4>=0,V4,0),COLORFF00FF,LINETHICK2;V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8; V6:=EMA(3*V5-2*SMA(V5,18,1),5);V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10; V8:=(INDEXC*2+INDEXH+INDEXL)/4;V9:=EMA(V8,13)-EMA(V8,34);VA:=EMA(V9,3);VB:=(V9-VA)/2;大盘资金进场: IF(VB>=0,VB,0),colorred,LINETHICK2;大盘资金撤走: IF(VB<=0,VB,0),colorblue,LINETHICK2;。

通达信指标公式源码大全

通达信指标公式源码大全

通达信魔鬼操盘主图-指标公式源码均5:MACLOSE;5 COLORYELLOW;均10:MACLOSE;10COLORGREEN;均30: MACLOSE;30 COLORMAGENTA ;均60: MACLOSE; 60 COLORRED POINTDOT LINETHICK3;均250: MACLOSE; 250 COLORBLUE LINETHICK2 ;魔鬼通道上:均30 + 2STDCLOSE;60 COLORYELLOW POINTDOT LINETHICK2 ;魔鬼通道下:均30 - 2STDCLOSE;60 COLORYELLOW POINTDOT LINETHICK2; VAR1:=CLOSE-LLVLOW;9/HHVHIGH;9-LLVLOW;9100;VAR2:=SMAVAR1;3;1;VAR3:=SMAVAR2;3;1;VAR4:=VAR11.05;VAR5:=MACLOSE;5;VAR6:=HHVHIGH;36-CLOSE/HHVHIGH;36-LLVLOW;36100;VAR7:=SMAVAR6;5;1;VAR8:=VOL>REFVOL;1;VAR9:=MAVOL/CAPITAL;30MAVOL;60/10000+MACLOSE;30;通达信平均价格主图-指标公式源码A:=3C+H+L+O/6;XJ:=A+0.618REFA;1+0.382REFA;2+0.236REFA;3+0.146REFA;4/2.382; YCZXH:=MAHHVA;2;5+MAHHVA;2;13+MAHHVA;2;21+MAHHVA;2;32/4; YCZXL:=MALLVA;2;5+MALLVA;2;13+MALLVA;2;21+MALLVA;2;32/4;SMH:EMAYCZXH;21;COLOR004000;SML:EMAYCZXL;21;COLOR004000;SMJ:SML+SMH/2;COLOR004000;PJ:=10A+9REFA;1+8REFA;2+7REFA;3+6REFA;4+5REFA;5+4REFA;6+3REFA;7 +2REFA;8+REFA;9/55;A1:=EMAPJ;3;COLOR004000;A2:=EMAPJ;5;COLOR004000;A3:=EMAPJ;7;COLOR004000;A4:=EMAPJ;9;COLOR004000;A5:=EMAPJ;11;COLOR004000;LX:=REFXJ;1;ZD:=SMAMAXXJ-LX;0;5;1/SMAABSXJ-LX;5;1100;KX1:=CLOSE>=OPEN AND ZD>=50;KX2:=CLOSE<OPEN AND ZD>=50;KX3:=CLOSE>=OPEN AND ZD<50;KX4:=CLOSE<OPEN AND ZD<50;IFA5<REFA5;1;A5;DRAWNULL;COLOR820000;LINETHICK2;IFA5>REFA5;1;A5;DRAWNULL;COLOR00005B;LINETHICK2;IFA4<REFA4;1;A4;DRAWNULL;COLOR8C0000;LINETHICK1;IFA4>REFA4;1;A4;DRAWNULL;COLOR000055;LINETHICK1;IFA3<REFA3;1;A3;DRAWNULL;COLOR9B0000;LINETHICK1;IFA3>REFA3;1;A3;DRAWNULL;COLOR00006C;LINETHICK1;IFA2<REFA2;1;A2;DRAWNULL;COLORBB0000;LINETHICK1;IFA2>REFA2;1;A2;DRAWNULL;COLOR00007D;LINETHICK1;IFA1<REFA1;1;A1;DRAWNULL;COLORCC0000;LINETHICK1;IFA1>REFA1;1;A1;DRAWNULL;COLOR00009B;LINETHICK1;STICKLINEKX1;C;O;4;1;COLOR4440FF;STICKLINEKX1;C;H;0.5;1;COLOR4440FF;STICKLINEKX1;O;L;0.5;1;COLOR4440FF;STICKLINEKX2;C;O;4;0;COLOR4440FF;STICKLINEKX2;O;H;0.5;0;COLOR4440FF;STICKLINEKX2;C;L;0.5;0;COLOR4440FF;STICKLINEKX3;C;O;4;1;COLORFFFF33;STICKLINEKX3;C;H;0.5;1;COLORFFFF33;STICKLINEKX3;O;L;0.5;1;COLORFFFF33;STICKLINEKX4;C;O;4;0;COLORFFFF33;STICKLINEKX4;O;H;0.5;0;COLORFFFF33;STICKLINEKX4;C;L;0.5;0;COLORFFFF33;通达信牛劲十足副图-指标公式源码VAR1:=VOL/HIGH-LOW2-ABSCLOSE-OPEN;ZM:=IFCLOSE>OPEN;VAR1HIGH-LOW;IFCLOSE<OPEN;VAR1HIGH-OPEN+CLOSE-LOW;VOL/2;COLORRED;POINTDOT;ZM1:=IFCLOSE>OPEN;0-VAR1HIGH-CLOSE+OPEN-LOW;IFCLOSE<OPEN;0-VAR1 HIGH-LOW;0-VOL/2;COLOR00FF00;POINTDOT;MMB:=SUMZM;30+SUMZM1;30/10;COLORYELLOW;SG:=MMB>0 AND REFMMB;1<MMB;上攻周期:COUNTSG;5;LINESTICK;COLORWHITE;JSC:=上攻周期<1;DBQD:=FILTERCOUNTJSC;5>3 AND NOTJSC;10;DRAWICONDBQD;2;1;DRAWBAND上攻周期;RGB255;120;120;3;RGB0;0;0;DRAWBANDJSC;RGB0;0;255;0.5;RGB0;0;0;STICKLINECOUNT上攻周期>3;5>=3 AND SG;0;上攻周期;1.5;0;COLORRED; XG: COUNTCOUNT上攻周期>3;5>=3 AND SG;20>4;通达信魔鬼K线副图-指标公式源码VAR1:=REFOPEN;1;VAR2:=SMAMAXOPEN-VAR1;0;6;1/SMAABSOPEN-VAR1;6;1100;VAR3:=REFCLOSE;1;VAR4:=SMAMAXCLOSE-VAR3;0;6;1/SMAABSCLOSE-VAR3;6;1100;VAR5:=REFHIGH;1;VAR6:=SMAMAXHIGH-VAR5;0;6;1/SMAABSHIGH-VAR5;6;1100;VAR7:=REFLOW;1;VAR8:=SMAMAXLOW-VAR7;0;6;1/SMAABSLOW-VAR7;6;1100; STICKLINEVAR4<VAR2;VAR2;VAR4;5;0;COLORGREEN ; ;STICKLINEVAR4>VAR2;VAR2;VAR4;5;0;COLORRED ; ;STICKLINEVAR4>VAR2 AND VAR6>VAR8 ANDVAR8>VAR4;VAR4;VAR6;0.5;1;COLORRED ; ;STICKLINEVAR4>VAR2 AND VAR6>VAR8 AND VAR8<VAR4;VAR4;VAR6;0.5;1;COLORRED ;; STICKLINEVAR4>VAR2 AND VAR6<VAR8 AND VAR6>VAR4;VAR4;VAR8;0.5;1;COLORRED ; ; STICKLINEVAR4>VAR2 AND VAR6>VAR8 AND VAR6<VAR2;VAR2;VAR8;0.5;1;COLORRED ; ; STICKLINEVAR4>VAR2 AND VAR6>VAR8 AND VAR6>VAR2;VAR2;VAR8;0.5;1;COLORRED ; ; STICKLINEVAR4>VAR2 AND VAR6<VAR8 AND VAR8<VAR2;VAR2;VAR6;0.5;1;COLORRED ; ; STICKLINEVAR4>VAR2 AND VAR6<VAR8 AND VAR8>VAR2;VAR2;VAR6;0.5;1;COLORRED ; ; STICKLINEVAR4<VAR2 AND VAR6>VAR8 AND VAR6<VAR4;VAR4;VAR8;0.5;1;COLORGREEN ; ; STICKLINEVAR4<VAR2 AND VAR6<VAR8 AND VAR8<VAR4;VAR4;VAR6;0.5;1;COLORGREEN ; ; STICKLINEVAR4<VAR2 AND VAR6<VAR8 AND VAR6>VAR4;VAR4;VAR8;0.5;1;COLORGREEN ; ; STICKLINEVAR4<VAR2 AND VAR6>VAR8 AND VAR6<VAR4;VAR2;VAR8;0.5;1;COLORGREEN ;; STICKLINEVAR4<VAR2 AND VAR6>VAR8 AND VAR6>VAR4;VAR2;VAR8;0.5;1;COLORGREEN ; ;STICKLINEVAR4<VAR2 AND VAR6<VAR8 AND VAR8<VAR2;VAR2;VAR6;0.5;1; COLORGREEN ; ;STICKLINEVAR4<VAR2 AND VAR6<VAR8 ANDVAR8>VAR2;VAR2;VAR6;0.5;1;COLORGREEN ; ;通达信牛熊分界立桩量、中线-指标公式源码AAA:=3C+H+L+O/6;VAR1:=8AAA+7REFAAA;1+6REFAAA;2+5REFAAA;3+4REFAA A;4+3REFAAA;5+2REFAAA;6+REFAAA;8/36;VAR2:=HHVVAR1;5+HHVVAR1;10+ HHVVAR1;20/3;VAR3:=LLVVAR1;5+LLVVAR1;10+LLVVAR1;20/3;VAR4:=HHVV AR2;5+HHVVAR2;10+HHVVAR2;20/3;VAR5:=LLVVAR3;5+LLVVAR3;10+LLVVAR 3;20/3;VAR6:=LLVVAR1;2+LLVVAR1;4+LLVVAR1;6/3;DRAWBANDVAR1;RGB15 5;50;50;VAR6;RGB250;250;0;短线:VAR1;COLORWHITE;中线:VAR6;COLORYELLOW;金叉:短线>中线 AND REF短线;1=REF中线;1;NODRAW;下跌:IFVAR1=VAR6;VAR6;DRAWNULL;COLORGREEN;TJ1:=VOL=HHVVOL;10AND VOL>2REFVOL;1AND CLOSE>VAR1;立桩量:=FILTERTJ1;5;TJ2:=IFBARSLAST 立桩量=1 AND CLOSE>REFHIGH;1;1;IFBARSLAST立桩量=2 AND CLOSE>REFHIGH;2;1;IFBARSLAST立桩量=3 AND CLOSE>REFHIGH;3;1;0;突破:TJ2=1;NODRAW;STICKLINECLOSE;REFHIGH;BARSLAST立桩量;REFHIGH;BARSLAST立桩量;1;0;COLORCYAN;STICKLINECLOSE;REFLOW;BARSLAST立桩量;REFLOW;BARSLAST立桩量;1;0;COLORYELLOW;STICKLINEC>=O;C;O;3;0;COLOR000045;STICKLINEC>=O;C;O;2.5;0;COLOR000065;STICKLINEC>=O;C;O;2;0;COLOR000085;STI CKLINEC>=O;C;O;1.5;0;COLOR0000A5;STICKLINEC>=O;C;O;1;0;COLOR000 0C5;STICKLINEC>=O;C;O;0.5;0;COLOR0000E5;STICKLINEC>=O;H;L;0;0;C OLOR0000F5;STICKLINEC<O;C;O;3;0;COLOR353500;STICKLINEC<O;C;O;2. 5;0;COLOR454500;STICKLINEC<O;C;O;2;0;COLOR555500;STICKLINEC<O;C ;O;1.5;0;COLOR656500;STICKLINEC<O;C;O;1;0;COLOR757500;STICKLINE C<O;C;O;0.5;0;COLOR858500;STICKLINEC<O;H;L;0;0;COLOR959500;ZRR: =YEAR-1992365+INTPARTYEAR-1989/4+IFMONTH<=2;DAY+MONTH-131;DAY+I NTPART13MONTH+1/5-7+MONTH-128+IFINTPARTYEAR/4=YEAR/4;1;0;NODRAW ;T:=BARSLASTZRR-REFZRR;1>WEEKDAY-REFWEEKDAY;1+1;NODRAW;T1:=REFT ;T+T;NODRAW;T2:=REFT;T1+T1;NODRAW;T3:=REFT;T2+T2;NODRAW;T4:=REF T;T3+T3;NODRAW;T5:=REFT;T4+T4;NODRAW;T6:=REFT;T5+T5;NODRAW;T7:=REFT;T6+T6;NODRAW;T8:=REFT;T7+T7;NODRAW;周10:REFCLOSE;T+REFCLOSE;T1+REFCLOSE;T2+REFCLOSE;T3+REFCLOSE;T4+R EFCLOSE;T5+REFCLOSE;T6+REFCLOSE;T7+REFCLOSE;T8+CLOSE/10;LINETHI CK2;通达信牛准反弹快线、慢线-指标公式源码N:=9;M1:=3;M2:=3;P:=9;快线:=CLOSE-LLVLOW;N/HHVHIGH;N-LLVLOW;N100;慢线:=SMA快线;M1;1;ELI空:=SMA慢线;M2;1;ELI牛股:=IFBARSLASTCROSS慢线;ELI空<P AND CROSS慢线;ELI空 AND 慢线<20;90;0;LC:=REFCLOSE;1;RSI:=SMAMAXCLOSE-LC;0;4.1;1/SMAABSCLOSE-LC;4.1;1100;牛准反弹:=CROSSRSI;1180;XG:牛准反弹 OR ELI牛股;通达信启动提示平台线、启动线-指标公式源码启动线:SUMEMAC+L/2;2;5/10.158;COLORRED;平衡线:LLVSUM EMAC+L/2;2;5/10.158;4;COLORFF00FF;平台线:LLVSUM EMAC+L/2;2;5/10.158;10;COLORFFFFFF;强弱线:EMA启动线;21;COLORYELLOW;STICKLINE平台线<启动线;启动线;平台线;0.1;0;COLORFFCCAA; STICKLINE平衡线<启动线;启动线;平衡线;0.1;0;COLORRED;VAR1:=2MALLVC+L/2;81.1;13-EMAC+L/2;3-C+L/20.1;VAR2:=IFEMAC+L/2;3-VAR15>0;POWEMAC+L/2;3-VAR15;2/10;-1POWEMAC+L /2;3-VAR15;2/10;VAR3:=IFVAR2>0;VAR2-0;0;STICKLINEVAR3>0 AND REFVAR3;1=0 AND C+L/2>MAC+L/2;8;强弱线;强弱线+0.2;4;0;COLORFFAACC;DRAWTEXTVAR3>0 AND REFVAR3;1=0 AND C+L/2>MAC+L/2;8;强弱线+0.35;'注意控制';LINETHICK3;COLORFFAACC;通达信平台启动主图-指标公式源码圣:=HHVHIGH;21-CLOSE/HHVHIGH;21-LLVLOW;21100-10;灵:=CLOSE-LLVLOW;21/HHVHIGH;21-LLVLOW;21100;石:=SMA灵;13;8;仙:=CEILINGSMA石;13;8;编着:=SMA圣;21;8;AABB:=IFL;CONSTL;DRAWNULL;平台启动:STICKLINE仙-编着>75;AABB;AABB0.99;15;1;COLOR0000FF; VARZT:=BARSLAST平台启动;DRAWTEXTVARZT=1;0.99AABB+AABB0.98/2;'平台启动';COLORYELLOW;通达信牛熊线分水岭中线强弱拐点-指标公式源码JJ:=CLOSE+HIGH+LOW/3;A:=EMAJJ;10;B:=REFA;1;M1:=EMACLOSE;3;M2:EMACLOSE;8;分水岭:SMAM2;2.5;1.5;LINETHICK2;COLORRED;牛线:3M2-2分水岭;LINETHICK2;COLORFF00FF ;熊线:4分水岭-3M2;LINETHICK2;COLORGREEN;IF 牛线<=熊线;牛线;熊线;COLORGREEN;LINETHICK2;IF 分水岭<=熊线;分水岭;熊线;COLORGREEN;LINETHICK2;IF牛线>REF熊线;1;熊线;DRAWNULL;COLORFF2200;LINETHICK2; M3:EMAM2;13;M4:EMAM2;55;VAR1:=EMAM3;55;M5:EMAM4;81; COLORRED;LINETHICK1;股道:=1-C/SMAC;13;1100;基础:=EMAC;43;中线强弱拐点:EMA股道C/100+基础;3;COLORGRAY;LINETHICK1;。

通达信超级资金选股指标(源码)

通达信超级资金选股指标(源码)

通达信超级资金选股指标(源码)涨幅:=9;高度:=20;跨度:=10;N4:=34;短线:=EMA(CLOSE,17);A:=(3*C+L+O+H)/6;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A, 4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF (A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*RE F(A,17)+2*REF(A,18)+REF(A,20))/210;中线:=EMA(X,13);KKA:=EMA(C,5);KKB:=EMA(KKA,8);KKC:=EMA(KKB,13);长线:=EMA(KKC,50);中期:=100*(C-LLV(L,N4))/(HHV(C,N4)-LLV(L,N4));KDD:=REF(中期,1)<1 AND 中期>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);支撑:=LLV(持股,3);中期线:=MA(持股,12);VAR1:=1;VAR2:=LLV(LOW,10);VAR3:=HHV(HIGH,25);短期线:=EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*VAR1*30;AAA:=(3*C+L+O+H)/6;C2:=EMA(AAA,6);C3:=EMA(AAA,5);SHORT:=12;LONG:=26;MID:=9;DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:=EMA(DIF,MID);MACD:=(DIF-DEA)*2;N:=9;M1:=3;M2:=3;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; K:=SMA(RSV,M1,1);D:=SMA(K,M2,1);J:=3*K-2*D;KAAA1:=EXIST(KDD,3);KBBB1:=C/REF(C,1)>1+0.01*涨幅;KAAA2:=支撑>中期线 AND 持股=支撑;KBBB2:=CROSS(C2,C3);KCCC2:=EXIST(C/REF(C,1)>1+0.01*涨幅,跨度);KDDD2:=BARSLAST(中期线>短期线)<跨度;KAAA3:=REF(C,1)<REF(中线,1) AND C>中线;KBBB3:=C/REF(C,1)>1+0.01*涨幅;KCCC3:=中线/长线<1+0.01*高度;超资: IF(KBBB1+KCCC2+KBBB3=3,1,0);。

通达信指标公式源码大全

通达信指标公式源码大全

通达信指标公式源码大全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。

各种指标源码

各种指标源码

各种指标源码波段极品趋势:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORYELLOW;DRAWBAND(趋势,RGB(155,50,50),50,RGB(0,100,50));转强:IF(趋势>50,趋势,DRAWNULL),COLORRED;转弱:IF(趋势<50,趋势,DRAWNULL),COLORGREEN;RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,14))/*AVEDEV(TYP,14));DIFF:=EMA(CLOSE,2)-EMA(CLOSE,55);DEA:=EMA(DIFF,6);MACD:=2*(DIFF-DEA);转点:=IF(K>D AND CCI>0 AND DIFF>DEA AND MACD>0,1,0);STICKLINE(转点=1,50,50,2,0),COLORYELLOW;STICKLINE(转点=0,50,50,2,0),COLORCYAN;STICKLINE(C,90,90,1,0),COLORYELLOW;STICKLINE(C,10,10,1,0),COLORCYAN;判断:SMA(趋势,3,1),COLORYELLOW;IF(判断>50 AND 趋势>判断,判断,DRAWNULL ),COLORYELLOW,LINETHICK2;IF(判断<50 AND 趋势>判断,判断,DRAWNULL),COLORFF00FF;IF(判断>50 AND 趋势<判断,判断,DRAWNULL),COLORGREEN,LINETHICK2;风险区:80,COLORFF85FF,POINTDOT;安全区:20,COLORYELLOW,POINTDOT;顶部:90,COLORFFFF00;强弱线:50,COLORGREEN,POINTDOT;DRAWICON(CROSS(趋势,判断) AND 趋势<80 ,判断,1);DRAWICON(CROSS(趋势,顶部),顶部,2);LC:= REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;VAR2:=SMA(VAR1,9,1)+100;VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR4:=SMA(VAR3,3,1);VAR5:=SMA(VAR4,3,1)+100;VAR6:=VAR5-VAR2;趋势1: IF(VAR6>45,VAR6-45,0),COLOR00FFFF;VAR2Q:=REF(LOW,1);VAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*100; VAR4Q:=EMA(IF(CLOSE*,VAR3Q*10,VAR3Q/10),3);VAR5Q:=LLV(LOW,30);VAR6Q:=HHV(VAR4Q,30);VAR7Q:=IF(MA(CLOSE,58),1,0);VAR8Q:=EMA(IF(LOW<=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/999*VAR7Q;火焰山:=IF(VAR8Q>100,100,VAR8Q);STICKLINE(火焰山>0,0 ,火焰山*,3,0 ),COLOR4444FF;STICKLINE(火焰山>0,0 ,火焰山*,2,0 ),COLOR7777FF;STICKLINE(火焰山>0,0 ,火焰山*,1,0 ),COLOR9999FF;STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),3,0),COLOR000033; STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),2,0),COLOR000077; STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),,0),COLOR0000BB; STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),1,0),COLOR0000DD; STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),3,0),COLOR003300; STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),2,0),COLOR007700; STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),1,0),COLOR00DD00; 逃顶:=CROSS(82,RSI);STICKLINE( 逃顶,逃顶,20,3,0),COLORFF5500;STICKLINE( 逃顶,逃顶,30,2,0),COLORFF8800;STICKLINE( 逃顶,逃顶,30,1,0),COLORFFAA00;STICKLINE( 逃顶,逃顶,30,,0),COLORFFCC00;D1:=(C+L+H)/3;D2:=EMA(D1,6);D3:=EMA(D2,5);BBUY:=CROSS(D2,D3);DRAWICON(BBUY,10,1);DRAWTEXT(CURRBARSCOUNT=129,50,'【金盾股票园】'),COLOR889999;VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;DRAWICON(CROSS(82,VARR1),10,2);DRAWTEXT(CROSS(82,VARR1),35,'减'),COLORYELLOW;神奇线选股:(CROSS(趋势,判断) AND 趋势<80),LINETHICK0;波段选股:(BBUY),LINETHICK0;抓主升浪(通达信抓波段主升浪指标)(该指标主要在牛市运用)HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;HHJSJDB:(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF( HHJSJDA,6)+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+REF(HHJSJDA,20))/210,COLORYELLOW;HHJSJDC:MA(HHJSJDB,5),COLORRED;MA5:=MA(C,7),COLORWHITE;MA20:=MA(C,20),COLORFF00FF;MA90:MA(C,90),COLORFFCC66;Y1:=BARSLAST(CROSS(MA5,MA20)) AND MA5>MA20;Y2:=Y1 AND BARSLAST(CROSS(MA5,MA90));Y3:=Y2 AND CROSS(MA20,MA90);DRAWICON(Y3,,1);DRAWTEXT(Y3,,'双跨越'),COLORMAGENTA;F0:=BARSLAST(CROSS(MA(C,5),MA(C,90)));F1:=F0 AND BARSLAST(CROSS(MA(C,20),MA(C,90)));F2:=F1 AND CROSS(MA(C,5),MA(C,20)) AND MA(C,20)>MA(C,90);DRAWICON(F2,,1);DRAWTEXT(F2,,'双蹄奋起');MA51:=MA(C,5);MA10:=MA(C,10);MA201:=MA(C,20);MA30:=MA(C,30);MA60:=MA(C,60);MA120:=MA(C,120);FA:=BARSLAST(CROSS(MA10,MA51)) AND CROSS(MA51,MA10);FB:=FA AND MA51>MA30 AND MA10>MA30 AND MA10>REF(MA10,1); STICKLINE(FB,L,,1,0),COLORYELLOW;DRAWTEXT(FB,,'雄起'),COLORYELLOW;黄金线同花顺股市黄金线input:N(1,110,15);生命线:98,linethick1,coloryellow;生命禁区:95,linethick1,colorred;股价泥潭:20,linethick1,colorblue;生死线:50,linethick2,colorwhite;C0:=(H+L+C)/3;a1:=HHV(C0,n);a2:=LLV(C0,n);a3:=a1-a2;a4:=EMA((C0-a2)/a3,2)*100;b1:=HHV(C0,4*n);b2:=LLV(C0,4*n);b3:=b1-b2;b4:=EMA((C0-b2)/b3,2)*100;C1:=HHV(C0,16*n);C2:=LLV(C0,16*n);C3:=C1-C2;C4:=EMA((C0-C2)/C3,2)*100;短期:a4,colorgreen,linethick1;中期:b4,coloryellow,linethick2;长期:C4,colorred,linethick3;DRAWICON(CROSS(生命禁区,短期) AND REF(短期,1)>短期,短期*,11);DRAWTEXT(CROSS(生命禁区,短期) AND REF(短期,1)>短期,短期*,'←卖'), colorcyan;DRAWICON(CROSS(生命线,短期) AND REF(短期,1)>短期,短期*,12);DRAWTEXT(CROSS(生命线,短期) AND REF(短期,1)>短期,短期*,'←卖'), colorcyan;DRAWTEXT(CROSS(短期,生命禁区),85,'警惕!!'),colorwhite;DRAWTEXT(CROSS(中期,生命禁区),95,'减磅'),ColorFF6800;DRAWTEXT(CROSS(长期,生命禁区),100,'出局'),colormagenta;DRAWICON(CROSS(短期,生命禁区),85,4);DRAWICON(CROSS(中期,生命禁区),95,8);DRAWICON(CROSS(长期,生命禁区),100,3);使用说明:1、红色长期线在上,黄色生命线在中,绿色短期线在下往上穿,不能买。

通达信最全指标公式源码,给大家分享实用的技术指标

通达信最全指标公式源码,给大家分享实用的技术指标

通达信最全指标公式源码,给⼤家分享实⽤的技术指标源码:MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;主⼒:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF (MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF( MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED;IF(主⼒>=REF(主⼒,1),主⼒,DRAWNULL),COLORRED,LINETHICK2;拉升提⽰主图+⼀⼿遮天副图+主⼒追踪副图。

超⽜龙头主图主图源码:展开全⽂TY:=C;TY:=C;AA1:=REF(TY,10)=HHV(TY,2*10+1); BB1:=FILTER(AA1,10); CC1:=BACKSET(BB1,10+1); HD:=FILTER(C1,10); AA2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(AA2,10); CC2:=BACKSET(B2,10+1); LD:=FILTER(CC2,10);JJ:=(3*C+H+L+O)/6;VAR1:=(8*JJ+7*REF(JJ,1)+6*REF(JJ,2)+5*REF(JJ,3)+4*REF(JJ,4)+3*REF(JJ,5)+2*REF(JJ,6)+REF(JJ,8))/36;TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1 AND C>REF(C,1);LJL:=FILTER(TJ1,5) AND C>O AND (C-O)/REF(C,1)>0.06;TJ2:=IF(BARSLAST(LJL)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(LJL)=2 ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(LJL)=3 AND CLOSE>REF(HIGH,3),1,0)));TP:=TJ2=1;参考重点关注主⼒追踪副图股票实盘分析和技术分享,,坚持每⼀天给⼤家分享实盘经验,教⼤家如何在个股起爆前把握主升浪个股,让所有粉丝朋友逐步建⽴出属于⾃⼰的⼀套交易系统。

各种指标源码

各种指标源码

各种指标源码波段极品趋势:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORYELLOW; DRAWBAND(趋势,RGB(155,50,50),50,RGB(0,100,50));转强:IF(趋势>50,趋势,DRAWNULL),COLORRED;转弱:IF(趋势<50,趋势,DRAWNULL),COLORGREEN;RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));DIFF:=EMA(CLOSE,2)-EMA(CLOSE,55);DEA:=EMA(DIFF,6);MACD:=2*(DIFF-DEA);转点:=IF(K>D AND CCI>0 AND DIFF>DEA AND MACD>0,1,0);STICKLINE(转点=1,50,50,2,0),COLORYELLOW;STICKLINE(转点=0,50,50,2,0),COLORCYAN;STICKLINE(C,90,90,1,0),COLORYELLOW;STICKLINE(C,10,10,1,0),COLORCYAN;判断:SMA(趋势,3,1),COLORYELLOW;IF(判断>50 AND 趋势>判断,判断,DRAWNULL ),COLORYELLOW,LINETHICK2;IF(判断<50 AND 趋势>判断,判断,DRAWNULL),COLORFF00FF;IF(判断>50 AND 趋势<判断,判断,DRAWNULL),COLORGREEN,LINETHICK2;风险区:80,COLORFF85FF,POINTDOT;安全区:20,COLORYELLOW,POINTDOT;顶部:90,COLORFFFF00;强弱线:50,COLORGREEN,POINTDOT;DRAWICON(CROSS(趋势,判断) AND 趋势<80 ,判断,1);DRAWICON(CROSS(趋势,顶部),顶部,2);LC:= REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;VAR2:=SMA(VAR1,9,1)+100;VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR4:=SMA(VAR3,3,1);VAR5:=SMA(VAR4,3,1)+100;VAR6:=VAR5-VAR2;趋势1: IF(VAR6>45,VAR6-45,0),COLOR00FFFF;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);VAR5Q:=LLV(LOW,30);VAR6Q:=HHV(VAR4Q,30);VAR7Q:=IF(MA(CLOSE,58),1,0);VAR8Q:=EMA(IF(LOW<=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/999*VAR7Q;火焰山:=IF(VAR8Q>100,100,VAR8Q);STICKLINE(火焰山>0,0 ,火焰山*1.2,3,0 ),COLOR4444FF;STICKLINE(火焰山>0,0 ,火焰山*1.2,2,0 ),COLOR7777FF;STICKLINE(火焰山>0,0 ,火焰山*1.2,1,0 ),COLOR9999FF;STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),3,0),COLOR000033;STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),2,0),COLOR000077;STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),1.5,0),COLOR0000BB;STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),1,0),COLOR0000DD;STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),3,0),COLOR003300;STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),2,0),COLOR007700;STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),1,0),COLOR00DD00;逃顶:=CROSS(82,RSI);STICKLINE( 逃顶,逃顶,20,3,0),COLORFF5500;STICKLINE( 逃顶,逃顶,30,2,0),COLORFF8800;STICKLINE( 逃顶,逃顶,30,1,0),COLORFFAA00;STICKLINE( 逃顶,逃顶,30,0.5,0),COLORFFCC00;D1:=(C+L+H)/3;D2:=EMA(D1,6);D3:=EMA(D2,5);BBUY:=CROSS(D2,D3);DRAWICON(BBUY,10,1);DRAWTEXT(CURRBARSCOUNT=129,50,'【金盾股票园】'),COLOR889999;VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;DRAWICON(CROSS(82,VARR1),10,2);DRAWTEXT(CROSS(82,VARR1),35,'减'),COLORYELLOW;神奇线选股:(CROSS(趋势,判断) AND 趋势<80),LINETHICK0;波段选股:(BBUY),LINETHICK0;抓主升浪(通达信抓波段主升浪指标)(该指标主要在牛市运用)HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;HHJSJDB:(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJ SJDA,5)+14*REF(HHJSJDA,6)+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJ DA,12)+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJ DA,18)+REF(HHJSJDA,20))/210,COLORYELLOW;HHJSJDC:MA(HHJSJDB,5),COLORRED;MA5:=MA(C,7),COLORWHITE;MA20:=MA(C,20),COLORFF00FF;MA90:MA(C,90),COLORFFCC66;Y1:=BARSLAST(CROSS(MA5,MA20)) AND MA5>MA20;Y2:=Y1 AND BARSLAST(CROSS(MA5,MA90));Y3:=Y2 AND CROSS(MA20,MA90);DRAWICON(Y3,L-0.10,1);DRAWTEXT(Y3,L-0.40,'双跨越'),COLORMAGENTA;F0:=BARSLAST(CROSS(MA(C,5),MA(C,90)));F1:=F0 AND BARSLAST(CROSS(MA(C,20),MA(C,90)));F2:=F1 AND CROSS(MA(C,5),MA(C,20)) AND MA(C,20)>MA(C,90); DRAWICON(F2,L-0.10,1);DRAWTEXT(F2,L-0.40,'双蹄奋起');MA51:=MA(C,5);MA10:=MA(C,10);MA201:=MA(C,20);MA30:=MA(C,30);MA60:=MA(C,60);MA120:=MA(C,120);FA:=BARSLAST(CROSS(MA10,MA51)) AND CROSS(MA51,MA10); FB:=FA AND MA51>MA30 AND MA10>MA30 AND MA10>REF(MA10,1); STICKLINE(FB,L,L-0.09,1,0),COLORYELLOW;DRAWTEXT(FB,L-0.13,'雄起'),COLORYELLOW;黄金线同花顺股市黄金线input:N(1,110,15);生命线:98,linethick1,coloryellow;生命禁区:95,linethick1,colorred;股价泥潭:20,linethick1,colorblue;生死线:50,linethick2,colorwhite;C0:=(H+L+C)/3;a1:=HHV(C0,n);a2:=LLV(C0,n);a3:=a1-a2;a4:=EMA((C0-a2)/a3,2)*100;b1:=HHV(C0,4*n);b2:=LLV(C0,4*n);b3:=b1-b2;b4:=EMA((C0-b2)/b3,2)*100;C1:=HHV(C0,16*n);C2:=LLV(C0,16*n);C3:=C1-C2;C4:=EMA((C0-C2)/C3,2)*100;短期:a4,colorgreen,linethick1;中期:b4,coloryellow,linethick2;长期:C4,colorred,linethick3;DRAWICON(CROSS(生命禁区,短期) AND REF(短期,1)>短期,短期*1.1,11);DRAWTEXT(CROSS(生命禁区,短期) AND REF(短期,1)>短期,短期*1.1,'←卖'), colorcyan;DRAWICON(CROSS(生命线,短期) AND REF(短期,1)>短期,短期*1.2,12);DRAWTEXT(CROSS(生命线,短期) AND REF(短期,1)>短期,短期*1.2,'←卖'), colorcyan;DRAWTEXT(CROSS(短期,生命禁区),85,'警惕!! '),colorwhite;DRAWTEXT(CROSS(中期,生命禁区),95,'减磅'),ColorFF6800;DRAWTEXT(CROSS(长期,生命禁区),100,'出局'),colormagenta;DRAWICON(CROSS(短期,生命禁区),85,4);DRAWICON(CROSS(中期,生命禁区),95,8);DRAWICON(CROSS(长期,生命禁区),100,3);使用说明:1、红色长期线在上,黄色生命线在中,绿色短期线在下往上穿,不能买。

51个优秀公式指标源码

51个优秀公式指标源码

51个优秀公式指标源码{短线套利主图}ma6:ma(c,6),colorwhite,linethick2;ma18:ma(c,18),color0099ff,linethick2;ma55:ma(c,55),colorff00FF;ma125:ma(c,125),colorffcc66;ma250:ma(c,250),colorblue;TY:=C;A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1);HD:=FILTER(C1,10);A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10);A:=REF(C,BARSLAST(HD)); B:=REF(C,BARSLAST(LD)); t1:=BARSLAST(HD)&lt;BARSLAST(LD) AND NOT(HD) ; t2:=BARSLAST(HD)&gt;BARSLAST(LD) AND NOT(LD); 波峰:IF(t1,A,A),ColorFF00FF,POINTDOT;STICKLINE(t1,A,A,9,0),ColorFF00FF;波谷:IF(t2,B,B),Color80FF00,POINTDOT;STICKLINE(t2,B,B,9,0),Color80FF00;买进价:=((c-ref(ma6,1))/6+ma6)*1.004;买进条件:=cross(c,买进价) and 买进价&gt;ref(买进价,1); 白K买进:IF(买进条件,l,h),COLORWHITE,POINTDOT; STICKLINE(买进条件,h,l,0,1),colorwhite,linethick2; STICKLINE(买进条件,o,c,4,1),colorwhite,linethick2;加码价:=((c-ref(ma18,1))/18+ma18)*1.004;加码条件:=cross(c,加码价) and 加码价&gt;ref(加码价,1); 黄K加码:IF(加码条件,l,h),coloryellow,POINTDOT; STICKLINE(加码条件,h,l,0,1),coloryellow,linethick2; STICKLINE(加码条件,o,c,4,1),coloryellow,linethick2;{[通达信]开发人自称价值200万的设置为主图}多:EMA(C,3),COLORYELLOW;空:EMA(C,5),COLOR00FF00;均衡:EMA(空,5),COLORWHITE,;VARF1:=COUNT(CROSS(多,均衡),2)=1;VARF2:=COUNT(CROSS(空,均衡),2)=1;ZAI:=FILTER(VARF1 AND VARF2,2);DRAWTEXT(ZAI,均衡,'主升↑'),COLORFF00FF;VV2:=REF(CLOSE,1);VV3:=SMA((CLOSE-VV2),6,1)/SMA(ABS(CLOSE-VV2),6,1)*100;DRAWICON(REF(VV3,1)&gt;81 AND VV3&lt;80,HIGH,2); DRAWTEXT(REF(VV3,1)&gt;81 ANDVV3&lt;80,HIGH*1.03,'沽空↓'),COLOR YELLOW;VF1:=MA(CLOSE,60)-MA(CLOSE,5)/3.2;DRAWTEXT(IF(CLOSE&lt;VF1 ANDVOL/240&gt;MA(VOL,5)/240 ANDCLOSE&gt;=REF(CLOSE,1)*1.08 ANDCLOSE&lt;MA(CLOSE,13)*1.3,1,0),LOW,''),COLORRED; VARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100; VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5); DRAWTEXT(IF(VOL&gt;=1.3*MA(VOL,5) ANDCOUNT(VARA&gt;=VARB ANDVARA&lt;-17,3) ANDREF(LOW,1)=LLV(LOW,120),1,0),LOW,'注意买入'); VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS( CLOSE-REF(C,1)),6,1)*100;DRAWICON(CROSS(82,VARR1),HIGH,2); DRAWTEXT(CROSS(82,VARR1),HIGH,'短空↓'),COLORYELLOW;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;HY3:=IF(COUNT(VAR3&lt;20,5)&gt;=1 ANDCOUNT(VAR1=LLV(VAR1,10),10)&gt;=1 ANDCLOSE&gt;=OPEN*1.038 ANDVOL&gt;MA(VOL,5)*1.2,1,0);DRAWTEXT(HY3,LOW,'注意买入'),COLORRED;S:=MA(VOL,5)/MA(VOL,60),COLORRED,,LINETHICK2; A:=MA(S,5),COLORGREEN,,LINETHICK2;BIAS:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;F:=MA(S,121);RSV:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW, 45))*100;K:=SMA(RSV,15,1);D:=SMA(K,15,1);J:=3*K-2*D;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC ),6,1)*100;DRAWTEXT(CROSS(84,RSI) , HIGH*1.06,'逃顶!'),COLORYELLOW ;S1:=IF((J&lt;11 AND BIAS&gt;-11 AND CROSS( S,F) AND(S-F)&gt;0.010),2,0),STICK,LINETHICK3,COLORGREEN; DRAWTEXT(S1=2,LOW,'关注'), COLORGREEN;中轨:HHV(MA(H,13),13),COLORRED,LINETHICK2;趋势:LLV(MA(H,13),1),COLORGREEN,LINETHICK2;{买卖指标}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*1 00&gt;100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C, 20))*100);AA10:MA(CLOSE,8),COLOR0000FF;AA12:MA(CLOSE,1 2),COLOR0000FF;BB10:=((ATAN((AA10- REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) *10);MA13:=MA(CLOSE,13);STICKLINE((((AA12 &lt;= AA10) AND (BB12 &gt;= 1)) AND (BB10 &gt;=1)),AA10,AA12,4,0),COLOR0080FF;STICKLINE((((AA12 &gt;= AA10) AND (BB10 &lt;= 1)) AND (BB10 &lt;=1)),AA10,AA12,4,0),COLOR00FF00;X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1, 13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13&gt;1 AND EMA(X1,13)&gt;REF(EMA(X1,8),1),10),EMA8,'∠45上升'),COLORWHITE;压力:MA(REF(HHV(C,30),1),2),COLOR9DFFFF;支撑:MA(REF(LLV(C,30),1),2),COLORABFF46;AA1:=AMOUNT/V;BB1:=L&lt;AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100&gt;1.2;DD1:=L&lt;MA( C,5)*0.921;EE1:=V&lt;MA(V,5)*1.5;FF1:=BB1 AND CC1 AND DD1 ANDEE1;DRAWTEXT(FF1,(LOW*0.99),'老鼠仓'),COLOR4080FF;A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5, 1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1); 黑马线:=EMA(A51,5);A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L, 21)))*100;趋势线:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2)); DRAWTEXT(CROSS(趋势线,0)AND 黑马线&lt;40,(HIGH* 0.97),'▲大黑马'),COLORYELLOW;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE -LC),0),3,1) /SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEX T(CROSS(FF,MA15),(LOW* 0.99),'底背离'),COLORA6E500;DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背离'),COLOR1880FF;VAR2:=LLV(LOW,27);VAR3:=HHV(HIGH,34);VAR4:=EMA ((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*25;注意买:=IF((VAR4&lt;10),80,100);RSV:=(C-LLV(L,9))/(HHV(H,9 )-LLV(L,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;超跌:=IF(J&lt;0,10,0);BDDD:=LLV(J,2)=LLV(J,8);买入:=IF(CROSS(J,REF(J+0.01,1)) AND BDDD ANDJ&lt;20,30,0);DRAWTEXT(买入AND 注意买=100 AND 超跌=0,LOW,'短线'),COLOR8000FF;MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA( EMA(ABS(MTM),6),6);买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX&lt;0,2) ANDCROSS(DX,MA(DX,2)),1,0);{天机均线}EMA250:MA(C,250),COLORRED;EMA6:MA(C,6),COLORRED LINETHICK2;EMA18:MA(C,18),COLORYELLOW;EMA55:MA(C,55),COLORFF00FF;EMA144:MA(C,144),COLORGREEN;EMA288:MA(C,288),COLORBLUE;中线【买入】:=COUNT(CLOSE&lt;EMA18,5)=4 AND CLOSE/EMA18&gt;1.004 AND CROSS(CLOSE,EMA18) AND EMA18&gt;=REF(EMA18,1),LINETHICK,COLORRED;DRAWTEXT(中线【买入】,LOW*0.95,' 中线【买入】'),COLORRED;VL:=REF(LOW,1);VAR12:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL ,0),13,1))*100;VAR14:=MA(VAR12,13);VAR15:=LLV(LOW,34);VAR18:=EMA(IF(LOW&lt;=VAR15,VAR14,0),3);VAR110:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH, 54)-LLV(LOW,54))*100,7,1),5,1);VAR111:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-L LV(LOW,54))*100,7,1)*16.18-VAR110*10.9;T:=FILTER(IF(VAR111&lt;=VAR110 ANDVAR18&gt;REF(VAR18,1),VAR18*8,0),20); DRAWTEXT(T,LOW-0.4,'←洗盘结束'),COLORFF00FF; DRAWTEXT(T,LOW-0.2,'|'),COLORFF00FF;VAR21:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LO W,36))*100;VAR22:=SMA(VAR21,3,1);VAR23:=SMA(VAR22,3,1);VAR24:=SMA(VAR23,3,1);VAR25:=CROSS(VAR23,VAR24) AND VAR23&lt;20; DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.4,'←抄底'),COLORRED;DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.2,'|'),COLORR ED;VAR29:=CROSS(VAR24,VAR23) AND VAR23&gt;80; DRAWTEXT(FILTER(VAR29,5)=1,HIGH+0.4,'←逃顶'),COLORBLUE;DRAWTEXT(FILTER(VAR29,5)=1,HIGH+0.2,'|'),COLORB LUE;{(使用说明:天机均线1.该指标有明确的抄底,逃顶,洗盘结束信号及中线买入信号;2.均线设置周期为250,6,18,55,144,288;3.如果144线向上,出现洗盘结束+抄底为低吸的好机会;4.超短线用5分钟周期,短线用60分钟周期;股市无对错,只有赢和赔! 指标无好坏,操作在个人!在此特别感谢一发千钧大师,本指标沿用了大师的部分理念截图三个,一个跨度较长,一个跨度较短,另一个为60分钟周期,其他自行验证;操作要领1.有时间盯盘的按15分钟短线波段操作,只做"吃鱼身子"的上升行情,2.没时间看盘的按60分钟做波段操作,也能将"鱼"吃干净.3.长线爱好者用周线选股可免盯,看盘之苦,安然做"投资"4.中线爱好者用日线选股可安然做波段,避免坐"电梯".5.短线爱好者用30分钟线看盘可享受"冲浪"的快乐,安全做"投机".6.超短线(头天进、二天出)的用5分钟看盘"永不套牢".7.高手中的高手用1分钟线盯盘可享受"权证"的盛宴,"痛并快乐着".操盘要点1.定位:量身定做一套发挥"自身条件"的操作方案,严守买卖纪律.2.定势:趋势方向的判定,信自己的"感觉",顺势者心自顺.3.定量:针对不同(个股)行情阶段,严控投入资金比例,进退自如,先立于不败之地.4.定律:破底莫入、破顶莫追}高胜算系统操盘线:MA(C,4),COLORRED,LINETHICK3;安全线:MA(C,19),COLORGRAY,LINESTICK,LINETHICK1;牛熊分界线:MA(C,200),COLORYELLOW,CIRCLEDOT,LINETHICK 1;DRAWTEXT(CROSS(安全线,操盘线),H*1.01,'←S卖出'),Color00FF00;DRAWTEXT(CROSS(操盘线,安全线),L*0.99,'←B买入'),Color00FFFF;STICKLINE(CROSS(操盘线,安全线) ANDBACKSET(CLOSE&gt;操盘线,2) AND(操盘线&gt;安全线) AND (CLOSE&gt;安全线),OPEN,CLOSE,2,1),COLORYELLOW;STICKLINE(CROSS(安全线,操盘线) ANDBACKSET(CLOSE&lt;操盘线,2) AND(操盘线&lt;安全线),OPEN,CLOSE,2,1);DRAWICON(CROSS(操盘线,安全线),L*0.98,1); DRAWICON(CROSS(安全线,操盘线),H*1,2);通达信主图公式:垂帘听股MA5:=MA(C,5);A:=(3*C+L+O+H)/6;垂帘:(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*R EF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+ 10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+ 5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/21 0,COLORRED,POINTDOT;听股:MA(垂帘,13),COLORFFCCCC,CIRCLEDOT;ZAR1:=SLOPE(EMA(CLOSE,2),5)*15+C;ZAR2:=EMA(ZAR1,5);ZARA:=EMA(EMA(EMA(EMA(EMA(EMA(EMA(EMA(ZAR 2,5),5),5),5),5),5),5),5);ZARB:=BARSLAST(CROSS(CLOSE,ZARA));ZARC:=BARSLAST(CROSS(ZARA,CLOSE)); STICKLINE(CLOSE&lt;ZARA,REF(CLOSE,ZARC),REF(C LOSE,ZARC),12,0),LINETHICK2,COLORFFCCCC; STICKLINE(CLOSE&gt;ZARA ANDCLOSE&gt;REF(CLOSE,ZARB),REF(CLOSE,ZARB),垂帘,0.2,0),COLORFFC8FF;STICKLINE(CLOSE&gt;ZARA ANDCLOSE&gt;REF(CLOSE,ZARB),REF(CLOSE,ZARB),REF (CLOSE,ZARB),12,0),COLORFFC8FF,LINETHICK2; {上涨:=0,COLORFFC8FF;}STICKLINE(CLOSE&lt;ZARA ANDCLOSE&lt;REF(CLOSE,ZARC),REF(CLOSE,ZARC),垂帘,0.2,0),COLOR00FF00;{止盈止损:0,COLOR00FF00;}VAR41:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(L OW,34)),3);VAR42:=EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3);VAR4A:=REF(VAR41,1)&gt;92 AND VAR41&lt;92; DRAWTEXT(VAR4A,H+0.12,'●短卖'),COLOR00FF00;STICKLINE(C&gt;=O,H,L,0,0),COLORRED; STICKLINE(C&lt;O,H,L,0,0),COLORFFFF52; STICKLINE(C&gt;=O,C,O,4,1),COLORRED; STICKLINE(C&lt;O,C,O,4,0),COLORFFFF52;MA13:MA(C,13),COLORWHITE,LINETHICK2;MA55:=MA(C,55),COLORFF00FF;MA125:=MA(C,125),COLORFFCC66;MA250:=MA(C,250),COLORBLUE;{STICKLINE(CROSS(MA5,听股) AND MA5&gt;听股AND C&gt;O,MA13,MA13-0.09,4,0),COLORYELLOW;} DRAWTEXT(CROSS(MA5,听股) AND MA5&gt;听股AND C&gt;O,MA13-0.12,'垂帘听股'),COLORWHITE;T:=BARSLAST(L&gt;REF(H,1));E:=COUNT(L&lt;REF(H,T+1),T)&lt;2;STICKLINE(L&lt;REF(H,T+1 ) ANDE,L,L-0.09,4,0),COLOR0099FF;DRAWTEXT(L&lt;REF(H,T+1 ) AND E,L-0.12,'缺口回补'),COLOR0099FF;VLL:=CROSS(MA(C,13),MA(C,21));DRAWTEXT(VLL,M A13,'●圆弧底'),COLORYELLOW;精品均线战法主图公式集{短线套利主图}ma6:ma(c,6),colorwhite,linethick2;ma18:ma(c,18),color0099ff,linethick2;ma55:ma(c,55),colorff00FF;ma125:ma(c,125),colorffcc66;ma250:ma(c,250),colorblue;TY:=C;A1:=REF(TY,10)=HHV(TY,2*10+1);B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1);HD:=FILTER(C1,10);A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);A:=REF(C,BARSLAST(HD));B:=REF(C,BARSLAST(LD));t1:=BARSLAST(HD)&lt;BARSLAST(LD) AND NOT(HD) ;t2:=BARSLAST(HD)&gt;BARSLAST(LD) ANDNOT(LD);波峰:IF(t1,A,A),ColorFF00FF,POINTDOT;STICKLINE(t1,A,A,9,0),ColorFF00FF;波谷:IF(t2,B,B),Color80FF00,POINTDOT;STICKLINE(t2,B,B,9,0),Color80FF00;买进价:=((c-ref(ma6,1))/6+ma6)*1.004;买进条件:=cross(c,买进价)and买进价&gt;ref(买进价,1);白K买进:IF(买进条件,l,h),COLORWHITE,POINTDOT; STICKLINE(买进条件,h,l,0,1),colorwhite,linethick2; STICKLINE(买进条件,o,c,4,1),colorwhite,linethick2;加码价:=((c-ref(ma18,1))/18+ma18)*1.004;加码条件:=cross(c,加码价)and加码价&gt;ref(加码价,1);黄K加码:IF(加码条件,l,h),coloryellow,POINTDOT; STICKLINE(加码条件,h,l,0,1),coloryellow,linethick2; STICKLINE(加码条件,o,c,4,1),coloryellow,linethick2;{指标要点:白K买进,黄K加码.指标原理:短线均线设为6日和18日。

通达信指标公式源码分时主图指标

通达信指标公式源码分时主图指标

通达信指标公式源码分时主图指标通达信是一款流行的股票行情软件,拥有丰富的指标公式库。

下面是一些常见的通达信指标公式源码,这些公式可以用于绘制分时主图指标。

1.均线:均线是最常见的技术指标之一,它代表了一段时间内的平均价格。

通达信中绘制均线的公式如下:MA(N):N日均线MA(N,X):N日均线,显示为实线,X为线宽度具体实现如下:MA(N):REF(C,N)MA(N,X):MA(N)其中,C代表收盘价,N代表计算的天数,REF函数是通达信的内置函数,用于获取前N天的数据。

2.成交量:成交量是衡量市场活跃度的指标之一,可以使用以下公式绘制成交量:VOL:成交量具体实现如下:VOL:V其中,V代表成交量。

3.平均成交量:平均成交量是一种相对成交量指标,可以用来衡量一些时间段内股票成交量的相对活跃程度。

在通达信中,可以使用以下公式绘制平均成交量:MAVG(VOL,N):N日平均成交量具体实现如下:MAVG(VOL,N):MA(VOL,N)其中,N代表计算的天数。

4.布林线:布林线是一种用来衡量股票价格波动性的指标,它由三条线组成,分别是上轨线、中轨线和下轨线。

在通达信中,可以使用以下公式绘制布林线:BOLL(M,N):中轨线UB(M,N,K):上轨线LB(M,N,K):下轨线具体实现如下:BOLL(M,N):MA(C,N)UB(M,N,K):MA(C,N)+K*STDEV(C,N)LB(M,N,K):MA(C,N)-K*STDEV(C,N)其中,C代表收盘价,M代表计算的天数,N代表计算的天数,K是标准差系数。

5.相对强弱指标(RSI):RSI是一种相对强弱指标,用于衡量市场的超买超卖情况。

在通达信中,可以使用以下公式绘制RSI:RSI(N):N日相对强弱指标具体实现如下:RSI(N):RSI(C,N)其中,C代表收盘价,N代表计算的天数。

以上是通达信中常见的分时主图指标公式源码,可以根据需要进行相应的调整和修改。

通达信指标源码大全

通达信指标源码大全

通达信指标源码大全通达信是国内知名的股票软件,其指标源码是广大股民和程序员所关注的热点之一。

本文将为大家详细介绍通达信指标源码的相关内容,希望能够对大家有所帮助。

一、通达信指标源码的概述。

通达信指标源码是指在通达信软件中所包含的各种技术指标的源代码。

这些指标包括但不限于均线、MACD、KDJ、RSI等,是股票分析中常用的技术工具。

通达信指标源码的开放,使得广大股民和程序员可以根据自己的需求对其进行定制和优化,从而更好地应用于实际的股票交易中。

二、通达信指标源码的编写语言。

通达信指标源码主要采用C语言进行编写。

C语言作为一种通用的高级语言,具有良好的可移植性和高效性,非常适合于编写金融软件中的指标计算模块。

通过C语言编写的通达信指标源码,可以在不同的平台上进行编译和运行,为用户提供了更大的灵活性和便利性。

三、通达信指标源码的优势。

通达信指标源码具有以下几个显著的优势:1. 开放性,通达信指标源码是开放的,用户可以自由获取和使用,可以根据自己的需要进行修改和定制。

2. 可扩展性,通达信指标源码可以根据用户的需求进行扩展和优化,满足不同用户的个性化需求。

3. 高效性,通达信指标源码采用C语言编写,具有高效的计算性能,可以在实时行情下快速进行指标计算。

4. 标准化,通达信指标源码遵循统一的编码规范和标准,便于用户进行学习和交流。

四、通达信指标源码的应用。

通达信指标源码可以广泛应用于股票软件开发、量化交易系统、自动交易系统等领域。

通过对通达信指标源码的学习和应用,用户可以深入理解各种技术指标的原理和计算方法,为自己的交易策略提供更加可靠的支持。

五、结语。

通过本文的介绍,相信大家对通达信指标源码有了更深入的了解。

通达信指标源码的开放和应用,为股民和程序员提供了更多的可能性和机会。

希望大家可以充分利用通达信指标源码,发挥自己的创造力,为股票交易领域带来更多的创新和进步。

技术分析指标源码

技术分析指标源码

技术分析指标源码1、密码线:MA25:MA(C,25);MA45:MA(C,45);MA318:MA(C,318);MA453:MA(C,453);MA610:MA(C,610);MA730:MA(C,730);MA888:MA(C,888);MA987:MA(C,987);MA99:MA(C,99);MA72:MA(C,72);MA144:MA(C,144);2、mtm1(副图):MTM:CLOSE-REF(CLOSE,82);MAMTM:MA(MTM,77);3、自动划线:HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY: =0;AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);QY:=BACKSET(AA,HIGHN+1);CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);DRAWICON(CC,H*1.02,2);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055 FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYEL LOW,POINTDOT;AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);QY1:=BACKSET(AA1,LOWN+1);CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);DRAWICON(CC1,L*0.98,1);DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK2;ZGSTAR:=(高点压力+低点支撑)/2;ZGEND:=CONST((高点压力+低点支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORF F55BB,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAG ENTA,POINTDOT,;DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYA N,POINTDOT;EMA13:=EMA(C,13),COLORWHITE;EMA21:=EMA(C,21),COLORYELLOW;EMA34:=EMA(C,34),COLORFF00FF;EMA60:=MA(C,60),COLORFFCC66;V AR2:=(2*CLOSE+HIGH+LOW)/4;V AR3:=IF(YEAR>=2099 AND MONTH>2,0,1);V AR4:=LLV(LOW,5); V AR5:=HHV(HIGH,4);散户:=EMA((VAR2-V AR4)/(V AR5-VAR4)*100,4)*V AR3;庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←低吸'),COLORLIRED; DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←高抛'),COLORGREEN; DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);V AR9:=CLOSE-REF(CLOSE,5);V ARA:=EMA(EMA(V AR9,5),5)/EMA(EMA(ABS(V AR9),5),5);V ARC:=EMA(EMA(V AR9,20),20)/EMA(EMA(ABS(V AR9),20),20);卖出:=IF(VARA>0 AND CROSS(V ARC,V ARA),90,100);DRAWICON(卖出<0,H+0.05,2); 买线:=EMA(CLOSE,2);卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW ;VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24 )*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;A0:=(L+H+C*2)/4;A1:EMA(A0,14)COLORBLUE,LINETHICK2;A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),C OLORMAGENTA{,LINETHICK2};逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),C OLORCY AN,{LINETHICK2};买入持股:IF(A1X>=0,A1,DRAWNULL)COLORRED,LINETHICK3;卖出空仓:IF(A1X<0 AND A2X<0,A1,DRAWNULL)COLORGREEN,LINETHICK3; STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;4、黑马:M1:MA(CLOSE,13),COLORYELLOW,LINETHICK2;M2:MA(CLOSE,34),LINETHICK2,COLORWHITE;M3:MA(CLOSE,55),COLORGREEN,LINETHICK2;{股旁网-股票公式网站}A:MA(C,5)COLORBLUE,LINETHICK3;B:=A<REF(A,1);IF(B-1,A,DRAWNULL)COLORRED,LINETHICK3;DRAWTEXT(LAST(C<O,3,0) AND LAST(VOL<REF(VOL,1),3,0),L*0.975,'三阴\N缩量\N一阳');DRAWTEXT(CROSS("DMI.PDI","DMI.MDI") AND CROSS("DMI.PDI","DMI.ADX") AND CROSS("DMI.PDI","DMI.ADXR") AND C>REF(C,1)*1.05 AND VOL>REF(VOL,1),L*0.975,'DMI\N捉暴涨');DRAWTEXT(LAST(MA(C,5)<MA(C,10),5,0) AND "I">REF("I",1) AND CROSS("I",-100),L*0.975,'CCI\N背离底');DRAWTEXT(LAST((H-L)/REF(C,1)<0.1,5,0) AND VOL>REF(VOL,1)*2 AND C>REF(C,1)*1.05,L*0.975,'一二一\N平台起');DRAWTEXT(LAST(MA(C,5)<MA(C,10),5,0) AND C>REF(C,1)*1.098,L*0.975,'山谷\N停板'); DRAWTEXT((LAST(C<O,6,3) AND LAST(C>O,2,0)) OR (LAST(C<O,6,3) AND C>O AND REF(C,1)<REF(O,1) AND REF(C,2)>REF(O,2)),L*0.975,'拨云\N见日');DRAWTEXT(CROSS((CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100,(CLOSE-MA(CLOSE,11))/ MA(CLOSE,11)*100) AND MA(C,40)>REF(MA(C,40),1),L*0.98,'BIAS\N绝密买点'); DRAWTEXT(C<O AND VOL>REF(VOL,1)*1.5 AND LAST(VOL<REF(VOL,1),5,1),L*0.975,'南天\N一柱');DRAWTEXT((C>O AND V>REF(V,1)*2.5 AND CROSS(C,MA(C,5))) OR (C>O AND V>REF(V,1)*10),L*0.975,'顶天\N立地');5、黄金分割:日:=150;昨前:=3;高2:=REF(HHV(H,日),昨前);低2:=REF(LLV(L,日),昨前);HH1:=高2-(高2-低2)*0.191;HH2:=高2-(高2-低2)*0.382;HH3:=高2-(高2-低2)*0.5;HH4:=高2-(高2-低2)*0.618;HH5:=高2-(高2-低2)*0.809;顶:REFDATE(高2,DA TE),POINTDOT,LINETHICK4,COLORYELLOW;零点191:REFDATE(HH1,DATE),COLORCY AN;零点382:REFDATE(HH2,DATE),COLORYELLOW;零点5:REFDATE(HH3,DA TE),COLORRED;零点618:REFDATE(HH4,DATE),COLORYELLOW;零点809:REFDATE(HH5,DATE),COLORCY AN;低:REFDATE(低2,DA TE),POINTDOT,LINETHICK4,COLORYELLOW;6、大小黑马:A11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑马线:=EMA(A11,5);A41:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趋势线:=(MA(3*SMA(A41,6,1)-2*SMA(SMA(A41,5,1),5,1),2));DRAWTEXT(CROSS(趋势线,0)AND 黑马线<40,50,'大黑马'),COLORFFFF00;{下面可以单独成立砸锅卖田买}趋势线1:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*130;AAA:=((REF(趋势线1,1)<REF(趋势线1,2) AND 趋势线1<-30) AND 趋势线1>=REF(趋势线1,1))OR (REF(CROSS(-30,趋势线1),1) AND CROSS(趋势线1,-30)) OR 趋势线1=-30; DRAWTEXT(AAA,75,'买'),COLORYELLOW;{股旁网-股票公式网站}买:IF(AAA,75,0),COLORYELLOW;{小黑马}A:=V*100/CAPITAL;小黑马:=MA(A,180);DIFF0:=(EMA(DCLOSE,12)-EMA(DCLOSE,26))*100;DEA0:=EMA(DIFF0,9);MACD0:=2*(DIFF0-DEA0);黑马:(MACD0>REF(MACD0,1)*2.5 AND MACD0>15),COLORFF00FF;STICKLINE(黑马,00,50,1.0,0),COLORMAGENTA;DRAWTEXT(黑马,20,'小黑马'),COLORWHITE;7、黑马顶底(副图):A0:=HHV(H,9)-LLV(L,9);A1:=HHV(H,9)-C;A2:=C-LLV(L,9);A3:= A1/A0*100-70;A4:=(C-LLV(L,60))/(HHV(H,60)-LLV(L,60))*100;A5:=(2*C+H+L)/4;A6:=SMA(A2/A0*100,3,1);A7:=LLV(L,34);A8:=SMA(A6,3,1)-SMA(A3,9,1);A9:=IF(A8>100,A8-100,0);AA:=HHV(H,34);AB:=A9*2;AC:=EMA((A5-A7) / (AA-A7)*100,13);AD:= EMA(0.667*REF(AC,1)+0.333*AC,2);AE:=SMA(A4,20,1);AF:=SMA(AB,2,1)-AB;B0:=EMA(0.667*REF(AC,1)+0.333*AC,2)-AC;B1:=(HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100- 70;B2:=SMA(B1,9,1)+100;B3:=(C-LLV(L,9))/(HHV(H,9)- LLV(L,9))*100;B4:=SMA(B3,3,1);B5:=SMA(B4,3,1)+100;B6:=B5-B2;B7:=IF(B6>60,B6-60,0);STICKLINE(REF(B7,1)<B7,B7,REF(B7,1),5,0),COLORRED;STICKLINE(REF(B7,1)>B7,B7,REF(B7,1),5,0),COLORFFFF00;主力:EMA((CLOSE-MA(CLOSE,7))/MA(CLOSE,7)*480,2),LINETHICK2,COLORRED;散户:EMA((CLOSE-MA(CLOSE,11))/MA(CLOSE,11)*480,7),LINETHICK2,COLORWHITE; DRAWTEXT(CROSS(主力,散户) AND 主力<-10,-20,'升'),COLORYELLOW;DRAWICON(CROSS(主力,散户) AND 主力<-10 AND 散户>REF(散户,1)OR CROSS(主力,散户) AND 散户<-35 ,-15,1);加速探底:IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,40,0.85),COLORYELLOW;机会来临1:REF(IF(REF(C,1)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,40,0),1),COLOR9999FF;A11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV( H,55)-LLV(L,55))*100,5,1);黑马线:=EMA(A11,5);{股旁网-股票公式网站}A21:=(黑马线-REF(黑马线,1))/REF(黑马线,1)*100;A31:=EMA(C,5);A41:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趋势线:=(MA(3*SMA(A41,6,1)-2*SMA(SMA(A41,5,1),5,1),2));A51:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*100;DRAWTEXT(FILTER(REF(黑马线,1)>90 AND A21<0,7),黑马线,'跑'),COLOR00FF00; DRAWTEXT(CROSS(A11,黑马线)AND 黑马线<A51,黑马线,'黑马'),COLORYELLOW; DRAWTEXT(CROSS(黑马线,A51)AND 趋势线<80,黑马线,'追涨'),COLOR688EC1;DRAWTEXT(CROSS(趋势线,0)AND 黑马线<40,5,'大黑马'),COLORFFFF00;底部:=(A21<-10 AND A21>REF(A21,1))*25;DRAWICON(底部AND A31>REF(A31,1),25,1);机会来临2:REF(IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,65,0),1),COLORF00FF0;8、三阳开泰(同大小黑马):A:=V*100/CAPITAL;小黑马:=MA(A,180);DIFF0:=(EMA(DCLOSE,12)-EMA(DCLOSE,26))*100;DEA0:=EMA(DIFF0,9);MACD0:=2*(DIFF0-DEA0);黑马:(MACD0>REF(MACD0,1)*2.5 AND MACD0>15),COLORFF00FF;STICKLINE(黑马,00,50,1.0,0),COLORMAGENTA;DRAWTEXT(黑马,20,'三阳开泰'),COLORWHITE;9、小马出击(副图):顶: 97,COLOR0000FF;趋势: 3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CL OSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),COLORFFFFFF;底:8;V AR1:=HHV(HIGH,9)-LLV(LOW,9);V AR2:=HHV(HIGH,9)-CLOSE;V AR3:=CLOSE-LLV(LOW,9);V AR4:=V AR2/VAR1*100-70;V AR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60));V AR6:=(2*CLOSE+HIGH+LOW)/4;V AR7:=SMA(V AR3/V AR1*100,3,1);V AR8:=LLV(LOW,34);V AR9:=SMA(V AR7,3,1)-SMA(V AR4,9,1);V AR10:=IF(VAR9>100,V AR9-100,0);V AR11:=HHV(HIGH,34);V AR12:=EMA((V AR6-V AR8)/(V AR11-V AR8)*100,13);V AR13:=EMA(0.667*REF(V AR12,1)+0.333*V AR12,2);V AR13,COLOR000000;STICKLINE(V AR12-V AR13>0,V AR12,V AR13,3,0),COLORRED;{股旁网-股票公式网站}STICKLINE(V AR12-V AR13<0,V AR12,V AR13,3,0),COLOR00FF00;A1:=HHV(HIGH,50)/LLV(LOW,100)>1.5;A2:=(HHV(HIGH,50)-LOW)/(HHV(HIGH,50)-LLV(LOW,100));A3:=(LOW-LLV(LOW,100))/(HHV(HIGH,50)-LLV(LOW,100));A4:=HHVBARS(HIGH,50)<LLVBARS(LOW,100);A5:=A1 AND A2>0.5 AND A3>0.3 AND A4;A6:=COUNT(A5,20)=1;反弹:IF(A6 AND A5 ,23,0),STICK,LINETHICK4,COLOR0000FF;DRAWTEXT(反弹,35,'反弹'),COLOR0000FF;V AR2W:=100-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14)); MW:= EMA(V AR2W,3);V AR3W:=EMA(V AR2W,7);M1:= EMA(V AR3W,5);MB1:=CROSS(MW,M1) AND M1<20;马池: IF(趋势<11,18,0),COLOR00FFFF,LINETHICK2;小马出击: IF(CROSS(趋势,底),50,0),COLOR0000FF,LINETHICK2; DRAWICON(LONGCROSS(趋势,顶,0 ),顶*1 ,2),COLORGREEN;10、金牌macd(副图):DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);DEA : EMA(DIFF,9);MACD : 2*(DIFF-DEA), COLORSTICK;D1:=EMA(C,3)-EMA(C,8);D2:=EMA(O,3)-EMA(O,8);D3:=EMA(H,3)-EMA(H,8);D4:=EMA(L,3)-EMA(L,8);DRAWICON(CROSS(D1,DIFF) AND DIFF<-0.05 ,D4-0.1,1);DRAWICON(CROSS(DIFF,D1) AND DIFF>0.1 ,D3+0.1,2);STICKLINE(D1>=D2,D1,D2,8,0),COLOR0055AA;STICKLINE(D1<=D2,D1,D2,8,0),COLOR006600;STICKLINE(D1>=D2,D1,D2,5,0),COLOR0077CC;STICKLINE(D1>=D2,D1,D2,3,0),COLOR0099DD;STICKLINE(D1>=D2,D3,D4,0,0),COLOR00BBFF;STICKLINE(D1<=D2,D1,D2,5,0),COLOR009900;STICKLINE(D1<=D2,D1,D2,3,0),COLOR00BB00;STICKLINE(D1<=D2,D3,D4,0,0),COLOR00EE00;11、w底(副图):QDIF:=EMA(CLOSE,12)-EMA(CLOSE,26);QDEA:=EMA(QDIF,9);QMACD:=(QDIF-QDEA)*2;M5:=MA(C,5);M10:=MA(C,10);M20:=MA(C,20);DXW1:=IF((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),1,0);{股旁网-股票公式网站}XH1:=IF(COUNT(DXW1,3)>0,1,0);RQ1:=BARSLAST(DXW1);RQ2:=REF(RQ1,RQ1+1)+RQ1+1;RQ3:=IF(RQ2-RQ1>6,1,0);ZBW:=IF(DXW1=1,QMACD<0 AND OPEN<M20 AND M5<REF(M5,1),0);WWMR:=SUM(ZBW,20);XG:IF(WWMR=2 AND RQ3 AND XH1,1,0);12、短线高手(副图):新年:STICKLINE(C>0,0,120,6,0),COLORFFB06C;STICKLINE(CLOSE>0,0,-50,6,0),COLORFFB000;DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);MACD :=1000* (2*(DIFF-DEA))/EMA(C,30);V AR2Q:=REF(LOW,1);V AR3Q:=SMA(ABS(LOW-V AR2Q),3,1)/SMA(MAX(LOW-V AR2Q,0),3,1)*100;V AR4Q:=EMA(IF(CLOSE*1.3,V AR3Q*10,V AR3Q/10),3);V AR5Q:=LLV(LOW,30);V AR6Q:=HHV(V AR4Q,30);V AR7Q:=IF(MA(CLOSE,58),1,0);V AR8Q:=EMA(IF(LOW<=V AR5Q,(V AR4Q+V AR6Q*2)/2,0),3)/618*VAR7Q;V AR9Q:=IF(VAR8Q>100,100,V AR8Q);{股旁网-股票公式网站}观景:STICKLINE(V AR9Q>-120,-50,V AR9Q-50,6,1),COLORYELLOW;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);AA55:=CEILING(SMA(AA5,13,8));AA6:=SMA(AA3,21,8);海市蜃楼:STICKLINE(AA55-AA6>85,110,115,15,1),COLORFFFFFF;RSV:= (CLOSE-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100;FASTK:=SMA(RSV,3,1);龙K:=SMA(FASTK,2,1);龙D:=SMA(龙K,5,1);L1:=(CLOSE-LLV(LOW,11))/(HHV(HIGH,11)-LLV(LOW,11))*50-50;狗:=LLV(LOW,10);年:=HHV(H,25);到来:=EMA((C-狗)/(年-狗)*4,4);恭喜:STICKLINE(CROSS(到来,0.3),-50,-10,10,0), COLOR00CCFF,LINETHICK1; STICKLINE(CROSS(到来,0.3),-30,-10,10,0),COLORRED,LINETHICK1;发财:STICKLINE(CROSS(3.5,到来),100,120,2,0), COLORRED,LINETHICK2;龙行凤影: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),LINETHICK0;双起双飞:IF(龙行凤影<=10,0,-50),COLOR0000FF,LINETHICK2;STICKLINE(MACD>=0,0,MACD,3,0),COLOR666666;STICKLINE(MACD>=0 AND MACD>REF(MACD,1),0,MACD,3,0),COLORAAAAAA; 百年好和:IF(MACD<0 AND MACD>REF(MACD,1),-MACD,0),STICK,COLOREAEAEA;STICKLINE(龙K>=龙D,龙D,龙K,5,0),COLOR000085;STICKLINE(龙K<龙D,龙D,龙K,5,0),COLOR324800;凤K:SMA(L1,3,1),COLORAACCAA;凤D:SMA(凤K,3,1),COLORAACCAA;13、波段操作:AAA:=(MA(CLOSE,13)+MA(CLOSE,17))/2;CCC:=(STD(CLOSE,13)+STD(CLOSE,17))/2;BBB:=AAA+2.1*CCC;DDD:=AAA+0.72*CCC;ZZZ:=IF(CCC>1.88,MA(DDD,3),DDD);{股旁网-股票公式网站}平衡:ZZZ;止赢:ZZZ*1.1;了结:ZZZ*1.05;回档:ZZZ*0.95;反弹:ZZZ*0.9;STICKLINE(平衡<REF(平衡,1) AND REF(平衡,1)<REF(平衡,2),平衡*1.005,平衡*0.995,9,0),COLORBLUE;14、kdj操作法(副图):买:=IF("KDJ.J"<0,10,0);条件:=CROSS(9.9,买);V AR1:=(2*CLOSE+HIGH+LOW)/4;V AR2:=LLV(LOW,5);V AR3:=HHV(HIGH,5);V AR4:=EMA((V AR1-V AR2)/(V AR3-V AR2)*100,5);MA1:=MA(VAR4,2);AA:STICKLINE(V AR4>MA1,V AR4,MA1,6,1),COLORRED;BBB:STICKLINE(V AR4>MA1 AND REF(V AR4,1)<30,V AR4,MA1,6,1),COLORRED; STICKLINE(V AR4<=MA1,V AR4,MA1,6,1),COLORFFCC66;DRAWICON(CROSS(9.9,买),V AR4-12,4);STICKLINE(CROSS(9.9,买),V AR4+5,MA1-4,6,1),COLORYELLOW;XXX:STICKLINE(V AR4>MA1 AND REF(V AR4,1)<30,V AR4+5,MA1-4,6,1),COLORYELLOW;15、趋势买卖:{参数:N 1 100 20;M 1 100 32;P1 1 200 80;P2 1 200 100 }V AR1:=(C+H+O+L)/4;卖出:XMA(V AR1,N)*(1+P1/1000),COLORGREEN,LINETHICK2;买入:XMA(V AR1,M)*(1-P2/1000),COLORMAGENTA,LINETHICK2;幅度:100*(卖出-买入)/买入,NODRAW;MA1:=MA(VAR1,3);STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),3,0),COLORGREEN;STICKLINE(卖出>MIN(C,O) AND 卖出<MAX(C,O),卖出,MAX(OPEN,CLOSE),3,0),COLORGREEN;STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,HIGH,0,0),COLORGREEN;STICKLINE(卖出<LOW,OPEN,CLOSE,3,0),COLORGREEN;STICKLINE(卖出<LOW,HIGH,LOW,0,0),COLORGREEN;STICKLINE(买入>LOW AND 买入<HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),3,0),COLORMAGENTA;STICKLINE(买入>MIN(C,O) AND 买入<MAX(C,O),买入,MIN(OPEN,CLOSE),3,0),COLORMAGENTA;STICKLINE(买入>LOW AND 买入<HIGH,买入,LOW,0,0),COLORMAGENTA; STICKLINE(买入>HIGH,OPEN,CLOSE,3,0),COLORMAGENTA;STICKLINE(买入>HIGH,HIGH,LOW,0,0),COLORMAGENTA;DRAWTEXT(CROSS(LOW,买入),LOW*0.95,'B'),COLORRED,LINETHICK2; DRAWTEXT(CROSS(卖出,HIGH),HIGH*1.02,'S'),COLORGREEN;。

超赢全套指标源码

超赢全套指标源码

(源码)超赢指标全套源码主力持仓HS:=vol/capital;DD:=BIGORDER(1,2)-BIGORDER(2,2);DT:=HS*DD*100;主力持仓: 50+Sum(DT,0),linethick2;当日增减度: DT, linethick0;STICKLINE(DT>0,主力持仓,主力持仓+DT,5,0),COLORRed; STICKLine(DT<0,主力持仓+DT,主力持仓,5,0),COLORGreen;当日成交 := (DT * capital) * DYNAINFO(11)/10000;买入手数 := (capital*DT)/100;净买比:买入手数/vol*100,linethick0;if (当日成交>=0) thenbeginStr1:= '净买入:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净买入:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;if 当日成交<0 thenbeginStr1:= '净卖出:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净卖出:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;DRAWFLAGTEXT(DT>=0,主力持仓,Str1+str2+str3),COLORRED; DRAWFLAGTEXT(DT<0,主力持仓,Str1+str2+str3),COLORGREEN;特大持仓HS:=vol/capital;DD:=BIGORDER(1,3)-BIGORDER(2,3);DT:=HS*DD*100;机构持仓: Sum(DT,0),linethick2;当日增减度: DT, linethick0;STICKLINE(DT>0,机构持仓,机构持仓+DT,5,0),COLORRed; STICKLine(DT<0,机构持仓+DT,机构持仓,5,0),COLORGreen;当日成交 := (DT * capital) * DYNAINFO(11)/10000;买入手数 := (capital*DT)/100;if (当日成交>=0) thenbeginStr1:= '净买入:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净买入:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;if 当日成交<0 thenbeginStr1:= '净卖出:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净卖出:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;DRAWFLAGTEXT(DT>=0,机构持仓,Str1+str2+str3),COLORRED; DRAWFLAGTEXT(DT<0,机构持仓,Str1+str2+str3),COLORGREEN;大户持仓HS:=vol/capital;DD:=(BIGORDER(1,2)-BIGORDER(2,2))-(BIGORDER(1,3)-BIGORDER(2,3)); DT:=HS*DD*100;大户持仓: 50+Sum(DT,0),linethick2;当日增减度: DT, linethick0;STICKLINE(DT>0,大户持仓,大户持仓+DT,5,0),COLORRed;STICKLine(DT<0,大户持仓+DT,大户持仓,5,0),COLORGreen;当日成交 := (DT * capital) * DYNAINFO(11)/10000;买入手数 := (capital*DT)/100;if (当日成交>=0) thenbeginStr1:= '净买入:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净买入:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;if 当日成交<0 thenbeginStr1:= '净卖出:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净卖出:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;DRAWFLAGTEXT(DT>=0,大户持仓,Str1+str2+str3),COLORRED; DRAWFLAGTEXT(DT<0,大户持仓,Str1+str2+str3),COLORGREEN;中户持仓HS:=vol/capital;DD:=(BIGORDER(1,1)-BIGORDER(2,1))-(BIGORDER(1,2)-BIGORDER(2,2)); DT:=HS*DD*100;中户持仓: 50+Sum(DT,0),linethick2;当日增减度: DT, linethick0;STICKLINE(DT>0,中户持仓,中户持仓+DT,5,0),COLORRed;STICKLine(DT<0,中户持仓+DT,中户持仓,5,0),COLORGreen;当日成交 := (DT * capital) * DYNAINFO(11)/10000;买入手数 := (capital*DT)/100;if (当日成交>=0) thenbeginStr1:= '净买入:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净买入:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;if 当日成交<0 thenbeginStr1:= '净卖出:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净卖出:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;DRAWFLAGTEXT(DT>=0,中户持仓,Str1+str2+str3),COLORRED; DRAWFLAGTEXT(DT<0,中户持仓,Str1+str2+str3),COLORGREEN;散户持仓HS:=vol/capital;DD:=-(BIGORDER(1,1)-BIGORDER(2,1));DT:=HS*DD*100;散户持仓: Sum(DT,0),linethick2;当日增减度: DT, linethick0;STICKLINE(DT>0,散户持仓,散户持仓+DT,5,0),COLORRed; STICKLine(DT<0,散户持仓+DT,散户持仓,5,0),COLORGreen;当日成交 := (DT * capital) * DYNAINFO(11)/10000;买入手数 := (capital*DT)/100;if (当日成交>=0) thenbeginStr1:= '净买入:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净买入:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;if 当日成交<0 thenbeginStr1:= '净卖出:'+ NUMTOSTRN(当日成交,0)+'万元,';Str2 := '净卖出:'+ NUMTOSTRN(买入手数,0)+'手,';Str3 := '当日增减度:' + NUMTOSTRN(DT,3);end;DRAWFLAGTEXT(DT>=0,散户持仓,Str1+str2+str3),COLORRED; DRAWFLAGTEXT(DT<0,散户持仓,Str1+str2+str3),COLORGREEN;资金流向一日资金流入:amount*BIGORDER(1,2)/10000,colorred,linethick0;一日资金流出:amount*BIGORDER(2,2)/10000,colorgreen,linethick0; 净额:一日资金流入-一日资金流出,linethick0;十日飘红:count(净额>0,10),colorred;连续飘红:last(净额>0);stickline(净额>0,0,净额,3,0),colorred,linethick2;stickline(净额<0,净额,0,3,0),colorgreen,linethick2;0,dotline,colorwhite;持仓统计:利用此指标可在动态显示牌排序HS:=vol/capital;DD:=BIGORDER(1,2)-BIGORDER(2,2);DT:=HS*DD*100;主力持仓: 50+Sum(DT,0);当日增减度: DT, linethick0;当日成交 := (DT * capital) * DYNAINFO(11)/10000;买入手数 := (capital*DT)/100;净买比:买入手数/vol*100,linethick0;一日增仓:Sum(DT,1);二日增仓:Sum(DT,2);三日增仓:Sum(DT,3);五日增仓:Sum(DT,5);十日增仓:Sum(DT,10);二十日增仓:Sum(DT,20);一日净买比:Sum(净买比,1);二日净买比:Sum(净买比,2);三日净买比:Sum(净买比,3);五日净买比:Sum(净买比,5);十日净买比:Sum(净买比,10);二十日净买比:Sum(净买比,20);。

最强抄底通达信指标公式源码

最强抄底通达信指标公式源码

最强抄底通达信指标公式源码抄底是股市中一种常见的交易策略,通达信是一款广泛使用的股市分析软件。

以下是一些在通达信中常用的指标公式源码,用于抄底策略。

1.均线指标源码:```MA(CLOSE,N):=AVE(CLOSE,N);```该指标计算n周期内的收盘价平均值。

2.RSI指标源码:```RSI(CLOSE,N):=BEGINLC:=REF(CLOSE,1);ROC:=CLOSE-LC;UP:=SUM(MAX(ROC,0),N);DOWN:=ABS(SUM(MIN(ROC,0),N));RSI:=UP/(UP+DOWN)*100;RSI;END;```该指标计算n周期内的相对强弱指数。

3.MACD指标源码:```EMAFast:=EMA(CLOSE, 12);EMASlow:=EMA(CLOSE, 26);DIF:=EMAFast - EMASlow;DEA:=EMA(DIF,9);MACD:(DIF-DEA)*2;```该指标由两条移动平均线和一个差离值构成,用于衡量买卖力量。

4.KDJ指标源码:```RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,M1,1);D:=SMA(K,M2,1);J:=3*K-2*D;```该指标由三条曲线构成,用于衡量股价走势的超买超卖情况。

5.威廉指标源码:```WMS:=100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N));```该指标用于衡量股价处于过买或过卖的程度。

这些是通达信中一些常见的指标公式源码,可用于抄底策略。

当然,抄底不只依赖于指标,还需要结合其他股市因素进行分析和判断。

通达信指标公式源码K线主图 主图指标 源码

通达信指标公式源码K线主图 主图指标 源码

源码如下:M5:MA(CLOSE,5);M10:MA(CLOSE,10);M20:MA(CLOSE,20);M30:MA(CLOSE,30);M60:MA(CLOSE,60);M120:MA(CLOSE,120);M250:MA(CLOSE,250);中线【买入】:=COUNT(CLOSE<M20,5)=4 AND CLOSE/M20>1.004 AND CROSS(CLOSE,M20) AND M20>=REF(M20,1),LINETHICK,COLORRED;DRAWTEXT(中线【买入】,LOW*0.95,' 中线【买入】'),COLORRED;VL:=REF(LOW,1);VAR112:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100;VAR114:=MA(VAR112,13);VAR115:=LLV(LOW,34);VAR118:=EMA(IF(LOW<=VAR115,VAR114,0),3);VAR110:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1); VAR111:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR 110*10.9;T:=FILTER(IF(VAR111<=VAR110 AND VAR118>REF(VAR118,1),VAR118*8,0),20); DRAWTEXT(T,LOW-0.5,'←洗盘结束'),COLORFF00FF;DRAWTEXT(T,LOW-0.3,'|'),COLORFF00FF;VAR21:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR22:=SMA(VAR21,3,1);VAR23:=SMA(VAR22,3,1);VAR24:=SMA(VAR23,3,1);VAR25:=CROSS(VAR23,VAR24) AND VAR23<20;DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.5,'←抄底'),COLORRED;DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.3,'|'),COLORRED;VAR29:=CROSS(VAR24,VAR23) AND VAR23>80;DRAWTEXT(FILTER(VAR29,5)=1,HIGH+0.5,'←逃'),COLORGREEN;JG:=CROSS(M5,M10);VOLUME:=VOL,VOLSTICK;MAVOL1:=MA(VOLUME,5);MAVOL2:=MA(VOLUME,10);NL:=CROSS(MAVOL1,MAVOL2);DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);MACD:=(DIF-DEA)*2,COLORSTICK;NA:=CROSS(DIF,DEA);RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,9,1);D:=SMA(K,9,1);J:=3*K-2*D;KD:=CROSS(K,D) AND CROSS(J,D);一招定乾坤:DRAWTEXT((JG AND NL AND NA) OR (JG AND NL AND KD) OR(JG AND NA AND KD) OR (NL AND NA AND KD),L*0.95,'←一招定乾坤'),COLORYELLOW; X:=LLV(J,2)=LLV(J,8);Y:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,30,0);DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW*0.98,'←短进'),COLORLIMAGENTA;空:=EMA(C,5);均衡:=EMA(空,5);中轨:=HHV(MA(H,13),13);VAR5:=FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11); DRAWTEXT(VAR5,L*0.98,'←追涨'),COLORRED;PT:=EMA(H,20);PAN:=EMA(CLOSE,7);RUO:=MEMA(CLOSE,3);DRAWICON(LONGCROSS(PAN,RUO,0.25) AND PT>H ,L*0.98,1);VARC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;DRAWTEXT(CROSS(84,VARC),H*1.01,'逃'),COLORYELLOW ;AAA:=CONST(HHV(H,90));R1:=MA(CLOSE,1);R2:=MA(CLOSE,3);R3:=(MA(R2,1)*1);R4:=(MA(R2,3)*1);DRAWTEXT(CROSS(R3,R4),(LOW-0.1),'进场'),COLORYELLOW;A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV (H,55)-LLV(L,55))*100,5,1);LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'出局'),COLORGREEN;VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VAR12:=(HIGH+LOW+CLOSE)/3;VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));VAR15:=IF(VAR13>=150 AND VAR13<200 AND VAR14>=150 AND VAR14<200,10,0); VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200,-10,VAR15);VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VAR18:=100-ABS(VAR17);VAR19:=IF(VAR18<90,VAR18,100);VAR1A:=IF(VARE>0,VARE,0);VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,HIGH*1.02,'大笔出货'),LINETHICK1,COLORFFCC66;AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;老鼠仓:=BB1 AND CC1 AND DD1 AND EE1,LINETHICK0;DRAWTEXT(老鼠仓,(LOW* 0.99),'老鼠仓'),COLOR40CCFF;A75:=(CLOSE > M5);A76:=(M5 > M10);A77:=(CLOSE > M10);A78:=(M5 > M20);A79:=(CLOSE > M20);A710:=REF(M20,1);A711:=(M20 > A710);AVX:=(((((IF(A75,10,(0 - 10)) + IF(A76,10,(0 - 10))) + IF(A77,10,(0 - 10)))+ IF(A78,10,(0 - 10))) + IF(A79,10,(0 - 10))) + IF(A711,10,(0 - 10)));DSLX:=(CLOSE / INDEXC);DSLX1:=MA(DSLX,5);DSLX2:=MA(DSLX,10);V1:=MA(VOL,5);V2:=MA(VOL,10);T1:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T2:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T3:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 > V2)) AND (DSLX < DSLX1)),1,0));T4:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)),1,0));T5:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T6:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T7:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T8:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T9:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T10:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T11:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T12:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T13:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T14:=CONST(IF( C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T15:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T16:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T17:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 >= V2)),1,0));T18:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 >= V2)),1,0));T19:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 < V2)),1,0));T20:=CONST(IF(C>200 AND (CROSS(1,AVX) AND (V1 >= V2)),1,0));T21:=CONST(IF(C>200 AND (CROSS(1,AVX) AND (V1 < V2)),1,0));T22:=CONST(IF(C>200 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)),1,0));T23:=CONST(IF(C>200 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)),1,0)); T24:=CONST(IF(C>200 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)),1,0)); T25:=CONST(IF(C>200 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)),1,0)); DRAWTEXT(T1=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'量能理想,明显走强,中线参与,仓位在2/3左右。

各种指标源码范文

各种指标源码范文

各种指标源码范文以下是一些常见的指标源码,用于计算不同方面的数据指标。

1. 平均值(Mean):```pythondef mean(data):sum = 0count = 0for d in data:sum += dcount += 1return sum / count```2. 中位数(Median):```pythondef median(data):sorted_data = sorted(data)n = len(sorted_data)if n % 2 == 0:return (sorted_data[n//2 - 1] + sorted_data[n//2]) / 2else:return sorted_data[n//2]```3. 众数(Mode):```pythondef mode(data):from collections import Countercounter = Counter(data)max_count = max(counter.values()return [k for k, v in counter.items( if v == max_count] ```4. 方差(Variance):```pythondef variance(data):mean_val = mean(data)squared_diff_sum = sum([(d - mean_val)**2 for d in data]) return squared_diff_sum / len(data)```5. 标准差(Standard Deviation):```pythondef std_deviation(data):return variance(data) ** 0.5```6. 相关系数(Correlation Coefficient):```pythondef correlation_coefficient(x, y):mean_x = mean(x)mean_y = mean(y)n = len(x)sum_xy = sum([xi*yi for xi, yi in zip(x, y)])sum_xx = sum([(xi - mean_x)**2 for xi in x])sum_yy = sum([(yi - mean_y)**2 for yi in y])return (sum_xy - (n * mean_x * mean_y)) / ((sum_xx * sum_yy) ** 0.5)```7. 百分位数(Percentile):```pythondef percentile(data, p):sorted_data = sorted(data)n = len(sorted_data)k=(n-1)*pf = math.floor(k)c = math.ceil(k)if f == c:return sorted_data[int(k)]else:return sorted_data[int(f)] * (c - k) + sorted_data[int(c)] * (k - f)```8. 四分位数(Quartiles):```pythondef quartiles(data):q1 = percentile(data, 0.25)q2 = percentile(data, 0.5)q3 = percentile(data, 0.75)return q1, q2, q3```以上是一些常见的指标计算方法的源代码。

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

简单提示买入: ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2), COLORRED; 卖出: ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2),COLORF0F000;W.135套利MA1:MA(CLOSE,5); MA2:MA(CLOSE,13); MA3:MA(CLOSE,34); MA4:MA(CLOSE,55); MA5:MA(CLOSE,250); V AR3:=LLV(HIGH,240); V AR4:=100*(CLOSE-VAR3)/V AR3; V AR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;V AR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;V AR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)* 100;V AR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1) *100; V AR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0); V AR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3); V AR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3); V AR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3); V AR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3); V AR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3); V AR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3); V AR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3); V AR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3); V AR19:=EMA(CLOSE,2)-EMA(CLOSE,150); 买1:=VAR10; 买2:=(V AR11+V AR13+V AR15+V AR17); 卖1:=(V AR12+V AR14+V AR16+VAR18); DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'←买'),COLORRED; DRAWTEXT(卖1>0,HIGH*1.02,'←卖'),COLORGREEN; V AR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); V AR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); V AR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34)); JJ:=(CLOSE+HIGH+LOW)/3; A:=EMA(JJ,10); B:=REF(A,1); STICKLINE(A>B ,A ,B ,10 ,0 ),COLOR0000CC; STICKLINE(A<B ,B ,A ,10 ,0 ),COLOR00ff00;收益宝Var1:((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*10 0+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3; 0, VOLSTICK; 拉升%: IF(Var1>0,Var1,0), , COLORred; 短顶: STICKLINE(Var1>9 AND FILTER(Var1< REF(Var1,1),5),Var1+2,0,3,0), , COLORRED; 大顶: STICKLINE(Var1>20 AND FILTER(Var1< REF(Var1,1),5),Var1+5,0,7,0), , COLORCY AN; Var2:=HHV(Var1>20,10); 危险: STICKLINE(Var2 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),Var1+10,0,4,0); 注意止损: STICKLINE(Var2 AND FILTER(Var1< REF(Var1,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),V ar1+6,0,3,0); 短底: STICKLINE(Var1<-9 AND Var1> REF(Var1,1),Var1-2,0,3,0), , COLORgreen; 大底: STICKLINE(Var1<-20 AND FILTER(Var1> REF(Var1,1),5),Var1-5,0,7,0), , COLORyellow; 买入准备:Var1<-9 AND Var1> REF(Var1,1);买卖决策V AR1:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21)))); V AR2:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21)))); V AR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34)); DRAWICON(CROSS(V AR2,MA(V AR3,6)),(LOW * 0.998),2); DRAWICON(CROSS(MA(V AR3,6),V AR1),(HIGH * 1.013),1); DRAWTEXT(CROSS(V AR2,MA(V AR3,6)),(LOW * 0.984),'买入'),color4440FF; DRAWTEXT(CROSS(MA(V AR3,6),V AR1),(HIGH * 1.035),'卖出'),colorFFFF34; 年:MA(CLOSE,26),COLORGREEN;特殊会员专用指标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)and c<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;大底来: 0,POINTDOT;大底: 0,POINTDOT;DRAWTEXT(cross(跨越,机构做空能量线) ,大底+40,'进入强势区域'),coloryellow,linethick1; DRAWTEXT(cross(特殊会员专用,跨越) ,大底+20,'进入拉升区域'),linethick1;DRAWTEXT(cross(跨越,特殊会员专用) ,大底+70,'注意调整'),COLORFFAA66,linethick1;●注意买入点: DRAWTEXT(REF(CROSS(机构做空能量线,跨越),25) AND 机构做空能量线>1.005*跨越,跨越,'●<-注意买入点'),COLORBLUE,linethick1;★逢低买入: DRAWTEXT(REF(CROSS(跨越,特殊会员专用),82) AND 跨越>1.3*特殊会员专用,特殊会员专用,'★<<-逢低买入'),linethick1;★低买: DRAWTEXT(REF(CROSS(特殊会员专用,跨越),1) AND 特殊会员专用>1.3*跨越,跨越,'★低买'),COLORRED,linethick1;主力建仓V1:=(C*2+H+L)/4*10;V2:=EMA(V1,13)-EMA(V1,34);V3:=EMA(V2,5);V4:=2*(V2-V3)*5.5;主力: IF(V4>=0,V4,0),color10FFF;出场:IF(V4<=0,V4,0),colorgreen;V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;V6:=EMA(3*V5-2*SMA(V5,18,1),5);V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;V8:=(INDEXC*2+INDEXH+INDEXL)/4;V9:=EMA(V8,13)-EMA(V8,34);V A:=EMA(V9,3);VB:=(V9-VA)/2;Var2:=REF(LOW,1);Var3:=SMA(ABS(LOW-Var2),13,1)/SMA(MAX(LOW-Var2,0),13,1)*100;Var4:=EMA(IF(CLOSE*1.2,Var3*13,Var3/13),13);Var5:=LLV(LOW,34);Var6:=HHV(Var4,34);Var7:=IF(LLV(LOW,56),1,0);Var8:=EMA(IF(LOW<=Var5,(Var4+Var6*2)/2,0),3)/618*Var7;Var9:=EMA(CLOSE,5);Var10:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*(-10);STICKLINE(Var9>REF(Var9,1),0,V ar9*0.25,4,0),color10E410;减仓:IF(Var9>REF(Var9,1),Var9*0.25,0),color10E410,STICK;STICKLINE(Var9<REF(Var9,1),0,V ar9*0.25,4,0),color1010FF;增仓:IF(Var9<REF(Var9,1),Var9*0.25,0),color1010FF,STICK;STICKLINE(Var8>REF(Var8,1),0,V ar8,4,0),color10FFFF;主力2:IF(Var8>REF(Var8,1),Var8,0),color10FFFF,STICK;STICKLINE(Var8<REF(Var8,1),0,V ar8*1.5,4,0),colorFFF810;力度:Var10*0.2,colorFF7676;XL1:=MA(LOW,2)*0.96;XL2:=MA(LOW,26)*0.85;XL3:=REF(XL1,1)<XL2 AND REF(XL1,1)<XL1 AND REF(XL1,1)<REF(XL1,2); STICKLINE(XL3,0,Var8*3,4,0),Color006EFF;DRAWTEXT(XL3,Var8*3.5,'买'),COLORFF00FF;资金: IF(VB>=0,VB,0),Coloryellow;流出: IF(VB<=0,VB,0),colorblue; V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/( HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势: EMA(V11,3);V12:=(趋势-REF(趋势,1))/REF(趋势,1)*100;准备: STICKLINE(趋势<=13,0,20,5,0),colorcc9900;aa:=(趋势<=13) and filter((趋势<=13),15),colorcc9900;主力建仓: STICKLINE(趋势<=13 AND V12>13,0,50,5,0),color0099ff;bb:= (趋势<=13 AND V12>13) and filter((趋势<=13 AND V12>13),10);drawtext (bb,60,'主力建仓'),color0099ff;主力出货: STICKLINE(趋势>=90 AND V12,0,30,5,0),colorgray;cc:=(趋势>=90 AND V12) and filter((趋势>=90 AND V12),10);drawtext (cc,40,'主力出货'),colorgray;资金导航线AA:=((VOL * (((2 * CLOSE) + HIGH) + LOW)) / 4);BB:=LLV(LOW,21);CC:=HHV(HIGH,21);A:=EMA((((AA - BB) / (CC - BB)) * 100),13);B:=EMA(((0.667 * REF(A,1)) + (0.333 * A)),3);资金进场:STICKLINE((A > B),A,B,7,1),colorFF;资金退场:STICKLINE((A < B),A,B,7,0),colorFFFF00;导航线:EMA(A,3);看盘线:EMA(A,8);生命线:EMA(A,21);趋势线:EMA(A,55);((导航线> REF(导航线,1))),LINETHICK2,colorFF;((导航线< REF(导航线,1))),LINETHICK2,colorFF00新kdjVar1:=(H+L+O+C*2)/5;Var2:=EMA(Var1,21);Var3:=STD(Var1,23);Var4:=EMA(Var1,2);VarA:=(Var1-Var2)*100/Var3;K:(EMA(VarA,23)+100)/2-3,colorred;D:sma(K,5,1),COLORYELLOW;if(k>d,k,0),circledot,colorred,linethick2;if(k<d,k,0),circledot,colorgreen,linethick2;J:4*K-3*D,COLORff00ff,linethick2;if(j>d,j,0),circledot,colorff00ff,linethick2;if(j<d,j,0),circledot,colorffff00,linethick2;DRAWICON(FILTER(J>ref(J,1)and J<ref(J,3) AND J<K AND Var4>REF(Var4,1)AND K>=REF(K,1)AND J<40 OR CROSS(J,K)AND CROSS(J,D) AND J<40 OR J>ref(J,1)and J<-20,7), J*0.8,1);DRAWICON(FILTER(J<=ref(J,1) AND J>80,8), J*1.2,2);极品波段DIFF:=EMA(C,5)-EMA(C,20);DEA:=EMA(DIFF,10);MACD:600*(DIFF-DEA)/EMA(C,30), COLORRED ,POINTDOT;RSV:=(C-LLV(L,20))/(HHV(H,20)-LLV(L,20))*100;FK:=SMA(RSV,5,1);K20:SMA(FK,3,1), POINTDOT, COLORYELLOW;D20:SMA(K20,3,1), POINTDOT, COLORFF9999;STICKLINE(K20>=D20,D20,K20,3,0),COLORFF00FF;STICKLINE(K20<=D20,D20,K20,3,0),COLORFFFF00;V1:=LLV(LOW,10);V2:=HHV(H,25);价位线:=EMA((C-V1)/(V2-V1)*4,4);买入:STICKLINE(CROSS(价位线,0.3),50,5,2,0), COLOR00CCFF,LINETHICK1; STICKLINE(CROSS(价位线,0.3),30,5,2,0),COLORRED,LINETHICK1;卖出:STICKLINE(CROSS(3.5,价位线),60,100,2,0), COLORRED,LINETHICK2;STICKLINE(CROSS(3.5,价位线),80,100,2,0), COLORFF9900,LINETHICK2;DRAWTEXT(CROSS(价位线,0.3),55,'买'),COLORF00FF0;DRAWTEXT(CROSS(3.5,价位线),55,'卖'),COLOR00FF00;V AR2Q:=REF(LOW,1);V AR3Q:=SMA(ABS(LOW-V AR2Q),3,1)/SMA(MAX(LOW-V AR2Q,0),3,1)*100;V AR4Q:=EMA(IF(CLOSE*1.3,V AR3Q*10,V AR3Q/10),3);V AR5Q:=LLV(LOW,30);V AR6Q:=HHV(V AR4Q,30);V AR7Q:=IF(MA(CLOSE,58),1,0);V AR8Q:=EMA(IF(LOW<=V AR5Q,(V AR4Q+V AR6Q*2)/2,0),3)/618*V AR7Q;V AR9Q:=IF(VAR8Q>100,100,V AR8Q);吸筹:STICKLINE(V AR9Q>-120,0,V AR9Q,6,1),COLORYELLOW;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);卖临界: STICKLINE(走势-AA6>85,98,90,15,1),COLORFFFF00;何时建仓V1:=(C*2+H+L)/4*10;V2:=EMA(V1,13)-EMA(V1,34);V3:=EMA(V2,5);V4:=2*(V2-V3)*5.5;主力撤: IF(V4<=0,V4,0),colorgreen;主力进: IF(V4>=0,V4,0);V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;V6:=EMA(3*V5-2*SMA(V5,18,1),5);V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;V8:=(INDEXC*2+INDEXH+INDEXL)/4;V9:=EMA(V8,13)-EMA(V8,34);V A:=EMA(V9,3);VB:=(V9-VA)/2;大盘资金进场: IF(VB>=0,VB,0),Coloryellow;大盘资金撤走: IF(VB<=0,VB,0),colorblue; V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/( HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势线: EMA(V11,3);V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;准备现金: STICKLINE(趋势线<=13,0,20,5,0),colorcc9900;aa:=(趋势线<=13) and filter((趋势线<=13),15);drawtext (aa,30,'准备现金'),colorcc9900;买入股票: STICKLINE(趋势线<=13 AND V12>13,0,50,5,0),color0099ff;bb:= (趋势线<=13 AND V12>13) and filter((趋势线<=13 AND V12>13),10);drawtext (bb,60,'买入股票'),color0099ff;见顶清仓: STICKLINE(趋势线>=90 AND V12,0,30,5,0),colorgray;cc:=(趋势线>=90 AND V12) and filter((趋势线>=90 AND V12),10);drawtext (cc,40,'见顶清仓'),colorgray;精确顶底箱顶:hhv(ma((low+high+close+o)/4,5),58),color00aaff;箱底:llv(ma((low+high+close+o)/4,6),88),colorgreen;var2:=ema((high+low+close)/3*(hhv(high,10)-close)/(hhv(high,10)-llv(low,10))*20/10+箱底,2); var3:=(3*var2-2*sma(var2,5,1))*0.3;var4:=(hhv(indexh,13)-indexc)/(hhv(indexh,13)-llv(indexl,13));var5:=ema(3*var4-2*sma(var4,18,1),5);var6:=(indexc-llv(indexl,8))/(hhv(indexh,8)-llv(indexl,8));var7:=3*sma(var6,3,1)-2*sma(sma(var6,3,1),5,1);var8:=(indexc*2+indexh+indexl)/4;var9:=ema(var8,13)-ema(var8,34);vara:=ema(var9,5);资金流向:=(var9-vara+箱底)*1,coloryellow;varg1:=1.86*ema(close,5)-ema(close,13);趋势力度:varg1,colorffaa99;as:=箱底;牛气冲天:stickline( 趋势力度>=as,as ,趋势力度,4 ,0 ) ,colorred ;stickline( 趋势力度<= ref(趋势力度,1)and 趋势力度>as,as ,趋势力度,4 ,1 ) ,colorwhite;趁机派发:stickline( ref(趋势力度,2)<ref(趋势力度,1) and 趋势力度<= ref(趋势力度,1) and 趋势力度>as,as ,趋势力度,4 ,0 ) ,colorgreen ;熊气盖天:stickline( 趋势力度<as-0.5,as-0.5 ,趋势力度,8 ,1 ) , ;ma3:ma(c,3),coloraaee00;ma21:ma(c,21),colorwhite;drawtext( cross(ma3 , 箱底),l , '试'),colorred;drawtext( cross(ma3 , ma21),l , '买'),coloryellow;drawtext( cross(ma3 , 箱顶) and c>箱顶,箱顶, '追'),color00eeaa;drawtext( cross(箱顶,ma3)and c<箱顶,h , '卖') ,colorffaa99;drawtext( ref(资金流向,2)<ref(资金流向,1) and ref(资金流向,1)>资金流向and 资金流向>箱顶and c>箱顶,h*1.0051, '顶'),colorwhite;drawtext( cross(趋势力度, 箱底),箱底, '加仓'),colorred;火焰王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+V ar5*0.96+Var6*0.96+Var1*0.558+Var2*0.558+Var3*0.558)/6,21); Var8:=EMA((Var4*1.25+V ar5*1.23+Var6*1.2+Var1*0.55+V ar2*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+V ar9)/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;火焰火焰: STICKLINE(火焰山>0,0,火焰山,4,1);今量: 火焰山;STICKLINE(火焰山>0,0,今量*1.2,8,0) COLOR0000ff;STICKLINE(火焰山>0,0,今量*0.8,8,0) COLOR0066ff;STICKLINE(火焰山>0,0,今量*0.6,8,0) COLOR0099ff;STICKLINE(火焰山>0,0,今量*0.4,8,0) COLOR00ccff;STICKLINE(火焰山>0,0,今量*0.2,8,0) COLOR00ffff;: 、金牌买卖V AR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70; V AR2:=SMA(V AR1,9,1)+100;V AR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;V AR4:=SMA(V AR3,3,1);V AR5:=SMA(V AR4,3,1)+100;V AR6:=V AR5-V AR2;趋势: IF(VAR6>45,V AR6-45,0);STICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),5,0),colorff00ff; STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),5,0),color00ff00;强弱分界:50,POINTDOT,Colorffffcc;0,Color00Ffff;20,POINTDOT,COlORFFAA66,linethick1;80,POINTDOT,COlORFFAA66,linethick1;100,Colorffff33;v1:=llv(low,10);v2:=hhv(h,25);价位线:=ema((c-v1)/(v2-v1)*4,4);DRAWTEXT(CROSS(价位线,0.3),7,'●'),ColorFFFfff;DRAWTEXT(CROSS(3.5,价位线),102,'●'),ColorFFFfff;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);Var5q:=LLV(LOW,30);Var6q:=HHV(Var4q,30);Var7q:=IF(MA(CLOSE,58),1,0);Var8q:=EMA(IF(LOW<=V ar5q,(Var4q+Var6q*2)/2,0),3)/618*Var7q;Var9q:=IF(Var8q>100,100,Var8q);吸筹:STICKLINE(Var9q>-120,0,V ar9q,6,1),coloryellow;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);卖临界:STICKLINE(走势-AA6>85,103,100,15,1),Color0000ff,linethick2; N:=9;M1:=3;M2:=3;P:=9;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,M1,1),COLORRED,LINETHICK2;D:=SMA(K,M2,1),COLOR00FF00;JJ:=P*(3*D-2*K),COLOR00FF00;J:=((3 * K) - (2 * D));MAIRU:= CROSS(K,D) AND K<20;MAICHU:= CROSS(D,K) AND D>80;V AR2:=REF(LOW,1);V AR3:=SMA(ABS(LOW-V AR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;V AR4:=EMA(IF(CLOSE*1.3,V AR3*10,V AR3/10),3);V AR5:=LLV(LOW,13);V AR6:=HHV(V AR4,13);V AR7:=IF(MA(CLOSE,34),1,0);V AR8:=EMA(IF(LOW<=V AR5,(V AR4+V AR6*2)/2,0),3)/618*V AR7;V AR9:=IF(VAR8>100,100,V AR8);吸筹:V AR9,LINETHICK2,COLORF00FF0;STICKLINE(V AR9>-120,0,V AR9,8,1),COLORF00FF0;快线:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,LINETHICK2,COLORRED; 慢线:SMA(快线,M1,1);空:SMA(慢线,M2,1),COLOR00FF00;牛股:IF(BARSLAST(CROSS(慢线,空))<P AND CROSS(慢线,空) AND 慢线<20,90,0),STICK,COLORFF937F;STICKLINE(牛股,0,90,1,0),COLORFF937F;BB:=IF(BARSLAST(CROSS(慢线,快线))>=3 AND CROSS(快线,慢线) AND 慢线<30,20,0); STICKLINE(BB,0,20,7,1),COLORYELLOW;DRAWICON(BB>0,10,7);AA:=IF(BARSLAST(CROSS(快线,慢线))>=4 AND CROSS(慢线,快线) AND 快线>50,20,0); STICKLINE(AA,80,100,7,1),COLOR00FF00;DRAWICON(AA>0,90,8);大单比率源码大单比率:=(BIGORDER(1,2)-BIGORDER(2,2))*VOL/CAPITAL*100;大单比率,LINETHICK1,COLOR3d;大单比率60:ema(大单比率,60)*60,coloryellow,LINETHICK1;大单比率5:MA(大单比率60,5),COLORRED,linethick1;大单比率10:MA(大单比率60,10),COLORGREEN ,linethick1;十红:COUNT(大单比率>0,10),COLORRED,LINETHICK0;连红:BARSLAST(大单比率<0),LINETHICK0;。

相关文档
最新文档