以下是通达信纯指标公式源码和使用说明
通达信纯成交量选股指标公式源码:
N:=30;M:=18;MM:=5;NN:=30;
成交量阻力:((VOL+REF(VOL,1))/2-LLV(VOL,N))/(HHV(VOL,N)-LLV(VOL,N))*100;
{STICKLINE(成交量阻力 20,0,成交量阻力,2,0)COLORRED;}
股价阻力:((C+REF(C,1))/2-LLV(C,M))/(HHV(C,M)-LLV(C,M))*100;
{STICKLINE(股价阻力 85AND成交量阻力 60,150,100,2,0)COLORGREEN;}
STICKLINE(股价阻力+成交量阻力 =5,-50,0,2,0)COLORYELLOW;
:={(L+H+C+O+L+H+O+C)/8;}(L+C+C+O+O+H)/6;
成本:=SUM(成本*VOL,MM)/SUM(VOL,MM);
MAX成本均线:=SUM(成本*VOL,180)/SUM(VOL,180);
成本阻力:(成本均线-LLV(成本均线,NN))/(HHV(成本均线,NN)-LLV(成本均线,NN))*100;
MAX成本阻力:(MAX成本均线-LLV(MAX成本均线,NN))/(HHV(MAX成本均线,NN)-LLV(MAX成本均线,NN))*100;
VAR1:=SMA(AMOUNT,10,1)/10000;
VAR2:=REF(VAR1,1);
VAR3:=SMA(AMOUNT,10,1)/10000;
量:=(VAR1+VAR3)/2;
阻力:=(资金量-LLV(资金量,30))/(HHV(资金量,30)-LLV(资金量,30))*100;
量:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买量:=IF(CLOSE OPEN,量*(HIGH-LOW),IF(CLOSE OPEN,量*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
卖量:=(IF(CLOSE OPEN,0-量*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,0-量*(HIGH-LOW),0-VOL/2)))*-1;
总量:=买量+卖量,LINETHICK0;
净量:=买量-卖量,LINETHICK0;
五日净量:=SUM(净量,5),LINETHICK2,COLORFFFFFF;
{十日净量:SUM(净量,10),LINETHICK2,COLOR007800;}
二十日净量:=SUM(净量,20),LINETHICK2,COLOR0000AD;
六十日净量:=SUM(净量,60),LINETHICK2,COLORFF0000;
净量阻力:(二十日净量-LLV(二十日净量,N))/(HHV(二十日净量,N)-LLV(二十日净量,N))*100;
HAHA:=SUM(二十日净量,6);
净量阻力二:(HAHA-LLV(HAHA,N))/(HHV(HAHA,N)-LLV(HAHA,N))*100;
STICKLINE(成交量阻力 10AND股价阻力 10AND成本阻力 5{AND净量阻力二 10AND净量阻力 10AND二十日净量 0},-50,0,2,0)COLORRED;
50;
STICKLINE(净量阻力二 60ANDREF(净量阻力二 60,1)AND股价阻力 10,-50,0,2,0)COLORBLUE;
STICKLINE(CROSS(成本阻力,股价阻力)AND成本阻力 80,150,100,2,0)COLORGREEN;
Q:=0;Q:=1;QBOL:=0;QBUY:=1;
N:=14;M:=6;P:=50;
TYPL:=(HIGH+LOW+CLOSE)/3;
CCIM:=(TYPL-ma(TYPL,N))/(0.015*AVEDEV(TYPL,N));
CCIS:=(TYPL-MA(TYPL,M))/(0.015*AVEDEV(TYPL,M));
CCIL:=(TYPL-MA(TYPL,P))/(0.015*AVEDEV(TYPL,P));
T1:=CCIS REF(CCIS,1)ANDCCIM REF(CCIM,1)ANDCCIL REF(CCIL,1);
T2:=CCIS =CCILANDCCIM CCILANDCCIL
T3:=CCIL
VALUE:=50;
WILDPER:=14;
M0:=13;
EXPPER:=2*WILDPER-1;
AUC:=EMA(IF(C REF(C,1),C-REF(C,1),0),EXPPER);
ADC:=EMA(IF(REF(C,1) C,REF(C,1)-C,0),EXPPER);
X:=(WILDPER-1)*(ADC*VALUE/(100-VALUE)-AUC);
REVENGRSI0:=IF(X =0,C+X,C+X*(100-VALUE)/VALUE);
REVRSI:=MA(REVENGRSI0,M0);
MARSI:=MA(REvrSI,5);
T4:=IF(QRSI=1,C REVRSIANDREVRSI =MARSI,C REVRSIANDREVRSI =MARSI);
T5:=IF(QCCI=1,CCIL =-100,1);
X0:=TYPL;
D1:=H-X0;
D2:=X0-L;
D3:=H-L;
B1:=X0-D1;
S1:=X0+D2;
HBOP:=X0+(D3+D2);
LBOP:=X0-(D3+D1);
X2:=REF(X0,1);
B2:=REF(B1,1);
S2:=REF(S1,1);
HBOP2:=REF(HBOP,1);
LBOP2:=REF(LBOP,1);
T6:=IF(QBUY=1,H =HBOP2ORC =HBOP2,1);
N0:=20;
MB:=MA(CLOSE,N0);
SS:=SQRT(SUM(POW(CLOSE-MB,2),20)/20);
上轨:=MB+SS;
下轨:=MB-SS;
上极:=MB+1.7*SS;
下极:=MB-1.7*SS;
T7:=IF(QBOL=1,上极 =REF(上极,1),1);
((T1ANDT2)OR(T1ANDT3))ANDT4ANDT5ANDT6ANDT7;
M:=18;{可设为参数:M(10,30,18)}
MAobv:=MA(OBV,M);{WEN98编制}
XG:REF(COUNT(OBV =MaoBV,8)=8,1)ANDcrOSS(OBV,MAOBV)ANDDYNAINFO(9)
通达信纯成交量选股指标公式截图