内容发布更新时间 : 2024/12/27 2:19:53星期一 下面是文章的全部内容请认真阅读。
【通达信】极品成交量(量波动、价波动、量价)-指标公式源码
N:=3;
量波动:=SUM(EMA(V-MA(V,20),3),3)*1; 价波动:=SUM(EMA(C-MA(C,20),3),3)*30000; 量价:=价波动+量波动,LINETHICK0;
XYS1:=MA(量价,2),COLORGREEN,LINETHICK2; XYS2:=MA(量价,1),COLORMAGENTA,LINETHICK2;波
动:=DRAWBAND(XYS1,RGB(255,50,50),0,RGB(0,100,50));R:=VOL/((H-L)*2-ABS(O-C)); 买:=IF(O=C AND (C-REF(C,1))/REF(C,1)*100>9.8,VOL,R*(C-L)); 买%:买/VOL*100,COLORRED,NODRAW;
流入亿元:AMOUNT*买%/10000000000,COLORMAGENTA,NODRAW; 流出亿元:AMOUNT/100000000-流入亿元,COLORGREEN,NODRAW; 净流亿元:流入亿元-流出亿元,COLORCYAN,NODRAW; STICKLINE(VOL,0,VOL,3,1),COLORGREEN; STICKLINE(买,0,买,3,0),COLORYELLOW;
BB:=(流入亿元-流出亿元);三日内净流入:SUM (BB,3), LINETHICK2,COLORGREEN,NODRAW; 五日内净流入:SUM (BB,5), LINETHICK2,COLORGREEN,NODRAW;V1:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);
HY1:=REF(EMA(V1,3),1);
APP:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));
ZL:=IF((CLOSE > OPEN),(APP * (HIGH - LOW)),IF((CLOSE < OPEN),(APP * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2)));
SF:=IF((CLOSE > OPEN),(0 - (APP * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (APP * (HIGH - LOW))),(0 - (VOL / 2)))); VAR1:=(((CLOSE - HY1) / HY1) * 100);
VAR2:=(((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100);
TS:=BARSLAST((BARSLAST(((VAR1 > 0) AND (REF(VAR1,1) > 0))) > 0)); 利润:=SUM(IF((TS > 0),VAR2,0),0); 库存能量:=MA((ZL + SF),2),COLORYELLOW; 库存平均:=MA((ZL + SF),5),COLORFF00FF;
主力:=MA(ZL,2),COLORFF00FF,LINETHICK2;均:=IF(主力>REF(主力,1),主力,DRAWNULL),COLORRED,LINETHICK4; 散户:=MA(SF,2),COLORGREEN,LINETHICK2;
获利:MA(利润,2),COLOR4080FF;
多空线:MA((CLOSE - HY1) * 10,2),COLORWHITE;A1A:=(VOL/CLOSE)/3; A2A:=SUM((IF(((A1A>40) AND (CLOSE>(REF(CLOSE,1)))),A1A,0)),0); A3A:=SUM((IF(((A1A>40) AND (CLOSE<(REF(CLOSE,1)))),A1A,0)),0); A4A:=SUM((IF(((A1A<40) AND (CLOSE>(REF(CLOSE,1)))),A1A,0)),0); A5A:=SUM((IF(((A1A<40) AND (CLOSE<(REF(CLOSE,1)))),A1A,0)),0); 机构买盘:=(A2A),LINETHICK3,COLORFF55FF,NODRAW; 机构卖盘:=(A3A),LINETHICK3,COLORFFFF55,NODRAW; 散户买盘:=(A4A),COLOR5555FF; 散户卖盘:=(A5A),COLOR55FF55;
买卖差额:(机构买盘-机构卖盘),LINETHICK5,COLORYELLOW,NODRAW; 换手:V/CAPITAL*100,LINETHICK0; 换20%:SUM(换手,20),LINETHICK0;
额:INTPART(AMOUNT/10000),LINETHICK0,COLORRED; 额20%:SUM(额,20)/10000,LINETHICK0,COLORGREEN; 持有:额>3000 AND C>REF(C,1),COLORRED;
SAT:=IF(((((AMOUNT / CLOSE) / (HHV(AMOUNT,20) / HHV(CLOSE,20))) * 100) > 100),100,(((AMOUNT / CLOSE) / (HHV(AMOUNT,20) / HHV(CLOSE,20))) * 100)); 无量选股:SAT <= 5,COLORFFCCFF; SZL:=SUM(IF(C>=REF(C,1),额,0),60); XDL:=SUM(IF(C 主力季度增仓量:= SZL*0.3- XDL*0.2,LINETHICK2,COLORYELLOW;{VOLUME:VOL,VOLSTICK; {VOL,VOLSTICK;MA5:MA(VOL,3);MA10:MA(VOL,5);} {STICKLINE(C>=O,0,VOL,2.3,0),COLORFFFFFF;{实体为0} {VAR1N:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 主买:IF(CLOSE>OPEN,VAR1N*(HIGH-LOW),IF(CLOSE STICKLINE(VOL>0 AND C>O,VOL,0,2.1,0),COLORRED;} {主力活跃度} {TMP:=(LARGEINTRDVOL-LARGEOUTTRDVOL); 主力活跃度:(LARGEINTRDVOL+LARGEOUTTRDVOL)*10000/(2*FINANCE(7)) *HHV(V,1000)/10,NODRAW; STICKLINE(TMP>0,0,主力活跃度,1,0),COLOR00FFFF; STICKLINE(TMP<0,0,主力活跃度,1,0),COLORLIGREEN;};{V,STICK; {DRAWTEXT(COUNT(C>REF(C,1)AND V>REF(V,1),5)=5,VOL,'五日放量'); DRAWTEXT(COUNT(C A2:=(MA(VOL,5)+MA(VOL,10)+MA(VOL,20)+MA(VOL,60)+MA(VOL,120))/5,COLOR00FF00; 线A3:=(MA(VOL,20)+MA(VOL,60)+MA(VOL,120))/3,COLOR00FF00,LINETHICK2; ZX:=2*(线A1-线A2), COLORSTICK;A3BN: STICKLINE(线A1>线A3,线A1,线A3,3,1),COLORFF0080; A3B:=STICKLINE(线A1<=线A3,线A1,线A3,3,1),COLOR22CC33; 线1:IF(线A1<线A3,线A1,线A3),COLOR00FF00; IF(线A1<线A3,线A3,线A1),COLORMAGENTA; 线2:IF(线A2<线A3,线A2,线A3),COLOR00FF00; IF(线A2<线A3,线A3,线A2),COLORMAGENTA; 线3:IF(线A3<线A1,线A3,线 A3),COLOR00FF00,LINETHICK2; IF(线A1<线A3,线A3,线A3),COLORMAGENTA,LINETHICK2; IF(线A1>REF(线A1,1),线A1,DRAWNULL),COLORMAGENTA,LINETHICK4;IF(线A2>REF(线A2,1),线A2,DRAWNULL),COLORMAGENTA,LINETHICK4;{N为参数,短线可高级为3,中线为8,中长线为13或21} SY:=ABS(FINANCE(33)); PE:=C/SY,COLOR00FFFF; PE1:=EMA(PE,N),COLOR0000FF,LINETHICK2; PE2:=EMA(PE1,3),COLORFF00FF; {DRAWBAND(PE1,RGB(200,50,55),PE2,RGB(0,100,50));} PE3:=EMA(PE2,3),COLOR00FFFF; PE4:=EMA(PE3,3),COLORFFFFFF; PE5:=EMA(PE4,3),COLORFFFF00; PE6:=EMA(PE5,3),COLOR00FF00,LINETHICK2; BT1:=CROSS(PE1,PE2) AND PE6>PE5 AND PE4>PE3 AND C ST1:=FILTER(PE1REF(PE1,2) AND PE1>PE2 AND C>LLV(L,21)*1.13,5); ST2:=FILTER(CROSS(PE2,PE1) AND C>LLV(L,21)*1.13,8); DRAWICON(ST2,线A1,19); DRAWICON(ST1,线A1,12); DRAWTEXT(BT2,线A1*0.985,'↖追'),COLOR0000FF; {DRAWTEXT(BT1,线A1*0.985,'↖B'),COLOR0068FF; DRAWTEXT(ST1,线A1*1.015,'↙S'),COLOR00FF00;