指标公式源码通达信绝对高手DDX指标
准确率超高通达信指标公式源码
经过实盘操作,准确率很高的指标里有具体的使用说明;VAR1S:=(CLOSE*2+HIGH+LOW)/4;VAR2S:=(EMA(VAR1S,13)-EMA(VAR1S,34))/EMA(VAR1S,34)*100;VAR3S:=EMA(VAR2S,5);主力控盘:=2*(VAR2S-VAR3S)*3.8;SA1:= 主力控盘,COLORWHITE,NODRAW;SA2:=SA1-REF(SA1,1);SA3:=MA(SA1,3),COLORGREEN;SAA3:=MA(SA1,7),COLORCYAN;SAA4:=MA(SA1,13),COLORRED;MM1:=MA(CLOSE,5);Q5:(MM1-REF(MM1,1))/REF(MM1,1)*100,NODRAW,COLORMAGENTA;MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-L OW)),14);HD2 :=HIGH-REF(HIGH,1);LD2 :=REF(LOW,1)-LOW;DMP2:=EXPMEMA(IF(HD2>0&&HD2>LD2,HD2,0),14);DMM2:=EXPMEMA(IF(LD2>0&&LD2>HD2,LD2,0),14);PDI2:=DMP2*100/MTR;MDI2:=DMM2*100/MTR;ADX:=EXPMEMA(ABS(MDI2-PDI2)/(MDI2+PDI2)*100,6);ADXR:=EXPMEMA(ADX,6);SAA31:=SAA3-REF(SAA3,1);ADXR12:=MA(ADX,3);ADXR13:=ADX-ADXR12;ADXR14:=ADX-ADXR;ZK2:=ADX<16;ZK3:=(ADXR<16&&ADX<20);ZK31:=ADXR<20&&ADXR>ADX;ZK4:=(ADX<MDI2&&ADXR<MDI2&&ADX<30);ZK41:=(ADX<PDI2&&ADXR<PDI2&&PDI2>MDI2&&ADX<30&&ADX<REF(ADX,1));ZK5:=(ZK2 OR ZK3 OR ZK31);SWQ1:=MAX(ADX,ADXR);AD1:=ADX-REF(ADX,1);Y:=(H+O+L+3*C)/6;X:=EMA(100-(100/(1+SUM(IF(Y>REF(Y,1),Y*VOL,0),13)/SUM(IF(Y<REF(Y,1),Y*VOL,0), 13))),5),COLOR00FFFF,LINETHICK2;AA:=30>X,LINETHICK0;BB:=X>80,LINETHICK0;VAR1:=(C-MA(C,6))/MA(C,6)*100;VAR2:=(C-MA(C,24))/MA(C,24)*100;VAR3:=(C-MA(C,32))/MA(C,32)*100;VAR4:=(VAR1+VAR2+VAR3)/3;VAR5:=EMA(VAR4,5);VAR6:=MA(100*(C-LLV(C,34))/(HHV(H,34)-LLV(L,34)),5)-20;VAR7:=SMA(SMA(100-3*(C-LLV(C,75))/(HHV(H,75)-LLV(L,75))*100,20,1)+SMA(2*(C-LL V(C,75))/(HHV(H,75)-LLV(L,75))*100,20,1),15,1);VAR8:=VAR7<REF(VAR7,1) AND V>REF(V,1) AND C>REF(C,1);K:EMA(VAR5,5)*4;D:EMA(K,5),NODRAW,COLOR38B0DE;J:K*3-D*2,NODRAW,COLORCC66FF;MACD:EMA(EMA(VAR1,5),5)*6,NODRAW,COLORWHITE;{DRAWBAND(J,RGB(238,238,6),K,RGB(256,150,60));}DRAWBAND(K,RGB(238,238,6),D,RGB(256,150,60));按短线卖:IF(EXIST(Q5>2.5,5),-60,DRAWNULL),LINETHICK7,COLORGREEN;按短线卖2:IF(EVERY(Q5<2.5,5)&&MACD>8,-60,DRAWNULL),LINETHICK7,COLORYELLOW;按短线买:IF(EXIST(Q5<-2.5,5),-60,DRAWNULL),LINETHICK7,COLORRED;中线股:IF(SA1>0,-40,DRAWNULL),LINETHICK7,COLORMAGENTA;中线币:IF(SA1<0,-40,DRAWNULL),LINETHICK7,COLORGREEN;盘整币:IF(MDI2>ADXR OR ZK5,-30,DRAWNULL),LINETHICK7,COLORGREEN; DRAWTEXT(EVERY(Q5<1,4)&&Q5>0&&MACD>REF(MACD,1)&&REF(MACD,1)<REF(MAC D,2)&&EVERY(Q5>-0.5,4),MACD*1.04,'P卖'),COLORGREEN;STICKLINE(SA1<REF(SA1,1),0,MACD*1.03,2,1),COLORGREEN;STICKLINE(SA1>REF(SA1,1)&&SA1>0,0,MACD*1.03,2,1),COLORRED;STICKLINE(Q5>5&&SA1>0&&MACD>REF(MACD,1),0,MACD*1.03,2,1),COLORRED; DRAWTEXT(AA&&SA1>REF(SA1,1),MACD*1.1,'吸货'),COLOR0066FF;DRAWTEXT(BB&&SA1<REF(SA1,1),MACD*1.1,'派发'),COLORFFFF00;DRAWTEXT(CROSS(3,Q5)&&EXIST(Q5>4,6),MACD*1.1,'卖4'),COLORGREEN; DRAWTEXT(CROSS(4,Q5)&&EXIST(Q5>5,6),MACD*1.1,'卖5'),COLORGREEN; DRAWTEXT(CROSS(5,Q5)&&EXIST(Q5>6,6),MACD*1.1,'卖6'),COLORGREEN; DRAWTEXT(CROSS(6,Q5)&&EXIST(Q5>7,5),MACD*1.1,'卖7'),COLORGREEN; STICKLINE(MACD>0,0,MACD,1,0),COLORRED;STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,1,0),COLORFFFF00; STICKLINE(MACD<0,0,MACD,1,0),COLORFF9900;STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD,1,0),COLORFF00FF;MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;辰星线:=(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)+16*REF(YTSL,4)+1 5*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL,8)+11*REF(YTSL,9)+1 0*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7*REF(YTSL,13)+6*REF(YTSL,14)+ 5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF(YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/21 1,COLOR0000FF;牵牛线:=MA(CLOSE,26),COLORFF00FF;CX1:=辰星线;QN1:=牵牛线;IF(CX1>REF(CX1,1)&&CX1>QN1,-50,DRAWNULL),LINETHICK7,COLORRED;IF(CX1>REF(CX1,1)&&CX1<QN1,-50,DRAWNULL),LINETHICK7,COLORMAGENTA;IF(CX1<REF(CX1,1)&&CX1<QN1,-50,DRAWNULL),LINETHICK7,COLORGREEN;IF(CX1<REF(CX1,1)&&CX1>QN1,-50,DRAWNULL),LINETHICK7,COLORCYAN; DRAWTEXT(NDAY(SA1,0,2)&&CX1>REF(CX1,1)&&MACD>REF(MACD,1)&&REF(MACD,1) <REF(MACD,2),MACD*1.1,'BBB'),COLORMAGENTA;DA:=(3*CLOSE+OPEN+LOW+HIGH)/6,POINTDOT;X2:=(20*DA+19*REF(DA,1)+18*REF(DA,2)+17*REF(DA,3)+16*REF(DA,4)+15*REF(DA, 5)+14*REF(DA,6)+13*REF(DA,7)+12*REF(DA,8)+11*REF(DA,9)+10*REF(DA,10)+9*RE F(DA,11)+8*REF(DA,12)+7*REF(DA,13)+6*REF(DA,14)+5*REF(DA,15)+4*REF(DA,16)+ 3*REF(DA,17)+2*REF(DA,18)+REF(DA,20))/210,COLORF0F000;X3:=(MA(X2,3)+MA(X2,2))/2,COLORYELLOW,LINETHICK1;DRAWTEXT(SA1>REF(SA1,1)&&SA1>0&&REF(SA1,1)<REF(SA1,2)&&X2>X3,MACD*1.1,'信号1'),COLORMAGENTA;DRAWTEXT(Q5>5&&SA1>0&&MACD>REF(MACD,1)&&REF(MACD,1)<REF(MACD,2)&&X2 >X3,MACD*1.1,'信号2'),COLORRED;DRAWTEXT(MACD>0&&MACD>REF(MACD,1)&&REF(MACD,1)<REF(MACD,2)&&X2>X3,-3,'信号3'),COLORRED;DRAWTEXT(MACD<0 ANDMACD>REF(MACD,1)&&REF(MACD,1)<REF(MACD,2)&&X2>X3,MACD*1.1,'信号4'),COLORWHITE;-60;-50;-40;-30;。
通达信三个公式源码准确率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 OR CLOSE>19.57 AND CLOSE<19.59 OR CLOSE>6.26 ANDCLOSE<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) 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);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;。
不败大牛通达信指标公式源码
不败大牛通达信指标公式源码```python'''说明:公式:1.开盘涨幅=(开盘价-前一天收盘价)/前一天收盘价2.涨跌振幅=(当天最高价-当天最低价)/当天最低价3.超过触发价=当天最高价>触发价4.触发价以上所占涨幅=(当天最高价-触发价)/触发价5.触发价以上首次回撤=(当天最高价-当天最低价)/当天最高价6.过去N天涨幅排名=(过去N天涨幅较高的数量/N)*1007.过去N天触发排名=(过去N天超过触发价的数量/N)*1008.选股得分=开盘涨幅*涨跌振幅*触发价以上所占涨幅*触发价以上首次回撤*过去N天涨幅排名*过去N天触发排名*100'''import pandas as pdimport numpy as npdef calc_index(df, n=20, trigger_price=100):#计算开盘涨幅df['开盘涨幅'] = (df['开盘价'] - df['前一天收盘价']) / df['前一天收盘价']#计算涨跌振幅df['涨跌振幅'] = (df['最高价'] - df['最低价']) / df['最低价'] #判断超过触发价df['超过触发价'] = np.where(df['最高价'] > trigger_price, 1, 0)#计算触发价以上所占涨幅df['触发价以上所占涨幅'] = np.where(df['最高价'] >trigger_price, (df['最高价'] - trigger_price) / trigger_price, 0) #计算触发价以上首次回撤df['触发价以上首次回撤'] = (df['最高价'] - df['最低价']) /df['最高价']#计算过去N天涨幅排名df['过去N天涨幅排名'] = df['开盘涨幅'].rolling(n).apply(lambda x: (x > x[-1]).sum( / n * 100,raw=True)#计算过去N天触发排名df['过去N天触发排名'] = df['超过触发价'].rolling(n).apply(lambda x: (x > x[-1]).sum( / n * 100,raw=True)#计算选股得分df['选股得分'] = df['开盘涨幅'] * df['涨跌振幅'] * df['触发价以上所占涨幅'] * df['触发价以上首次回撤'] * df['过去N天涨幅排名'] * df['过去N天触发排名'] * 100return df#示例# 假设有一段时间的股票数据存储在DataFrame df中,包括'日期'、'开盘价'、'前一天收盘价'、'最高价'、'最低价'等列df = pd.DataFrame'日期':['2024-01-01','2024-01-02','2024-01-03'],'开盘价':[100,110,120],'前一天收盘价':[90,100,110],'最高价':[120,130,140],'最低价':[80,90,100]})df = calc_index(df, n=20, trigger_price=100)print(df)```注意:这段代码中的计算是基于示例数据进行的,实际使用时需要根据具体的股票数据进行调整。
通达信指标公式源码 DDX股票趋势副图
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LO W)),VOL/2)),LINETHICK0,COLORRED;卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH -LOW),0-VOL/2)),LINETHICK0,COLORCYAN;进出量:=买量+卖量,COLOR00FFFF;STICKLINE(进出量<0,0,进出量,4,0),COLORFF6600;STICKLINE(进出量<0,0,进出量,3,0),COLORFF9900;STICKLINE(进出量<0,0,进出量,1.5,0),COLORFFCC00;STICKLINE(进出量<0,0,进出量,0.5,0),COLORCYAN;STICKLINE(进出量>0,0,进出量,4,0),COLOR000099;STICKLINE(进出量>0,0,进出量,3,0),COLOR0000CC;STICKLINE(进出量>0,0,进出量,1.5,0),COLOR0000FF;STICKLINE(进出量>0,0,进出量,0.5,0),COLORCC66FF;N:=5;M:=31;N日内净流入:SUM(进出量,N),LINETHICK2,COLORGREEN;流入:IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL),COLORRED,LINETHICK2;连红天:BARSLASTCOUNT(进出量>0);M日内翻红天:COUNT(进出量>0,M),COLORRED;走熊天:BARSLASTCOUNT(N日内净流入<0),COLORCYAN;走牛天:BARSLASTCOUNT(N日内净流入>0),COLORRED;强势天:BARSLASTCOUNT((N日内净流入>REF(N日内净流入,1))>0 AND N日内净流入>0); 弱势天:BARSLASTCOUNT((N日内净流入<REF(N日内净流入,1))>0 AND N日内净流。
【股票指标公式下载】-【通达信】50_DDX(买盘、卖盘)
【通达信】50_DDX(买盘、卖盘)-指标公式源码WJ:=(H+L+C)/3;V1:=IF(H=L,1,H-MAX(O,C));V2:=IF(H=L,1,MAX(C,O)-WJ);V3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));V5:=VOL/IF(H=L,4,H-L);V6:=(V1*V5);V7:=(V2*V5);V8:=(V3*V5);V9:=(V4*V5);买盘:=(V9+V8);卖盘:=(V6+V7);买卖差:=买盘-卖盘;DDX:=买卖差;DX:=MA(买卖差,5)*20;N:=5;M:=13;N日内净流入:=SUM(DDX,N)*3;流入:=IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL); DRAWBAND(N日内净流入,RGB(100,100,100),0,RGB(0,100,150));{波段转向}{5天3%}DLX1:=SMA(DX,3,1),LINETHICK,COLORWHITE;RSV:=((C-LLV(L,6))/(HHV(H,6)-LLV(L,6)))*100;K:=POW(SMA(RSV,2,1),5)/POW(10,8);D:=POW(SMA(RSV,2,1),5)/POW(10,10);J:=(K+ D)/2;花开短买:IF(CROSS(J,1),1,0) AND DLX1>REF(DLX1,1),COLORYELLOW;IF(花开短买,150000,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;IF(花开短买,150000,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;{IF(MACD>=0 ANDREF(MACD,1)<0,1,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;IF(MACD>=0 ANDREF(MACD,1)<0,1,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;}RSI1:=N日内净流入;AA:=REF(RSI1,N)=HHV(RSI1,2*N+1);BB:=BACKSET(AA,N+1);CC:=FILTER(BB,N) AND RSI1=HHV(RSI1,N+1);A1:=BARSLAST(REF(CC,1));顶背离:REF(CLOSE,A1+1)<CLOSE AND REF(RSI1,A1+1)>RSI1 AND CC,COLORRED; DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORRED;AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);BB2:=BACKSET(AA2,N+1);CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);A2:=BARSLAST(REF(CC2,1));底背离:REF(CLOSE,A2+1)>CLOSE AND REF(RSI1,A2+1)<RSI1 AND CC2,COLORCYAN; DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORCYAN;STICKLINE(DDX<0,0,DDX,4,0),COLORFF6600;STICKLINE(DDX<0,0,DDX,3,0),COLORFF9900;STICKLINE(DDX<0,0,DDX,1.5,0),COLORFFCC00;STICKLINE(DDX<0,0,DDX,0,0),COLOR66CCFF;STICKLINE(DDX>0,0,DDX,4,0),COLOR000099;STICKLINE(DDX>0,0,DDX,3,0),COLOR0000CC;STICKLINE(DDX>0,0,DDX,1.5,0),COLOR0000FF;STICKLINE(DDX>0,0,DDX,0,0),COLORCC66FF;DDX1:SMA(DX,3,1),COLORFFFFFF;DDX2:SMA(DDX1,3,1),COLOR00FFFF;DDX3:(5*DDX2+4*REF(DDX2,1)+3*REF(DDX2,2)+2*REF(DDX2,3)+REF(DDX2,4))/1 5;预警:DDX>0 AND MA(V,5)>MA(MA(V,5),5) AND CROSS(DDX1,DDX2),LINETHICK; 天:=COUNT(DDX>0,5),COLORRED;DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;【通达信】50_DDX(买盘、卖盘)-指标公式效果图(文档来源:若水财经社区)。
ddx指标源码
ddx指标源码:param instrument: 证券代码。
:return:。
'''。
#用上述的变量来构造请求。
#请求,并返回数据。
web_data = requests.get(url)。
#拿到的数据是字符串,需要用正则表达式把数据切割出来。
day_k_data = web_data.text。
day_k_data = re.findall('\[.*\]', day_k_data)[0]。
# 把数据切割出来后,再把数据转为DataFrame。
day_k_data = day_k_data.replace('"', '').replace('\\\\','').replace('\\', '').replace(';', '').replace(']','').replace('[', '').split('\n')。
day_k_data = [i.split(' ') for i in day_k_data if i]。
col_data = ['date', 'open', 'high', 'low', 'close', 'ddx','ddy']。
df_day_k_data = pd.DataFrame(day_k_data, columns=col_data)。
df_day_k_data = df_day_k_data.apply(pd.to_numeric,errors='ignore')。
好用的DDX指标 通达信指标公式源码
好用的DDX指标AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LO W)),VOL/2)),LINETHICK0,COLORRED;卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIG H-LOW),0-VOL/2)),LINETHICK0,COLORCYAN;进出量:=买量+卖量,COLOR00FFFF;STICKLINE(进出量<0,0,进出量,4,0),COLORFF6600;STICKLINE(进出量<0,0,进出量,3,0),COLORFF9900;STICKLINE(进出量<0,0,进出量,1.5,0),COLORFFCC00;STICKLINE(进出量<0,0,进出量,0.5,0),COLORCYAN;STICKLINE(进出量>0,0,进出量,4,0),COLOR000099;STICKLINE(进出量>0,0,进出量,3,0),COLOR0000CC;STICKLINE(进出量>0,0,进出量,1.5,0),COLOR0000FF;STICKLINE(进出量>0,0,进出量,0.5,0),COLORCC66FF;N:=5; M:=13; N日内净流入:SUM(进出量,N),LINETHICK2,COLORGREEN;流入:IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL),COLORRED,LINETHICK2;连红天:BARSLASTCOUNT(进出量>0);M日内翻红天:COUNT(进出量>0,M),COLORRED;走熊天:BARSLASTCOUNT(N日内净流入<0),COLORCYAN;走牛天:BARSLASTCOUNT(N日内净流入>0),COLORRED;强势天:BARSLASTCOUNT((N日内净流入>REF(N日内净流入,1))>0 AND N日内净流入>0); 弱势天:BARSLASTCOUNT((N日内净流入<REF(N日内净流入,1))>0 AND N日内净流入<0);。
ddx牛指标公式
ddx牛指标公式
摘要:
1.DDX 牛指标公式的概述
2.DDX 牛指标公式的计算方法
3.DDX 牛指标公式的应用和意义
4.总结
正文:
DDX 牛指标公式是一种被广大投资者所青睐的技术指标,用于衡量股票或其他金融产品在过去一段时间内的交易活跃度和资金流向。
其全称为“当日大单买入净额占流通盘比率”,计算公式为:
DDX = (买入金额- 卖出金额) / 流通盘
其中,买入金额和卖出金额分别表示当天股票的买入和卖出交易金额,流通盘则是该股票的总流通股本。
DDX 牛指标公式的计算方法是将每天的买入金额和卖出金额进行净额计算,然后除以流通盘,得出的结果就是DDX 值。
如果DDX 值为正数,说明当天股票的买入金额大于卖出金额,资金流入该股票,反之则说明资金流出该股票。
通过观察DDX 值的变化,投资者可以了解到股票的资金流向情况,从而做出更加明智的投资决策。
DDX 牛指标公式的应用和意义在于,可以帮助投资者判断股票的活跃度和资金流向。
当股票的DDX 值持续为正数时,说明该股票的交易活跃度高,资金流入量大,有可能是市场热点或者有重大利好消息出现,投资者可以考虑
积极参与。
相反,当股票的DDX 值持续为负数时,说明该股票的交易活跃度低,资金流出量大,有可能是市场冷门或者有利空消息出现,投资者需要谨慎对待。
总的来说,DDX 牛指标公式是投资者进行股票投资决策时的一个重要参考指标。
【股票指标公式下载】-【通达信】DDX柱态趋势(买盘、卖盘、买卖差)
【通达信】DDX柱态趋势(买盘、卖盘、买卖差)-指标公式源码{50_DDX}WJ:=(H+L+C)/3;V1:=IF(H=L,1,H-MAX(O,C));V2:=IF(H=L,1,MAX(C,O)-WJ);V3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));V5:=VOL/IF(H=L,4,H-L);V6:=(V1*V5);V7:=(V2*V5);V8:=(V3*V5);V9:=(V4*V5);买盘:=(V9+V8);卖盘:=(V6+V7);买卖差:=买盘-卖盘;DDX:=买卖差;DX:=MA(买卖差,5)*20;N:=5;M:=13;N日内净流入:=SUM(DDX,N)*3;流入:=IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL); DRAWBAND(N日内净流入,RGB(100,100,100),0,RGB(0,100,150));{波段转向}{5天3%}DLX1:=SMA(DX,3,1),LINETHICK,COLORWHITE;RSV:=((C-LLV(L,6))/(HHV(H,6)-LLV(L,6)))*100;K:=POW(SMA(RSV,2,1),5)/POW(10,8);D:=POW(SMA(RSV,2,1),5)/POW(10,10);J:=(K+ D)/2;花开短买:IF(CROSS(J,1),1,0) AND DLX1>REF(DLX1,1),COLORYELLOW;IF(花开短买,150000,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;IF(花开短买,150000,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;{IF(MACD>=0 ANDREF(MACD,1)<0,1,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;IF(MACD>=0 ANDREF(MACD,1)<0,1,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;}RSI1:=N日内净流入;AA:=REF(RSI1,N)=HHV(RSI1,2*N+1);BB:=BACKSET(AA,N+1);CC:=FILTER(BB,N) AND RSI1=HHV(RSI1,N+1);A1:=BARSLAST(REF(CC,1));顶背离:REF(CLOSE,A1+1)<CLOSE AND REF(RSI1,A1+1)>RSI1 AND CC,COLORRED; DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORRED;AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);BB2:=BACKSET(AA2,N+1);CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);A2:=BARSLAST(REF(CC2,1));底背离:REF(CLOSE,A2+1)>CLOSE AND REF(RSI1,A2+1)<RSI1 AND CC2,COLORCYAN; DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORCYAN;STICKLINE(DDX<0,0,DDX,4,0),COLORFF6600;STICKLINE(DDX<0,0,DDX,3,0),COLORFF9900;STICKLINE(DDX<0,0,DDX,1.5,0),COLORFFCC00;STICKLINE(DDX<0,0,DDX,0,0),COLOR66CCFF;STICKLINE(DDX>0,0,DDX,4,0),COLOR000099;STICKLINE(DDX>0,0,DDX,3,0),COLOR0000CC;STICKLINE(DDX>0,0,DDX,1.5,0),COLOR0000FF;STICKLINE(DDX>0,0,DDX,0,0),COLORCC66FF;DDX1:SMA(DX,3,1),COLORFFFFFF;DDX2:SMA(DDX1,3,1),COLOR00FFFF;DDX3:(5*DDX2+4*REF(DDX2,1)+3*REF(DDX2,2)+2*REF(DDX2,3)+REF(DDX2,4))/1 5;预警:DDX>0 AND MA(V,5)>MA(MA(V,5),5) AND CROSS(DDX1,DDX2),LINETHICK; 天:=COUNT(DDX>0,5),COLORRED;DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;【通达信】DDX柱态趋势(买盘、卖盘、买卖差)-指标公式效果图(文档来源:若水财经社区)。
通达信指标公式源码 成交量和DDX叠加指标
万手:VOL/10000,LINETHICK0;AA:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);预测:AA/10000;BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));主动买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LO W)),VOL/2));主买:主动买/10000,COLORRED;主动卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH -LOW),0-VOL/2));主卖:-主动卖/10000,COLORGREEN;差额:(主动买+主动卖)/10000;STICKLINE(CLOSE=REF(CLOSE,1),0,VOL,3.5,0),COLORWHITE;STICKLINE(CLOSE>REF(CLOSE,1),0,VOL,3.5,0),COLORRED;STICKLINE(CLOSE<REF(CLOSE,1),0,VOL,3.5,0),COLORGREEN;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 3.5 , 0 ) , COLOR00FFFF ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 3.2 , 0 ) , COLOR007777 ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 2.7 , 0 ) , COLOR009999 ;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 2.1 , 0 ) , COLOR00BBBB ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 1.5 , 0 ) , COLOR00DDEE ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 0.9 , 0 ) , COLOR66FFFF ; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 0.2 , 0 ) , COLORFFFFFF ; STICKLINE(主动买>=0,VOL,-主动卖,3.2,0),COLOR000033;STICKLINE(主动买>=0,VOL,-主动卖,2.7,0),COLOR000066;STICKLINE(主动买>=0,VOL,-主动卖,2.1,0),COLOR000099;STICKLINE(主动买>=0,VOL,-主动卖,1.5,0),COLOR0000CC;STICKLINE(主动买>=0,VOL,-主动卖,0.9,0),COLOR0000FF;STICKLINE(主动买>=0,VOL,-主动卖,0.2,0),COLORCC66FF;STICKLINE(主动卖<=0,0,-主动卖,3.2,0),COLOR990000;STICKLINE(主动卖<=0,0,-主动卖,2.7,0),COLORCC0000;STICKLINE(主动卖<=0,0,-主动卖,2.1,0),COLORFF4400;STICKLINE(主动卖<=0,0,-主动卖,1.5,0),COLORFF8800;STICKLINE(主动卖<=0,0,-主动卖,0.9,0),COLORFFCC00;STICKLINE(主动卖<=0,0,-主动卖,0.2,0),COLORCYAN;持币:IF(SAR(10,2,20)>=H,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORBLUE;持股:IF(SAR(10,2,20)<=L,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORRED; WJ:=(H+L+C)/3;V1:=IF(H=L,1,H-MAX(O,C));V2:=IF(H=L,1,MAX(C,O)-WJ);V3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));V5:=VOL/IF(H=L,4,H-L);V6:=(V1*V5);V7:=(V2*V5);V8:=(V3*V5);V9:=(V4*V5);买盘:=(V9+V8);卖盘:=(V6+V7);买卖差:=买盘-卖盘;DDX:=买卖差;DX:=MA(买卖差,5)*20;DDX1:SMA(DX,3,1),COLORFFFFFF;DDX2:SMA(DDX1,3,1),COLOR00FFFF;DDX3:(5*DDX2+4*REF(DDX2,1)+3*REF(DDX2,2)+2*REF(DDX2,3)+REF(DDX2,4))/15; {股}预警:DDX>0 AND MA(V,5)>MA(MA(V,5),5) AND CROSS(DDX1,DDX2),LINETHICK;天:=COUNT(DDX>0,5),COLORRED;DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;。
最强抄底通达信指标公式源码
最强抄底通达信指标公式源码抄底是股市中一种常见的交易策略,通达信是一款广泛使用的股市分析软件。
以下是一些在通达信中常用的指标公式源码,用于抄底策略。
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));```该指标用于衡量股价处于过买或过卖的程度。
这些是通达信中一些常见的指标公式源码,可用于抄底策略。
当然,抄底不只依赖于指标,还需要结合其他股市因素进行分析和判断。
(ddx)通达信DDX指标公式-公式,源码
(ddx)通达信DDX指标公式-公式,源码(ddx)通达信DDX指标公式-公式,源码来源:同花顺公式网关键字:通达信指标公式,通达信公式,通达信主图指标公式日期:2013-05-20 10:15:29摘要:WJ:=(H+L+C)/3; V1:=IF(H=L,1,H-MAX(O,C)); V2:=IF(H=L,1,MAX(C,O)-WJ); V3:=IF(H=L,1,MIN(O,C)-L); V4:=IF(H=L,1,WJ-MIN(C,O)); V5:=VOL/IF(H=L,4,H-L); V6:=(V1*V5); V7:=(V2*V5); V8:=(V3*V5); V9:=(V4*V5); 买盘:=(V9+V8); 卖盘:=(V6+V7); 买卖差:=买盘-卖盘; DDX:=买卖差; DX:=MA(买卖差,5)*20; N:=5; M:=13; N日内净流入:=SUM(DDX,N)*3; 流入:=IF(N日内净流入>REF(N日内净流入,1),N 日内净流入,DRAWNULL); DRAWBAND(N日内净流入,RGB WJ:=(H+L+C)/3;V1:=IF(H=L,1,H-MAX(O,C));V2:=IF(H=L,1,MAX(C,O)-WJ);V3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));V5:=VOL/IF(H=L,4,H-L);V6:=(V1*V5);V7:=(V2*V5);V8:=(V3*V5);V9:=(V4*V5);买盘:=(V9+V8);卖盘:=(V6+V7);买卖差:=买盘-卖盘;DDX:=买卖差;DX:=MA(买卖差,5)*20;N:=5;M:=13;N日内净流入:=SUM(DDX,N)*3;流入:=IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL);DRAWBAND(N日内净流入,RGB(100,100,100),0,RGB(0,100,150));{波段转向}{5天3%}DLX1:=SMA(DX,3,1),LINETHICK,COLORWHITE;RSV:=((C-LLV(L,6))/(HHV(H,6)-LLV(L,6)))*100;K:=POW(SMA(RSV,2,1),5)/POW(10,8);D:=POW(SMA(RSV,2,1),5)/POW(10,10);J:=(K+ D)/2;花开短买:IF(CROSS(J,1),1,0) AND DLX1>REF(DLX1,1),COLORYELLOW;IF(花开短买,150000,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;IF(花开短买,150000,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;IF(MACD>=0 AND REF(MACD,1)<0,1,DRAWNULL),CROSSDOT,LINETHICK6,COLORF F33FF;IF(MACD>=0 AND REF(MACD,1)<0,1,DRAWNULL),POINTDOT,LINETHICK4,COLOR0 0CCFF;RSI1:=N日内净流入;AA:=REF(RSI1,N)=HHV(RSI1,2*N+1);BB:=BACKSET(AA,N+1);CC:=FILTER(BB,N) AND RSI1=HHV(RSI1,N+1);A1:=BARSLAST(REF(CC,1));顶背离:REF(CLOSE,A1+1)<CLOSE AND REF(RSI1,A1+1)>RSI1 AND CC,COLORRED;DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORRED;AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);BB2:=BACKSET(AA2,N+1);CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);A2:=BARSLAST(REF(CC2,1));底背离:REF(CLOSE,A2+1)>CLOSE AND REF(RSI1,A2+1)<RSI1 AND CC2,COLORCYAN;DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORCYAN;STICKLINE(DDX<0,0,DDX,4,0),COLORFF6600;STICKLINE(DDX<0,0,DDX,3,0),COLORFF9900;STICKLINE(DDX<0,0,DDX,1.5,0),COLORFFCC00;STICKLINE(DDX<0,0,DDX,0,0),COLOR66CCFF;STICKLINE(DDX>0,0,DDX,4,0),COLOR000099;STICKLINE(DDX>0,0,DDX,3,0),COLOR0000CC;STICKLINE(DDX>0,0,DDX,1.5,0),COLOR0000FF;STICKLINE(DDX>0,0,DDX,0,0),COLORCC66FF;DDX1:SMA(DX,3,1),COLORFFFFFF;DDX2:SMA(DDX1,3,1),COLOR00FFFF;DDX3:(5*DDX2+4*REF(DDX2,1)+3*REF(DDX2,2)+2*REF(DDX 2,3)+REF(DDX2,4))/15;预警:DDX>0 AND MA(V,5)>MA(MA(V,5),5) AND CROSS(DDX1,DDX2),LINETHICK;天:=COUNT(DDX>0,5),COLORRED;DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;。
准确率超高通达信指标公式源码
准确率超高通达信指标公式源码经过实盘操作,准确率很高的指标里有具体的使用说明;VAR1S:=(CLOSE*2+HIGH+LOW)/4;VAR2S:=(EMA(VAR1S,13)-EMA(VAR1S,34))/EMA(VAR1S,34)*100;VAR3S:=EMA(VAR2S,5);主力控盘:=2*(VAR2S-VAR3S)*3.8;SA1:= 主力控盘,COLORWHITE,NODRAW;SA2:=SA1-REF(SA1,1);SA3:=MA(SA1,3),COLORGREEN;SAA3:=MA(SA1,7),COLORCYAN;SAA4:=MA(SA1,13),COLORRED;MM1:=MA(CLOSE,5);Q5:(MM1-REF(MM1,1))/REF(MM1,1)*100,NODRAW,COLORMAGENTA;MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-L OW)),14);HD2 :=HIGH-REF(HIGH,1);LD2 :=REF(LOW,1)-LOW;DMP2:=EXPMEMA(IF(HD2>0&&HD2>LD2,HD2,0),14);DMM2:=EXPMEMA(IF(LD2>0&&LD2>HD2,LD2,0),14);PDI2:=DMP2*100/MTR;MDI2:=DMM2*100/MTR;ADX:=EXPMEMA(ABS(MDI2-PDI2)/(MDI2+PDI2)*100,6);ADXR:=EXPMEMA(ADX,6);SAA31:=SAA3-REF(SAA3,1);ADXR12:=MA(ADX,3);ADXR13:=ADX-ADXR12;ADXR14:=ADX-ADXR;ZK2:=ADX<16;ZK3:=(ADXR<16&&ADX<20);ZK31:=ADXR<20&&ADXR>ADX;ZK4:=(ADX<mdi2&&adxr<mdi2&&adx<30);< p="">ZK41:=(ADX<pdi2&&adxr<pdi2&&pdi2>MDI2&&ADX<30 &&ADX<ref(adx,1));< p="">ZK5:=(ZK2 OR ZK3 OR ZK31);SWQ1:=MAX(ADX,ADXR);AD1:=ADX-REF(ADX,1);Y:=(H+O+L+3*C)/6;X:=EMA(100-(100/(1+SUM(IF(Y>REF(Y,1),Y*VOL,0),13)/SUM(IF(Y<="" p=""> AA:=30>X,LINETHICK0;BB:=X>80,LINETHICK0;VAR1:=(C-MA(C,6))/MA(C,6)*100;VAR2:=(C-MA(C,24))/MA(C,24)*100;VAR3:=(C-MA(C,32))/MA(C,32)*100;VAR4:=(VAR1+VAR2+VAR3)/3;VAR5:=EMA(VAR4,5);VAR6:=MA(100*(C-LLV(C,34))/(HHV(H,34)-LLV(L,34)),5)-20;VAR7:=SMA(SMA(100-3*(C-LLV(C,75))/(HHV(H,75)-LLV(L,75))*100,20,1)+SMA(2*(C-LL V(C,75))/(HHV(H,75)-LLV(L,75))*100,20,1),15,1);VAR8:=VAR7REF(V,1) AND C>REF(C,1);K:EMA(VAR5,5)*4;D:EMA(K,5),NODRAW,COLOR38B0DE;J:K*3-D*2,NODRAW,COLORCC66FF;MACD:EMA(EMA(VAR1,5),5)*6,NODRAW,COLORWHITE;{DRAWBAND(J,RGB(238,238,6),K,RGB(256,150,60));}DRAWBAND(K,RGB(238,238,6),D,RGB(256,150,60));按短线卖:IF(EXIST(Q5>2.5,5),-60,DRAWNULL),LINETHICK7,COLORGREEN;按短线卖2:IF(EVERY(Q5<2.5,5)&&MACD>8,-60,DRAWNULL),LINETHICK7,COLORYELLOW;按短线买:IF(EXIST(Q5<-2.5,5),-60,DRAWNULL),LINETHICK7,COLORRED;中线股:IF(SA1>0,-40,DRAWNULL),LINETHICK7,COLORMAGENTA;中线币:IF(SA1<0,-40,DRAWNULL),LINETHICK7,COLORGREEN;盘整币:IF(MDI2>ADXR OR ZK5,-30,DRAWNULL),LINETHICK7,COLORGREEN;DRAWTEXT(EVERY(Q5<1,4)&&Q5>0&&MACD>REF(MACD,1)& &REF(MACD,1)-0.5,4),MACD*1.04,'P卖'),COLORGREEN;STICKLINE(SA1<ref(sa1,1),0,macd*1.03,2,1),colorgreen;<p="">STICKLINE(SA1>REF(SA1,1)&&SA1>0,0,MACD*1.03,2,1),COL ORRED;STICKLINE(Q5>5&&SA1>0&&MACD>REF(MACD,1),0,MAC D*1.03,2,1),COLORRED;DRAWTEXT(AA&&SA1>REF(SA1,1),MACD*1.1,'吸货'),COLOR0066FF;DRAWTEXT(BB&&SA1<ref(sa1,1),macd*1.1,'派发'),colorffff00;< p="">DRAWTEXT(CROSS(3,Q5)&&EXIST(Q5>4,6),MACD*1.1,'卖4'),COLORGREEN;DRAWTEXT(CROSS(4,Q5)&&EXIST(Q5>5,6),MACD*1.1,'卖5'),COLORGREEN;DRAWTEXT(CROSS(5,Q5)&&EXIST(Q5>6,6),MACD*1.1,'卖6'),COLORGREEN;DRAWTEXT(CROSS(6,Q5)&&EXIST(Q5>7,5),MACD*1.1,'卖7'),COLORGREEN; STICKLINE(MACD>0,0,MACD,1,0),COLORRED;STICKLINE(MACD>0 AND MACD<0,0,macd,1,0),colorff9900;<="">STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD,1,0),COLORFF00FF;MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;辰星线:=(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL ,3)+16*REF(YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL,8) +11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7*REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF(YTSL,17)+2*REF(YTSL,18 )+REF(YTSL,20))/21 1,COLOR0000FF;牵牛线:=MA(CLOSE,26),COLORFF00FF;CX1:=辰星线;QN1:=牵牛线;IF(CX1>REF(CX1,1)&&CX1>QN1,-50,DRAWNULL),LINETHICK7,COLORRED;IF(CX1>REF(CX1,1)&&CX1<qn1,-50,drawnull),linethick7,colormagenta;< p="">IF(CX1<ref(cx1,1)&&cx1<qn1,-50,drawnull),linethick7,colorgreen;< p="">IF(CX1<ref(cx1,1)&&cx1>QN1,-50,DRAWNULL),LINETHICK7,COLORCYAN;DRAWTEXT(NDAY(SA1,0,2)&&CX1>REF(CX1,1)&&MACD>REF( MACD,1)&&REF(MACD,1)<ref(macd,2),macd*1.1,'bbb'),colormagenta;< p=""> DA:=(3*CLOSE+OPEN+LOW+HIGH)/6,POINTDOT;X2:=(20*DA+19*REF(DA,1)+18*REF(DA,2)+17*REF(DA,3)+1 6*REF(DA,4)+15*REF(DA,5)+14*REF(DA,6)+13*REF(DA,7)+12*REF(DA,8)+11*REF(DA,9)+1 0*REF(DA,10)+9*REF(DA,11)+8*REF(DA,12)+7*REF(DA,13)+6*REF(DA,14)+5*REF(DA ,15)+4*REF(DA,16)+3*REF(DA,17)+2*REF(DA,18)+REF(DA,20))/210,COLORF0F000;X3:=(MA(X2,3)+MA(X2,2))/2,COLORYELLOW,LINETHICK1;DRAWTEXT(SA1>REF(SA1,1)&&SA1>0&&REF(SA1,1)<ref(sa 1,2)&&x2>X3,MACD*1.1,'信号1'),COLORMAGENTA;</ref(sa1,2)&&x2>DRAWTEXT(Q5>5&&SA1>0&&MACD>REF(MACD,1)&&REF(MACD,1)<ref(macd,2)&&x2>X3,MACD*1.1,'信号2'),COLORRED;</ref(macd,2)&&x2>DRAWTEXT(MACD>0&&MACD>REF(MACD,1)&&REF(MAC D,1)<ref(macd,2)&&x2>X3,-3,'信号3'),COLORRED;</ref(macd,2)&&x2>DRAWTEXT(MACD<0 ANDMACD>REF(MACD,1)&&REF(MACD,1)<ref(macd,2)&&x2>X 3,MACD*1.1,'信号</ref(macd,2)&&x2>4'),COLORWHITE;-60;-50;-40;-30;</ref(macd,2),macd*1.1,'bbb'),colormagenta;<></ref(cx1,1) &&cx1></ref(cx1,1)&&cx1<qn1,-50,drawnull),linethick7,colorgreen;<></qn1,-50,drawnull),linethick7,colormagenta;<></ref(sa1,1),macd*1.1,'派发'),colorffff00;<></ref(sa1,1),0,macd*1.03,2,1),colorgreen;<></ref(adx,1));<></pdi2&&adxr<pdi2&&pdi2></mdi2&&adxr<mdi2&&adx<30);<>。
20个极品通达信指标公式源码
公式1(未来函数)代码N1:=5;N2:=10;N3:=20;N4:=30;P:=2;M:=20;N:=250;M1:=55;W:=21;P3:=500;N9:=90; HR:=HHV(HIGH,M1);HRY:=LLV(LOW,M1);HRY11:=HR*HRY;HRY33:SQRT(HRY11),COLORGREEN,LINETHICK2;IF(C>HRY33 AND HRY33 >=REF(HRY33 ,1), HRY33 ,DRAWNULL),LINETHICK2,COLORRED; MA1:EMA(CLOSE,N1);MA2:EMA(CLOSE,N2);MA3:EMA(CLOSE,N3),COLOR00FFFF;MA4:EMA(CLOSE,N4),LINETHICK2;TJ1:=CROSS(MA1,MA2) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018OR CROSS(MA1,MA4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018OR CROSS(MA2,MA3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018OR CROSS(MA1,MA3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018;TJ2:=(MAX(MA1,MAX(MA2,MA3))-MIN(MA1,MIN(MA2,MA3)))/MIN(MA1,MIN(MA2,MA3))*100<=P;XG:=TJ1 AND TJ2;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);MACD:=2*(DIFF-DEA);做多:=IF(K>D AND MACD>0 AND V>1,2,0),COLORRED;做空:=IF(K<D AND MACD<0 AND V>1,-2,0),COLOR00FF00;强洗:=IF(MACD>0 AND K<D AND V>1,1,0),COLOR0099FF;弱升:=IF(MACD<0 AND K>D AND V>1,-1,0),COLORFFFF00;STICKLINE(做多AND C>=O,C,O,3,1),COLORRED;STICKLINE(做多AND C<O,C,O,3,0),COLOR990099;STICKLINE(做多AND C<O,C,O,1,0),COLORCC00CC;STICKLINE(做多AND C<O,C,O,0.3,0),COLORFF00FF;STICKLINE(做多AND C>=O,C,O,3,1),COLOR0000FF;{STICKLINE(做多AND C>=O,C,O,1.5,0),COLOR0000DD;STICKLINE(做多AND C>=O,C,O,0.4,0),COLOR0000FF;}STICKLINE(做空AND C>=O,L,H,0.1,0),COLOR0000FF;STICKLINE(做空AND C>=O,C,O,3,1),COLOR00FF00;{STICKLINE(做空AND C<O,C,O,3,0),COLOR00FF00;STICKLINE(做空AND C<O,C,O,0.3,0),COLOR00FF00;STICKLINE(做空AND C<O,C,O,0.3,0),COLOR00FF00;}STICKLINE(强洗AND C>=O,L,H,0.1,0),COLOR0000FF;STICKLINE(强洗AND C>=O,C,O,3,1),COLORFFFFFF;STICKLINE(强洗AND C<O,C,O,3,0),COLOR999999;STICKLINE(强洗AND C<O,C,O,1,0),COLORCCCCCC;STICKLINE(强洗AND C<O,C,O,0.3,0),COLORFFFFFF;STICKLINE(弱升AND C>=O,C,O,3,1),COLOR00FFFF;STICKLINE(弱升AND C<O,C,O,3,0),COLOR009999;STICKLINE(弱升AND C<O,C,O,0.3,0),COLOR00FFFF;STICKLINE(FILTER(TJ1,3),C,O,4,0),COLOR0000FF;DRAWICON(FILTER(XG,3),L*0.985,23);GET:=ZIG(3,3),COLORYELLOW;PL5:=ZIG(3,5);EN1:=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);EX1:=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);PL10:=ZIG(3,10);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,20);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,40);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'(A)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFF00FF;DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'(C)'),COLOR0000FF;DRAWTEXT(EN2 AND DTJZ10=1,L*0.93,'Ⅰ'),COLORFF00FF;DRAWTEXT(EX2 AND DTJD10=2,H*1.05,'Ⅱ'),COLORFFFF00;DRAWTEXT(EN3 AND ZTJZ10=1,L*0.93,'Ⅲ'),COLOR0000FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.03,'①'),LINETHICK3,COLOR00FFFF; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.95,'②'),LINETHICK3,COLOR00FFFF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2)AND EX2,H*1.03,'③'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.95,'④'),LINETHICK3,COLOR00FFFF;TJ11:=EN2 AND ZTJZ5=1;TJ22:=EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2;TJ33:=EN2 AND DTJZ10=1;TJ44:=EN3 AND ZTJZ10=1;TJ55:=EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2;XG22:=TJ11 OR TJ22 OR TJ33 OR TJ44 OR TJ55;MM:=C>HRY33 AND HRY33 >=REF(HRY33 ,1);QQ:=HRY33>=REF(HRY33 ,1);XG11:=CROSS(C,HRY33) AND QQ AND MM;BUY1:=LAST(CLOSE>MA(CLOSE,55),0,5);BUY2:=EXIST(CLOSE<MA(CLOSE,55),5);BUY:=CLOSE>MA(CLOSE,55)&&BUY1&&BUY2;W18:=FILTER(EXIST(XG11 OR BUY,1),5);STICKLINE(W18,C,(C+O)/2,4,0),COLORFF00FF;DRAWTEXT(W18,L*0.97,'牛'),COLOR00FFFF;X1:=REF(C,1)/HHV(H,20)<0.82;X2:=(MIN(C,O)-L)/(H-L)>0.67;X3:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)<0.33;X4:=ABS(C-O)/C<0.01;DOWN:=O>C;X5:=COUNT(DOWN,7)>=5;XG8:=X1 AND X2 AND X3 AND X4 AND X5;DRAWTEXT(XG8,L*0.98,'螺'),COLOR00FFFF;AA:=REF(C,1)/REF(O,1)<0.96;BB:=C/O>1.03;CC:=C>REF(O,1);TJ81:=AA AND BB AND CC;X81:=REF(C,1)/HHV(H,20)<0.82;DN:=O>C;X82:=COUNT(DN,7)>=5;X83:=C=HHV(C,3);XG81:=TJ81 AND X81 AND X82;XG82:=X81 AND X82 AND X83;XG88:=XG81 OR XG82;DRAWTEXT(XG88,L*0.96,'反'),COLOR00FFFF;X01:=REF(C,1)/HHV(H,21)<0.77;{DOWN1:=O>C;X02:=COUNT(DOWN1,9)>=6;}X03:=ABS(C-O)/C<0.008;X04:=(H-L)/C>0.025;XG0:=X01 AND X03 AND X04;DRAWTEXT(XG0,L*0.97,'星'),COLOR00FFFF;S1:=REF(C,1)/LLV(L,W)>1.30;S2:=(H-MAX(C,O))/(H-L)>0.60;S3:=ABS(C-O)/C<0.03;S4:=(H-O)/C>0.05 AND C<O;SAL1:=S1 AND S2 AND S3;SAL2:=S1 AND ABS(C-O)/C>0.05 AND C<O;SAL3:=S1 AND ABS(C-O)/C<0.001;SAL4:=S1 AND S4;SAL5:=(H-MAX(C,O))/(H-L)>0.67 AND C<O AND S3;SAL:=SAL1 OR SAL2 OR SAL3 OR SAL4 OR SAL5;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),4.1,1)/SMA(ABS(CLOSE-LC),4.1,1)*100;黄买:=FILTER((REF(CLOSE,2)<CLOSE AND RSI<25),7);黄卖:=FILTER((REF(CLOSE,2)>CLOSE AND RSI>80),7);红买:=FILTER(CROSS(RSI,11),7);红卖:=FILTER(CROSS(89,RSI),7);绿买:=FILTER(CROSS(RSI,20),7);绿卖:=FILTER(CROSS(80,RSI),7);SL1:=红卖AND 绿卖;SL2:=红卖AND 绿卖AND 黄卖;BU:=红买AND 绿买;SS1:=CROSS(MA(C,5),C);SS2:=(REF(C,1)-C)/REF(C,1)>0.04;SS3:=O<REF(C,1);JJ1:=SS1 AND SS2 AND SS3;SSL:=JJ1 AND S1;SAL8:=FILTER(SAL OR SSL,5);DRAWTEXT(SAL8 OR SL1 OR SL2,H*1.02,'卖'),COLOR00FF00; STICKLINE(SAL8 OR SL1 OR SL2,C,O,1,0),COLORFF0000; DRAWTEXT(SAL8 AND SL1 AND SL2,H*1.02,'必卖'),COLOR00FF00; MA20:=MA(CLOSE,20);AA10:=MA(CLOSE,8);中期大底:=LLV(LOW,30);支撑:=HHV(EMA(((((OPEN + LOW) + HIGH) + CLOSE) / 4),5),60);压力一:=HHV(LOW,20);中线:=MA(CLOSE,3);天:=(MA(LOW,15) * 0.985);人:=(MA(LOW,15) * 0.96);地:=(((HIGH + LOW) + CLOSE) / 3);B1:=HHV(地,(4 * 15));B6:=LLV(地,(4 * 15));B7:=(B1 - B6);B8:=(MA(((地- B6) / B7),2) * 80);短期底部:=(LLV(HIGH,30) * 0.93);MA80:=LLV(HIGH,30);压力二:=(SMA(HIGH,21,2) * 1.035);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RSV8:=SMA(下档线,3,1);K8:=SMA(RSV8,3,1);D8:=((3 * RSV8) - (2 * K8));J12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);K24:=SMA(SMA(J12,3,1),3,1);D24:=((3 * SMA(J12,3,1)) - (2 * K24));压力位:=IF(CROSS(D24,D),HIGH,L);长期底部:=LLV(HIGH,30);X18:=EMA((((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6),10);逃遁:=(SMA(HIGH,21,2) * 1.05);TJ18:=FILTER(((((LLV(LOW,0) AND ((MA(CLOSE,37) - REF(MA(CLOSE,37),1)) > 0)) AND (LOW <= 短期底部)) AND (WINNER(CLOSE) < 0.05)) AND ((CLOSE / OPEN)> 0.13)),7);图公式2代码PJJ:=DMA((H + L + C * 2) / 4,0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=VOL / ((H - L) * 2 - ABS(C - O));XVL:=IF(C > O,QJJ * (H - L),IF(C < O,QJJ * (H - O + (C - L)),VOL / 2))+ IF(C > O,0 - QJJ * (H - C + (O - L)),IF(C < O,0 - QJJ * (H - L),0 - VOL / 2)); HSL:=XVL / 20 / 1.15;攻击流量:=HSL * 0.55 + REF(HSL,1) * 0.33 + REF(HSL,2) * 0.22;GJJ:=EMA(攻击流量,2);DIFF:=(EMA(GJJ,12)-EMA(GJJ,26)),COLORGREEN;DEA:=MA(DIFF,2),COLORYELLOW;VA2:=LLV(LOW,33);VA3:=HHV(HIGH,21);VA4:=EMA((CLOSE-VA2)/(VA3-VA2)*100,10)*-1+100;趋势:=100-EMA(0.191*REF(VA4,1)+0.809*VA4,1);趋势线:=100-EMA(0.191*REF(VA4,1)+0.809*VA4,1);STICKLINE(DIFF>DEA AND 趋势线>REF(趋势线,1),HHV(H,5)*1.05,LLV(L,5)*0.95,4,0),COLOR781836;DRAWKLINE(H,O,L,C);V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);V2:=(1-7/100)*(DMA(CLOSE,V1));V3:=(1+7/100)*(DMA(CLOSE,V1));V5:=MA((LOW+HIGH+CLOSE)/3,5);支撑:REFDATE(V2,DATE),POINTDOT,LINETHICK3,COLORCC66FF;阻力:REFDATE(V3,DATE),POINTDOT,LINETHICK3,COLORGREEN;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); 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:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;STICKLINE(VAR19,L,L*0.98,3,0),COLORYELLOW;VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;STICKLINE(VAR1A,H*1.01,H,3,0),COLOR00FF00{98FD};MA3:MA(C,3);MA5:MA(C,5),COLORWHITE;MA10:=MA(C,10),NODRAW;MA30:MA(C,34),NODRAW;五日乖离率:=(C-MA5)/MA5*100;BB5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;IF(BB5>30 AND MA5>REF(MA5,1), MA5,DRAWNULL),LINETHICK1,COLORRED;BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;IF(BB5<0 AND MA5<REF(MA5,1), MA5,DRAWNULL),LINETHICK1,COLORGREEN;DD5:=MA5<REF(MA5,1);IF(DD5,MA5,DRAWNULL),COLOR00FF00;X0:=(3*C+L+O+H)/6;多空线: (20*X0+19*REF(X0,1)+18*REF(X0,2)+17*REF(X0,3)+16*REF(X0,4)+15*REF(X0,5)+14*REF(X0,6)+13*REF(X0,7)+12*REF(X0,8)+11*REF(X0,9)+10*REF(X0,10)+9*REF(X0,11)+8*REF(X0,12)+7*REF(X0,13)+6*REF(X0,14)+5*REF(X0,15)+4*REF(X0,16)+3*REF(X0,17)+2*REF(X0,18)+REF(X0,20))/210,COLORFF00FF,LINETHICK1;{用法:黄托底买进,绿压顶买出。
ddx指标源码范文
ddx指标源码范文以下是一个针对ddx指标的源码示例:```pythonimport pandas as pddef calculate_ddx(data, window):"""计算ddx指标参数:data: pd.DataFrame,包含需要计算的数据的数据框,需要包含至少一列收盘价('close')window: int,计算ddx指标的窗口大小返回值:ddx: pd.Series,计算得到的ddx指标的数列"""#计算DDX指标data['chg'] = data['close'].diff( # 计算价格变动data['vol_chg'] = data['volume'].diff( # 计算成交量变动data['ddx'] = data['chg'] * data['vol_chg'] # 计算DDX指标data['ddx'] = data['ddx'].rolling(window).sumreturn data['ddx']#使用示例#读取数据data = pd.read_csv('data.csv')#转换日期列的数据类型#按日期升序排序data = data.sort_values('date')#计算DDX指标ddx = calculate_ddx(data, 10)#输出结果print(ddx)```上述代码使用Python编写,使用了pandas库来处理数据。
主要包含一个`calculate_ddx`函数,用于计算ddx指标。
函数接受数据框和窗口大小作为参数,返回计算得到的ddx指标数列。
在函数内部,首先计算出价格和成交量的变动数据,然后将这两者相乘得到ddx指标,并使用滚动求和的方式计算滑动窗口内的ddx指标。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
通达信绝对高手DDX指标
DRAWBAND(0,RGB(0,139,255),0.5,RGB(0,139,255)),COLORFF8B00;
DRAWBAND(0.5,RGB(0,120,0),1,RGB(0,120,0)),COLOR007800;
DRAWBAND(1,RGB(187,0,187),1.5,RGB(187,0,187)),COLORBB00BB;
DRAWBAND(1.5,RGB(255,58,133),2,RGB(255,58,133)),COLOR853AFF;
DRAWBAND(2,RGB(255,152,0),2.5,RGB(255,152,0)),COLOR0098FF;
DRAWTEXT(ISLASTBAR,0.25,'███'),COLORFF8B00; DRAWTEXT(ISLASTBAR,0.25,'冰冻'),COLORFFFFCC; DRAWTEXT(ISLASTBAR,0.75,'███'),COLOR007800; DRAWTEXT(ISLASTBAR,0.75,'冷门'),COLORWHITE; DRAWTEXT(ISLASTBAR,1.25,'███'),COLORBB00BB; DRAWTEXT(ISLASTBAR,1.25,'活跃'),COLORFFFFCC;
DRAWTEXT(ISLASTBAR,1.75,'███'),COLOR853AFF; DRAWTEXT(ISLASTBAR,1.75,'热门'),COLORWHITE; DRAWTEXT(ISLASTBAR,2.25,'███'),COLOR0098FF; DRAWTEXT(ISLASTBAR,2.25,'高温'),COLORWHITE; {计算数据} R:=PERIOD;
S:=FROMOPEN;VA1:=EMA(CAPITAL/IF(R=0,SUM(VOL,S),VOL)/CLOSE,10)/CLOSE;
地:IF(VA1>=2.5,2.5,VA1),COLORYELLOW,LINETHICK2; 天:
POW(ATAN(EMA(CAPITAL/IF(R=0,SUM(VOL,S),VOL)/CLOSE,10)),2),COLORB5CA43,LINE THICK2; 趋势: EMA(WINNER(CLOSE)*100,10)/50,LINETHICK2,COLOR0015FF; 买卖: EMA((-3)*(HHV(HIGH,30)-CLOSE)/(HHV(HIGH,30)-LLV(LOW,30))+2.7,9),COLORWHITE, LINETHICK2; {低位信号} 低①:买卖<0,COLORRED,NODRAW; STICKLINE(低
①,0,-0.1,3,0), COLORRED; 低②:买卖<0.1 AND 买卖>0 AND 买卖>=ref(买
卖,1),COLORGREEN,NODRAW; STICKLINE(低②,0,-0.1,2.5,0), COLORGREEN; 低③:买卖
<0.25 AND 买卖>0.1 AND 买卖>=ref(买卖,1),COLORYELLOW,NODRAW; STICKLINE(低
③,0,-0.1,2,0), COLORYELLOW; 低A:买卖<0 AND 买卖>=ref(买
卖,1),COLOR0099FF,NODRAW; STICKLINE(低A,0.1,-0.1,3,0), COLOR0099FF; 低B:买卖<ref(HHV(买卖,5),4) AND 买卖>=ref(买卖,1) AND 买卖<0.8 AND 趋势>=ref(趋势,1) AND ref(EXIST(买卖<=ref(买卖,1),2),1) AND ref(EXIST(买卖
<=0,10),8),COLOR0099FF,NODRAW; STICKLINE(低B,0.3,0,3,0), COLOR0099FF; {高位信号} 高①:买卖>2.5 AND 买卖>ref(买卖,1),COLORRED,NODRAW; STICKLINE(高
①,2.6,2.4,3,0),COLORRED; 高②:天>=1.9 AND 买卖>=2.2 AND CROSS(ref(HHV(买
卖,3),3),天),COLOR007800,NODRAW; STICKLINE(高②,2.6,2.4,2.5,0),COLOR007800; 高③:天<1.77 AND 买卖>=2.2 AND CROSS(ref(HHV(买卖,7),6),
天),COLORFF8B00,NODRAW; STICKLINE(高③,2.6,2.4,2,0),COLORFF8B00; 高A:买
卖>2.45 AND 买卖<2.5 AND 买卖<=ref(买卖,1), COLORRED,NODRAW; STICKLINE(高A,2.5,2.4,3,0), COLORRED; 高B:买卖>ref(LLV(买卖,5),4) AND 买卖<=ref(买卖,1) AND 买卖>1.5 AND 趋势<=ref(趋势,1) AND ref(EXIST(买卖>=ref(买卖,1),2),1) AND
ref(EXIST(买卖>=2.48,10),8), COLOR0099FF,NODRAW; STICKLINE(高B,2.7,2.4,3,0), COLOR0099FF;。