机构入场通达信指标公式源码
通达信指标公式源码分时指标机构买卖散户买卖指标无未来
通达信指标公式源码分时指标机构买卖散户买卖指标无未来通达信是一种常用的股票行情分析软件,它内置了各种指标公式供投资者使用。
在通达信中,分时指标、机构买卖指标和散户买卖指标是常用的分析工具之一1.分时指标分时指标是一种用来分析股票交易活跃度和市场热度的技术指标。
在通达信中,分时指标可以通过公式语言来计算。
分时成交量公式:v:=MA(VOL,5);ma:=MA(CLOSE,V);ratio:=TURNOVER / v / ma;indicator1:=IF(ratio>=1.1, 1, IF(ratio<=0.9, -1, 0));其中,v表示成交量的5日简单移动平均,ma表示收盘价的移动平均,ratio表示成交额与成交量和收盘价的关系,indicator1表示分时指标的结果。
2.机构买卖指标机构买卖指标是一种用来分析机构投资者的买卖动向的技术指标。
在通达信中,机构买卖指标可以通过公式语言来计算。
机构买卖指标公式:ma:=MA(CLOSE,120);ratio:=MA(CLOSE/ma,30);indicator2:=IF(ratio>1, 1, IF(ratio<1, -1, 0));其中,ma表示收盘价的120日移动平均,ratio表示收盘价与ma的比值的30日移动平均,indicator2表示机构买卖指标的结果。
3.散户买卖指标散户买卖指标是一种用来分析散户投资者的买卖动向的技术指标。
在通达信中,散户买卖指标可以通过公式语言来计算。
散户买卖指标公式:indicator3:=REF(((C-L+H-C)/(H-L))*VOL,1);其中,C、L、H分别表示收盘价、最低价和最高价,VOL表示成交量,indicator3表示散户买卖指标的结果。
需要注意的是,以上指标公式仅为示例,在实际使用中可能需要根据具体需求进行调整和修改。
另外,以上指标仅为分析工具,不能作为独立决策的依据,投资者应结合其他因素进行综合分析和判断。
#通达信#(操盘密码)机构专用公式源...
#通达信#(操盘密码)机构专用公式源...
#通达信#(操盘密码)机构专用公式源码(指标主图/副图/选股通达信贴图无未来)今天给大家带来一款非常容易上手的机构内部指标,包含选股器。
此选股器经过本人多年的优化,非常的干净,成功率也是非常的高。
下方配图有详细介绍。
我也不浪费大家时间,直接给大家上公式源码。
M1:=5;
M2:=10;
M3:=20;
M4:=60;
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
BM:=EMA(C,2);
SM:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(BM,SM);
SEL:=CROSS(SM,BM);
DRAWICON(BU,L-0.03,1);
DRAWICON(SEL,H+0.03,2);
CPX:=MA(CLOSE,9),COLORCYAN;
JDX:=MA(CLOSE,20),COLORMAGENTA;
STICKLINE(BM>=SM,LOW,HIGH,0,1),COLORRED;
#感谢头条我要上热门##我要上微头条#。
通达信机构K线+MACD波段涨跌源码指标公式
通达信机构K线+MACD波段涨跌源码指标公式DIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA1:=EMA(DIF1,9);MACD1:=2*(DIF1-DEA1),STICK;MACD2:=EMA(MACD1,3);STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3.2,0),COLOR000055;STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2.7,0),COLOR000077;STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2.1,0),COLOR000099;STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1.5,0),COLOR0000BB;STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.9,0),COLOR0000DD;STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.3,0),COLOR0000FF;STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3.2,0),COLOR555555;STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2.7,0),COLOR777777;STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2.1,0),COLOR999999;STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1.5,0),COLORBBBBBB;STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.9,0),COLORDDDDDD;STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.3,0),COLORFFFFFF;STICKLINE(MACD1<MACD2,0,MACD1,3.2,0),COLORB20000;STICKLINE(MACD1<MACD2,0,MACD1,2.7,0),COLOREC0000;STICKLINE(MACD1<MACD2,0,MACD1,2.1,0),COLORFF4600;STICKLINE(MACD1<MACD2,0,MACD1,1.5,0),COLORFF6300;STICKLINE(MACD1<MACD2,0,MACD1,0.9,0),COLORFF8B00;STICKLINE(MACD1<MACD2,0,MACD1,0.3,0),COLORFFAB00;STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;DIF:DIF1,COLOR33FF33,LINETHICK1;DEA:DEA1,COLORYELLOW,LINETHICK1;MACD:MACD1,NODRAW,COLORMAGENTA;N:=7; N2:=8; N3:=9;VAR1:=REF(MA(C,20),10);开:=O-VAR1;高:=H-VAR1;低:=L-VAR1;收:=C-VAR1;MID:=MA(C,20);UPPER:=MID+2*STD(C,20);LOWER:=MID-2*STD(C,20);V1:=(C-LOWER)/(UPPER-LOWER)*100;V2:=V1-EMA(V1,5);K1:=SUM(LLV(V2,4),4)/4;V3:=EMA(V2,64)*10;V4:=EM A(0.4*V2*(-1),3);V5:=-1*EMA(V2,39)*10;A:=V3>10;B:=V2>V4;D:=V5>10;E:=V3<=10 OR V2<=V4 OR V5<=10;均线1:MA(收, N);均线2:MA(收, N2);均线3:MA(收, N3);STICKLINE(C,0,0,6,0),COLORD9D919;STICKLINE(收>=开 AND E,高,低,0,0), COLORYELLOW;STICKLINE(收>=开 AND E,收,开,2,0) ,COLORYELLOW;STICKLINE(收< 开 AND E,高,低,0,0) ,COLORYELLOW;STICKLINE(收< 开 AND E,收,开,2,0) ,COLORYELLOW;STICKLINE(开> 收 AND A ,低,高,0,0),COLORFF0000; STICKLINE(开> 收 AND A ,收,开,2,0),COLORFF0000; STICKLINE(开<=收 AND A,低,高,0,0),COLORYELLOW; STICKLINE(开<=收 AND A,收,开,2,1),COLORYELLOW; STICKLINE(开> 收 AND B,低,高,0,0),COLORRED; STICKLINE(开> 收 AND B,收,开,2,0),COLORRED; STICKLINE(开<=收 AND B,低,高,0,0),COLORRED; STICKLINE(开<=收 AND B,收,开,2,1),COLORRED; STICKLINE(开> 收 AND D,低,高,0,0),COLORGREEN; STICKLINE(开> 收 AND D,收,开,2,0),COLORGREEN; {STICKLINE(开<=收 AND D,收,开,2,1),COLORGREEN};。
通达信_指标公式源码大全
通达信_指标公式源码大全通达信是国内最早的股票行情软件之一,其强大的技术分析指标系统是其最大的特点之一、通达信的指标公式源码可以帮助广大投资者深入理解和研究不同的技术指标,并且根据自己的需求进行二次开发。
以下是通达信中一些常用指标的简要介绍和其对应的指标公式源码:1.移动平均线(MA):MA(CLOSE,N)=SUM(CLOSE,N)/N2.指数平滑移动平均线(EMA):EMA(CLOSE,N)=(2*CLOSE+(N-1)*REF(EMA(CLOSE,N),1))/(N+1)3.相对强弱指数(RSI):RSI(CLOSE,N)=SMA(MAX(CLOSE-REF(CLOSE,1),0),N,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),N,1)*1004.动力指数(DMI):H1=MAX(HIGH-REF(HIGH,1),0)L1=ABS(LOW-REF(LOW,1),0)DMP=SUM(((H1>L1)AND(H1>0.00))?H1:0,N)DMM=SUM(((L1>H1)AND(L1>0.00))?L1:0,N)PDI=DMP/SUM(TR,N)*100MDI=DMM/SUM(TR,N)*1005.布林带(BOLL):MB=MA(CLOSE,N)UP=MB+P*STD(CLOSE,N)DN=MB-P*STD(CLOSE,N)6.相对强弱指标(RSI):LC:=REF(CLOSE,1)TRY:=CLOSE-LCUY:=SUM(MAX(MAX(CLOSE-LC,0),ABS(CLOSE-LC-LC1)),N)DY:=SUM(MAX(MAX(LC-CLOSE,0),ABS(CLOSE-LC-LC1)),N)需要注意的是,在使用这些源码时,要理解每个指标的具体计算过程和意义,以及与股票行情数据之间的关系。
同时,根据自身的需求进行适当的修改和优化,以满足个人的投资研究需求。
不传之秘绝佳入场点通达信指标公式源码
不传之秘绝佳入场点通达信指标公式源码一、移动平均线指标移动平均线是常用的股票指标之一,用于平滑价格数据,常用的移动平均线包括简单移动平均线(MA)、指数移动平均线(EMA)和加权移动平均线(WMA)。
1.简单移动平均线(MA):MA(CLOSE,N):返回N周期的简单移动平均线值。
源码如下:```AVG:MA(CLOSE,N);```2.指数移动平均线(EMA):EMA(CLOSE,N):返回N周期的指数移动平均线值。
源码如下:```EMV:EMA(CLOSE,N);```3.加权移动平均线(WMA):WMA(CLOSE,N):返回N周期的加权移动平均线值。
源码如下:```WMA:WMA(CLOSE,N,WEIGHT);```二、相对强弱指标(RSI)RSI是衡量股票相对强弱的指标,是常用的超买超卖指标,用于判断股票价格是否超过买入或卖出的阈值。
RSI(CLOSE,N1):返回N1周期的RSI值。
源码如下:```RSI:RSI(CLOSE,N1);```三、随机指标(KDJ)KDJ指标是一种相对于RSI更加灵敏的超买超卖指标,由K、D和J 三个参数组成。
KDJ(N,M1,M2):返回N周期的K、D和J值。
源码如下:```LC:REF(CLOSE,1);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;```四、MACD指标MACD指标是一种趋势跟踪指标,由快速线、慢速线和信号线组成,用于判断股票的买入和卖出信号。
MACD(12,26,9):返回MACD指标的快速线、慢速线和信号线的数值。
源码如下:```DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:EMA(DIF,MID);MACD:(DIF-DEA)*2,COLORSTICK;```五、布林带指标布林带指标用于判断价格的高低波动区间,由上轨、中轨和下轨组成。
通达信收藏版发现机构入场选股公式
通达信收藏版发现机构入场选股公式发现机构入场:=0.24;选股公式 :=EMA(CLOSE,12)-EMA(CLOSE,26);SWWWW7:=EMA(选股公式 ,9);SWWWW8:=(选股公式 -SWWWW7)*2;SWWWW9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VVVSS0:=SMA(SWWWW9,3,1);VVVSS1:=SMA(VVVSS0,3,1);VVVSS2:=3*VVVSS0-2*VVVSS1;VVVSS3:=VOL>REF(VOL,1)*1.9 AND CLOSE>REF(CLOSE,1) AND CLOSE/REF(CLOSE,1)-1>=0.049 AND (HIGH-CLOSE)/(CLOSE-OPEN)<0.33 OR (CLOSE/REF(CLOSE,1)-1>=0.0502 AND CLOSE>REF(CLOSE,1) AND VOL>REF(VOL,1) AND VOL>REF(VOL,1)*2.5 AND (HIGH-CLOSE)/(CLOSE-OPEN)<0.33);VVVSS4:=IF(FILTER(VVVSS3 OR (CLOSE/REF(CLOSE,1)-1>=0.0502 AND CLOSE>REF(CLOSE,1) AND (OPEN-LOW)/(CLOSE-OPEN)>=1.48 AND LOW<REF(LOW,1) AND LOW<REF(LOW,2)) OR CLOSE/REF(CLOSE,1)-1>=0.08 AND EMA(2.055*EMA(EMA(HIGH,34),34)-EMA(EMA(LOW,34),34),5)>CLOSE,34),1,0) AND IF(CLOSE/REF(CLOSE,1)>1+0.01*9+EXIST(CLOSE/REF(CLOSE,1)> 1+0.01*9,10)+CLOSE/REF(CLOSE,1)>1+0.01*9=3,1,0);VVVSS5:=FILTER(CLOSE/REF(CLOSE,1)>1.048 AND CLOSE=HIGH AND BETWEEN(FORCAST(VOL,4),0.2*FORCAST(VOL,12),2.1*FORCAST( VOL,12)),28)*100 AND LOW>REF(CLOSE,1)*0.93;VVVSS6:=SMA(20*(DMA(CLOSE,2.5*MAX(VOL/700000000,1.1*(MAX(HIGH,REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1)))/REF(DMA(CLOSE,2.5*MAX(VOL/700000000,1.1*(MAX(HIGH, REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1))),1)-1),2,1)>发现机构入场;VVVSS7:=CROSS(IF(VVVSS6 AND EMA(SMA(20*(DMA(CLOSE,2.5*MAX(VOL/700000000,1.1*(MAX( HIGH,REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1)))/REF(DMA(CLOSE,2.5*MAX(VOL/700000000,1.1*(MAX(HIGH, REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1))),1)-1),2,1),2)>=0.005 AND CLOSE>=REF(CLOSE,1),1,0),0.5);VVVSS8:=SMA(20*(DMA(CLOSE,2.5*MAX(VOL/700000000,1. 1*(MAX(HIGH,REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1)))/REF(DMA(CLOSE,2.5*MAX(VOL/700000000,1.1*(MAX(HIGH, REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1))),1)-1),2,1)>0.24;VVVSS9:=COUNT(IF(VVVSS8 AND EMA(SMA(20*(DMA(CLOSE,2.5*MAX(VOL/700000000,1.1*(MAX( HIGH,REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1)))/REF(DMA(CLOSE,2.5*MAX(VOL/700000000,1.1*(MAX(HIGH, REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1))),1)-1),2,1),2)>=0.005 AND CLOSE>=REF(CLOSE,1),1,0)>0.5,10);VSEWW:VVVSS5 OR (VVVSS2-REF(VVVSS2,1)>30 AND CLOSE/REF(CLOSE,1)>1.043 AND SWWWW8>0 AND SWWWW7>0) AND VVVSS7 AND VVVSS9=1 OR VVVSS4,COLORMAGENTA;。
通达信指标公式源码 自动画线主图指标公式
N1:=10;N2:=10;DISP:=2;K:=IF(PERIOD=5,1,{日}IF(PERIOD=6,1,{周}IF(PERIOD=7,1,{月}IF(PERIOD=8,1,{多分钟}IF(PERIOD=9,1,{多日}IF(PERIOD=10,1,{季}IF(PERIOD=11,2,{年}IF(PERIOD=4,1,{60F}IF(PERIOD=3,1,{30F}IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10;P1:=PEAK(1,K*N1,1);P2:=PEAK(1,K*N1,2);WP1:=PEAKBARS(1,K*N1,1);WP2:=PEAKBARS(1,K*N1,2);T1:=TROUGH(2,K*N2,1);T2:=TROUGH(2,K*N2,2);WT1:=TROUGHBARS(2,K*N2,1);WT2:=TROUGHBARS(2,K*N2,2);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4 ),1));TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA; DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;中枢高:=PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED; 中枢低:=PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGRE EN;{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;} 趋势高:=PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;趋势低:=PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0); 局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0); 缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0); 距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0); 高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0); 低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) ORREF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;{大折线}A1:=REF(HIGH,10)=HHV(HIGH,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);D1:=FILTER(C1,10);{高点}A2:=REF(LOW,10)=LLV(LOW,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);D2:=FILTER(C2,10);{低点}E1:=(REF(LLV(LOW,2*10),1)+REF(HHV(HIGH,2*10),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;L1:=(D2 AND NOT((D1 AND E1<E2)));H2:=D1 AND NOT((D2 AND E1>=E2));X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1)); G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORMAGENTA,DOTLINE,LINETHICK1; DRAWLINE(HD,H,LD,L,0),COLORMAGENTA,DOTLINE,LINETHICK1;J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BARSLAST(LD),H,L ),0),COLORWHITE,LINETHICK1;{趋势线}UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);DRAWLINE(XX,L,VV,L,1),COLORRED,LINETHICK2;UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);DRAWLINE(XX2,H,VV2,H,1),COLORGREEN,LINETHICK2;。
通达信指标公式源码 机构,大户,中户,散户资金流副图 资金出入一目了然 贴图
V1:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);HY1:=REF(EMA(V1,3),1);多空趋势:=(MA((CLOSE - HY1) * 10,2))*0.1;操盘4:STICKLINE(多空趋势>=0 AND 多空趋势>=REF(多空趋势,1),6.5,6.5+多空趋势,1.5,0),COLORRED;减仓4:STICKLINE(多空趋势>=0 AND 多空趋势< REF(多空趋势,1),6.5,6.5+多空趋势,1.5,0), COLORRED;反弹4:STICKLINE(多空趋势<0 AND 多空趋势>=REF(多空趋势,1),6.5,6.5+多空趋势,1.5,0),COLORGREEN;寻底4:STICKLINE(多空趋势<0 AND 多空趋势< REF(多空趋势,1),6.5,6.5+多空趋势,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(多空趋势>=0,6,6.3),' 多空'),COLORWHITE;换手:=V*100/CAPITAL;主力:=MA(换手,4);大户:=MA(换手,9);中户:=MA(换手,17);散户:=MA(换手,34);均量:=(主力+大户+中户+散户)/4;成交量:V,COLORWHITE,NODRAW;主力能量:(主力-均量)COLORMAGENTA,NODRAW;大户能量:(大户-均量)COLORYELLOW,NODRAW;中户能量:(中户-均量)COLORLIBLUE,NODRAW;散户能量:(散户-均量)COLORBLUE,NODRAW;操盘:STICKLINE(主力能量>=0 AND 主力能量>=REF(主力能量,1),4.5,4.5+主力能量,1.5,0),COLORYELLOW;减仓:STICKLINE(主力能量>=0 AND 主力能量< REF(主力能量,1),4.5,4.5+主力能量,1.5,0),COLORRED;反弹:STICKLINE(主力能量<0 AND 主力能量>=REF(主力能量,1),4.5,4.5+主力能量,1.5,0),COLORGREEN;寻底:STICKLINE(主力能量<0 AND 主力能量< REF(主力能量,1),4.5,4.5+主力能量,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(主力能量>=0,4.2,4.8),' 机构'),COLORMAGENTA;操盘1:STICKLINE(大户能量>=0 AND 大户能量>=REF(大户能量,1),3,3+大户能量,1.5,0),COLORWHITE;减仓1:STICKLINE(大户能量>=0 AND 大户能量< REF(大户能量,1),3,3+大户能量,1.5,0),COLORRED;反弹1:STICKLINE(大户能量<0 AND 大户能量>=REF(大户能量,1),3,3+大户能量,1.5,0),COLORGREEN;寻底1:STICKLINE(大户能量<0 AND 大户能量< REF(大户能量,1),3,3+大户能量,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(大户能量>=0,2.7,3.3),' 大户'),COLORYELLOW;操盘2:STICKLINE(中户能量>=0 AND 中户能量>=REF(中户能量,1),1.5,1.5+中户能量,1.5,0),COLORRED;减仓2:STICKLINE(中户能量>=0 AND 中户能量< REF(中户能量,1),1.5,1.5+中户能量,1.5,0),COLORRED;反弹2:STICKLINE(中户能量<0 AND 中户能量>=REF(中户能量,1),1.5,1.5+中户能量,1.5,0),COLORGREEN;寻底2:STICKLINE(中户能量<0 AND 中户能量< REF(中户能量,1),1.5,1.5+中户能量,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(中户能量>=0,1.2,1.8),' 中户'),COLORLIBLUE;操盘3:STICKLINE(散户能量>=0 AND 散户能量>=REF(散户能量,1),0,散户能量,1.5,0),COLORRED;减仓3:STICKLINE(散户能量>=0 AND 散户能量< REF(散户能量,1),0,散户能量,1.5,0),COLORRED;反弹3:STICKLINE(散户能量<0 AND 散户能量>=REF(散户能量,1),0,散户能量,1.5,0),COLORGREEN;寻底3:STICKLINE(散户能量<0 AND 散户能量< REF(散户能量,1),0,散户能量,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(散户能量>=0,-0.3,0.3),' 散户'),COLORBLUE;JZ:=V/(ABS(主力能量)+ABS(大户能量)+ABS(中户能量)+ABS(散户能量));ZLCJ:=JZ*ABS(主力能量);DHCJ:=JZ*ABS(大户能量);ZHCJ:=JZ*ABS(中户能量);SHCJ:=JZ*ABS(散户能量);机构量:ZLCJ,COLORMAGENTA,NODRAW;大户量:DHCJ,COLORYELLOW,NODRAW;中户量:ZHCJ,COLORLIBLUE,NODRAW;散户量:SHCJ,COLORBLUE,NODRAW;。
神奇优化的间谍机构通达信指标公式源码
此指标使用简单,很方便可以看到机构进场VAR1C:=(HIGH - MIN(OPEN,CLOSE));VAR2C:=(CLOSE - OPEN);VAR3C:=(MIN(OPEN,CLOSE) - LOW);VAR4C:=(HIGH - LOW);VAR5C:=((VOL * VAR1C) / VAR4C);VAR6C:=((VOL * VAR2C) / VAR4C);VAR7C:=((VOL * VAR3C) / VAR4C);VAR8C:=((VAR5C - VAR6C) - VAR7C);VAR4:=MA(CLOSE,5);VAR5:=MA(CLOSE,10);VAR6:=MA(CLOSE,30);VAR7:=MA(CLOSE,60);VAR8:=EMA(COST(85),7);VAR9:=EMA(COST(15),7);VARA:=(SUM(((CLOSE * VOL) * 100),4) / SUM((VOL * 100),4));VARB:=(INTPART((VARA * 100)) / 100);VARC:=(SUM(((CLOSE * VOL) * 100),7) / SUM((VOL * 100),7));VARD:=(INTPART((VARC * 100)) / 100);VARE:=(SUM(((CLOSE * VOL) * 100),28) / SUM((VOL * 100),28));VARF:=(INTPART((VARE * 100)) / 100);短线趋势:(EMA(CLOSE,5) - EMA(CLOSE,10));中线趋势:EMA(短线趋势,9);VAR10:=((0 - ((100 * (HHV(CLOSE,5) - CLOSE)) / (HHV(CLOSE,5) - LLV(LOW,5)))) + 100);VAR11:=((0 - ((100 * (HHV(CLOSE,10) - CLOSE)) / (HHV(CLOSE,10) - LLV(LOW,10)))) + 100);VAR12:=((0 - ((100 * (HHV(CLOSE,20) - CLOSE)) / (HHV(CLOSE,20) - LLV(LOW,20)))) + 100);VAR13:=((0 - ((100 * (HHV(CLOSE,30) - CLOSE)) / (HHV(CLOSE,30) - LLV(LOW,30)))) + 100);VAR14:=REF(中线趋势,1);VAR15:=中线趋势;VAR16:=(VAR15 - VAR14);VAR17:=REF(短线趋势,1);VAR18:=短线趋势;VAR19:=(VAR18 - VAR17);VAR1A:=OPEN;VAR1B:=CLOSE;发现机构入场:IF((((((((VAR1A <= VAR4) AND (VAR1A <= VAR5)) AND (VAR1A <= VAR6)) AND (VAR1B >= VAR4)) AND (VAR1B >= VARF)) AND (VAR16 > 0)) AND (VAR19 > 0)),0.5,0),LINETHICK2,COLOR66FF00;短线指标:IF(((((CROSS(短线趋势,中线趋势) AND (短线趋势< 0)) AND (中线趋势< (0 - 0.2)+4)) AND (VAR11 > 45)) AND (VAR16 > 0)),0.4,0.1),COLORMAGENTA;BU:=CROSS(短线趋势,中线趋势);DRAWICON(CROSS(短线趋势,中线趋势),中线趋势,1);横盘突破:(LAST((H-L)/REF(C,1)<0.1,20,0) AND VOL>REF(VOL,1)*2 AND C>REF(C,1)*1.03AND "DMI.PDI">"DMI.MDI" AND "DMI.ADX">"DMI.ADXR" AND"DMI.ADXR">"DMI.MDI" AND "DMI.PDI">"DMI.ADX")/2;。
通达信指标公式源码 完美顺势而为指标
{========顺势而为=====主图==============}VAR1:=(C+H+O+L)/4;卖出:=XMA(VAR1,20)*(1+80/1000);买入:=XMA(VAR1,32)*(1-100/1000);标准:=买入+(卖出-买入)*2/3;{=========================================}赢:=MA(C,1);在:=SMA(SMA(SMA(赢,2,1),2,1),2,1);龙:=MA(在,3);{=========================================}赢在龙头:=(L+H+C*4)/6;趋势轨①:EMA(赢在龙头,12),NODRAW;趋势轨②:EMA(赢在龙头,19),NODRAW;趋势轨③:IF(L>在,在,龙),NODRAW;赢在:=(趋势轨①-REF(趋势轨①,1))/REF(趋势轨①,1)*100;龙头:=(趋势轨②-REF(趋势轨②,1))/REF(趋势轨②,1)*100;G:=BARSLAST(CROSS(赢在,0))+1;止损线A:REF(L,G),NODRAW;止损线B:REF(止损线A,BARSLAST(止损线A>REF(止损线A,1) OR 止损线A<REF(止损线A,1))+1),NODRAW;趋势①拐点:=CROSS(赢在,0);{************************************************************} 换手:=V*100/CAPITAL;主力:=MA(换手,4);大户:=MA(换手,9);中户:=MA(换手,17);散户:=MA(换手,34);均量:=(主力+大户+中户+散户)/4;机构意愿:=(主力-均量);游资意愿:=(大户-均量);大户意愿:=(中户-均量);散户意愿:=(散户-均量);顺大势:=趋势①拐点AND NOT(散户意愿<0 AND 大户意愿<0) AND (机构意愿>0 OR 机构意愿<0) AND 止损线A>REF(止损线A,1) AND H<标准,NODRAW; {---------------------------------------------}{阴线-兰色}{阳线-红色}STICKLINE(C>=O,C,O,3,0),COLOR0000AA;STICKLINE(C>=O,C,O,2.5,0),COLOR0000BB ;STICKLINE(C>=O,C,O,1.5,0),COLOR0000CC ;STICKLINE(C>=O,C,O,1,0),COLOR0000EE;STICKLINE(C>=O,H,L,0,0),COLOR0000FF;STICKLINE(C<=O,C,O,3,0),COLOR7B7B00;STICKLINE(C<=O,C,O,2.5,0),COLOR909000;STICKLINE(C<=O,C,O,1.5,0),COLORA8A800;STICKLINE(C<=O,C,O,1,0),COLORCECE00;STICKLINE(C<=O,H,L,0,0),COLORFFFF00;{===========================================} DRAWBAND(在,RGB(249,245,246),龙,RGB(0,224,224));IF(龙头>=0,趋势轨②,DRAWNULL),COLORMAGENTA,LINETHICK2;IF(龙头<0,趋势轨②,DRAWNULL),COLORBLUE,LINETHICK2;IF(赢在>=0,趋势轨①,DRAWNULL),COLOR0000FF,LINETHICK2;IF(赢在<0,趋势轨①,DRAWNULL),COLORGREEN,LINETHICK2;IF(赢在>0,REF(L,G),DRAWNULL),COLORRED,POINTDOT,LINETHICK4;IF(赢在<0,REF(L,G),DRAWNULL),COLORGREEN,POINTDOT,LINETHICK4; DRAWICON(顺大势,L*0.98,5);DRAWTEXT(顺大势,L*0.98,' ←顺势而为'),COLORCCCCCC;{般:=XMA(CLOSE,7);若:=MEMA(CLOSE,3);预警:=LONGCROSS(若,般,3) AND C>标准;确认:=BARSLAST(LONGCROSS(若,般,3) AND C>标准)=1;DRAWICON(预警AND COUNT(预警,BARSLAST(顺大势))=1,H*1.02,6); DRAWICON(确认AND COUNT(确认,BARSLAST(顺大势))=1,H,2);};{=============主力密码==副图================}主力做盘意愿:WINNER(MA(CLOSE,5))*100,LINETHICK5,COLORRED;散户跟风意愿:(WINNER(MA(CLOSE,5)*1.1)-WINNER(MA(CLOSE,5)*0.9))*100,LINETHICK5,COLORGREEN;标准:60,LINETHICK2,COLORYELLOW;{=============拨云见日==副图================} VAR1:=INDEXC;VAR2:=REF(VAR1,18);VAR3:=MA(VAR2,18);个股趋势强度:C/MA(REF(C,18),18)*100,COLOR0BFFFF,LINETHICK2; 个股风险:MA(FORCAST(个股趋势强度,20),6),COLORRED;大盘趋势强度:VAR1/VAR3*100,COLORF4E202,LINETHICK2;大盘风险:MA(FORCAST(大盘趋势强度,20),6),COLORGREEN;。
通达信指标公式源码主力进出指标公式 经典的公式
通达信主力进出指标公式经典的公式市盈率:=IF(FINANCE(33)>0,DYNAINFO(39),0)*0.35;每股收益:=IF(FINANCE(33)>0.01,FINANCE(33)*0.65,0);基本面价格:每股收益*市盈率*4,NODRAW,COLORRED;正收益率:=IF(FINANCE(33)>0.01 AND FINANCE(34)>0,FINANCE(33)*6,0); 正市盈率:=IF(FINANCE(33)>0.01 AND FINANCE(34)>0,FINANCE(34)*4,0); 蓝筹系数:(正收益率+1/正市盈率)/10*100,NODRAW;平均成本线:COST(50),NODRAW;VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1),LINETHICK3;VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);VAR3:=EMA(VAR2,10);VAR4:=LLV(LOW,33);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);接盘:IF(VAR5>REF(VAR5,1),VAR5,0),COLORRED,NODRAW; STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0,1 ),COLORRED;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3.1,0 ),COLOR000033; STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.7,0 ),COLOR000066; STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.1,0 ),COLOR000099; STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0 ),COLOR0000CC; STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.9,0 ),COLOR0000FF; STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.3,0 ),COLORCC66FF;拉盘:IF(VAR5<REF(VAR5,1),VAR5,0),COLORGREEN,NODRAW; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0,1 ),COLORGREEN; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLOR005500; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.6,0),COLOR007700; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.1,0),COLOR009900; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0),COLOR00BB00; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.9,0),COLOR00DD00; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.3,0),COLOR66FF66;VAR12:=SMA(ABS(VAR1-H),13,1)/SMA(MAX(VAR1-H,0),10,1);VAR13:=EMA(VAR12,10);VAR14:=HHV(H,33);VAR15:=EMA(IF(H>=VAR14,VAR13,0),3);冲顶:IF(VAR15>REF(VAR15,1),VAR15,0),COLORFF00FF,NODRAW; STICKLINE(VAR15>REF(VAR15,1),0,VAR15,3,0),COLORFF00FF; STICKLINE(VAR15>REF(VAR15,1),0,VAR15,3,0 ),COLOR550055; STICKLINE(VAR15>REF(VAR15,1),0,VAR15,2.6,0 ),COLOR770077; STICKLINE(VAR15>REF(VAR15,1),0,VAR15,2.1,0 ),COLOR990099; STICKLINE(VAR15>REF(VAR15,1),0,VAR15,1.5,0 ),COLORBB00BB; STICKLINE(VAR15>REF(VAR15,1),0,VAR15,0.9,0 ),COLORDD00DD; STICKLINE(VAR15>REF(VAR15,1),0,VAR15,0.3,0 ),COLORFF00FF;出场:IF(VAR15<REF(VAR15,1),VAR15,0),COLORYELLOW,NODRAW; STICKLINE(VAR15<REF(VAR15,1),0,VAR15,3,0 ),COLORYELLOW; STICKLINE(VAR15<REF(VAR15,1),0,VAR15,3,0),COLOR005555;STICKLINE(VAR15<REF(VAR15,1),0,VAR15,2.6,0),COLOR007777; STICKLINE(VAR15<REF(VAR5,1),0,VAR15,2.1,0),COLOR009999; STICKLINE(VAR15<REF(VAR15,1),0,VAR15,1.5,0),COLOR00BBBB; STICKLINE(VAR15<REF(VAR15,1),0,VAR15,0.9,0),COLOR00DDDD; STICKLINE(VAR15<REF(VAR15,1),0,VAR15,0.3,0),COLOR00FFFF;VAR42:=REF(LOW,1);VAR43:=SMA(ABS(LOW-VAR42),3,1)/SMA(MAX(LOW-VAR42,0),3,1)*100; VAR44:=EMA(IF(CLOSE*1.3,VAR43*10,VAR43/10),3);VAR45:=LLV(LOW,13);VAR46:=HHV(VAR44,13);VAR47:=IF(MA(CLOSE,34),1,0);VAR48:=EMA(IF(LOW<=VAR45,(VAR44+VAR46*2)/2,0),3)/618*VAR47;VAR49:=IF(VAR48>100,100,VAR48);吸筹:VAR49,NODRAW,COLORLIRED;VAR111:=REF(LOW,1);VAR121:=SMA(ABS(LOW-VAR111),3,1)/SMA(MAX(LOW-VAR111,0),3,1)*100; VAR131:=EMA(IF(CLOSE*1.2,VAR121*10,VAR121/10),3);VAR141:=LLV(LOW,38);VAR151:=HHV(VAR131,38);VAR16:=IF(LLV(LOW,90),1,0);VAR17:=EMA(IF(LOW<=VAR141,(VAR131+VAR151*2)/2,0),3)/618*VAR16; VAR18:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;VAR19:=SMA(VAR18,13,8);趋势:CEILING(SMA(VAR19,13,8)),COLORMAGENTA;成本:MA(3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1),5),COLORYELL OW;M:=60;N:=30;散户线:100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M))COLORCYAN; 波段防御:90,COLORGREEN;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;。
机构进场指标公式源码
机构进场指标公式源码其中,大单买入交易量和大单卖出交易量分别指单笔交易量超过平均交易量N倍的买入和卖出交易量。
N的大小可以根据不同股票的特点进行调整。
以下是机构进场指标公式的源码:```def institution_buying_indicator(stock_data, n):'''计算机构进场指标:param stock_data: 股票数据,包括交易量和价格等信息:param n: 超过平均交易量的倍数:return: 机构进场指标'''total_volume = stock_data['volume']average_volume = np.mean(total_volume)large_buy_volume = stock_data.loc[stock_data['volume'] > average_volume * n, 'volume'].sum()large_sell_volume =stock_data.loc[(stock_data['volume'] > average_volume * n) & (stock_data['type'] == 'sell'), 'volume'].sum()institution_buying_indicator = (large_buy_volume -large_sell_volume) / np.sum(total_volume)return institution_buying_indicator```其中,stock_data为包含股票交易信息的DataFrame,应至少包含交易量和交易类型(买入或卖出)两列信息。
n为超过平均交易量的倍数,根据实际情况进行调整。