通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信量柱指标公式源码
VAR1:=(VOL/(((HIGH-LOW)*2)-ABS((CLOSE-OPEN))));
买盘:=IF((CLOSE>OPEN),(VAR1*(HIGH-LOW)),IF((CLOSE<OPEN),(VAR1*((HIGH-
OPEN)+(CLOSE-LOW))),(VOL/2)));
卖盘:=IF((CLOSE>OPEN),(0-(VAR1*((HIGH-CLOSE)+(OPEN-LOW)))),IF((CLOSE<
OPEN),(0-(VAR1*(HIGH-LOW))),(0-(VOL/2))));
买卖差:=(买盘+卖盘);
DT:=买盘;
KT:=卖盘;
买量20:=SUM(DT,20);
卖量20:=SUM(KT,20);
进出量20:=买量20+卖量20;
STICKLINE(进出量20>=0,0,进出量20,3,1),COLORRED;
STICKLINE(进出量20<0,0,进出量20,3,1),COLORFFFF00;
买量10:=SUM(DT,10);
卖量10:=SUM(KT,10);
进出量10:=买量10+卖量10,COLORRED,LINETHICK2;
STICKLINE(进出量10>=0,0,进出量10,1.8,1),COLORRED;
STICKLINE(进出量10<0,0,进出量10,1.8,1),COLORFFFF00;
买量5:=SUM(DT,5);
卖量5:=SUM(KT,5);
进出量5:=买量5+卖量5,COLORYELLOW,LINETHICK2;
STICKLINE(进出量5>=0,0,进出量5,1,1),COLORRED;
STICKLINE(进出量5<0,0,进出量5,1,1),COLORFFFF00;
买量:=SUM(DT,1);
卖量:=SUM(KT,1);
进出量:=买量+卖量;
STICKLINE(进出量>=0,0,进出量,0.5,0),COLORYELLOW;
STICKLINE(进出量<0,0,进出量,0.5,0),COLORGREEN;
倍量柱:(VOL/REF(VOL,1)>2andCOUNT(CLOSE>OPEN,1))or(LOW>REF(HIGH,1)and
COUNT(OPEN>CLOSE,1)andVOL/REF(VOL,1)>2),STICK,COLORBLUE;
DRAWTEXT(倍量柱,0.75,'倍量'),COLORBLUE;
地量柱:LLV(VOL,100)=VOL,STICK;
DRAWTEXT(地量柱,0.5,'地量'),colorred;
倍缩量:VOL/REF(VOL,1)<0.5,STICK;
DRAWTEXT(倍缩量,0.2,'缩量'),COLORRED;
价涨量缩:COUNT(C>REF(C,1),2)=2AND
COUNT(VOL<REF(VOL,1),2)=2,STICK,COLORGREEN;
放量柱:IF(LOW>REF(HIGH,1)and
COUNT(OPEN<CLOSE,1),0.5,0),STICK,colorred,linethick4;
DRAWTEXT(放量柱,0.2,'放量'),COLORRED;
HJZ:=(3*C+H+L+O)/6;
HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4*REF(HJZ,4)+3*REF(HJZ,
5)+2*REF(HJZ,6)+REF(HJZ,8))/36;
HJZ3:=VOL=HHV(VOL,10)ANDVOL>2*REF(VOL,1)ANDCLOSE>HJZ2ANDC>O;
黄金柱:FILTER(HJZ3,5),STICK,COLORYELLOW;
二、通达信倍量柱指标源码
N:=5;QJ0:=(HIGH+LOW+CLOSE)/3;
QJ1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
QJ2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-QJ0);
QJ3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
QJ4:=IF(HIGH=LOW,1,QJ0-MIN(CLOSE,OPEN));
QJ5:=VOL/(IF(HIGH=LOW,4,HIGH-LOW));
QJ6:="MACD.DIF">"MACD.DEA"AND"MACD.DEA"<0;
QJ7:="KDJ.K">"KDJ.D"AND"KDJ.D"<30;
QJ8:="MACD.DIF"<"MACD.DEA";
QJ9:="KDJ.K"<"KDJ.D"AND"KDJ.K">80;
特大:QJ4*QJ5,NODRAW;大单:QJ3*QJ5,NODRAW;
中单:QJ1*QJ5,NODRAW;小单:QJ2*QJ5,NODRAW;
W1:=SUM(大单,N)+SUM(特大,N);W2:=SUM(小单,N)+SUM(中单,N);
量振1:=特大>大单AND大单>小单;
量振2:=特大<小单AND大单<小单;
标振1:=QJ6ANDQJ7;
标振2:=QJ8ANDQJ9;
A:=W1-W2;A0:=IF(A>0,A,0);B0:=IF(A<0,A,0);
STICKLINE(A0,0,A0,3,0),COLOR000044;
STICKLINE(A0,0,A0,2.5,0),COLOR000088;
STICKLINE(A0,0,A0,1.5,0),COLOR0000AA;
STICKLINE(A0,0,A0,1,0),COLOR0000CC;
STICKLINE(B0,0,-B0,3,0),COLOR004400;
STICKLINE(B0,0,-B0,2.5,0),COLOR008800;
STICKLINE(B0,0,-B0,1.5,0),COLOR00AA00;
STICKLINE(B0,0,-B0,1,0),COLOR00CC00;
周趋势:MA(A,5),COLORFFFFFF;
平滑值:EMA(周趋势,5),COLOR00FFFF;
STICKLINE(标振1AND量振1AND周趋势>平滑值,0,A0,3,0),COLORYELLOW;
DRAWTEXT(标振1AND量振1AND周趋势>平滑值,A0,'振'),COLORYELLOW;
DRAWBAND(周趋势,RGB(200,50,50),平滑值,RGB(250,250,0));
DRAWBAND(周趋势,RGB(255,250,250),平滑值,RGB(250,250,0));
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
HDIF:=EMA(HHV(DIF,20),1000);
LDIF:=EMA(LLV(DIF,20),1000);
MACD:=(DIF-DEA)*2;
STICKLINE(CROSS(DIF,HDIF),0,5,2,0),COLORFF6A6A;
STICKLINE(CROSS(DIF,HDIF),5,10,2,0),COLORRED;
AA:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.66;
XG:AAANDREF(AA,1)ANDMAX(C,REF(C,1))/MIN(C,REF(C,1))<1.005;
VAR1:=REF(LOW,1);
VAR2:=(SMA(ABS(LOW-VAR1),13,1))/(SMA(MAX(LOW-VAR1,0),13,1))*4;
VAR3:=EMA(VAR2,13);
VAR4:=LLV(LOW,34);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
VAR6:=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);
VAR7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*S
MA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR8:=VAR6<REF(VAR7,1)ANDVOL>REF(VOL,1)ANDCLOSE>REF(CLOSE,1);
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,18,8,0),COLORAA00BB;{粉色住}
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,18,8,0),COLORBB11BB;
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,18,5,0),COLORCC22BB;
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,18,3,0),COLORDD33BB;
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,18,1,0),COLOREE44BB;
DRAWTEXT(VAR8ANDCOUNT(VAR8,18)=1,16,'●↙大资金进场'),COLOR0099FF;
DRAWTEXT(VAR8ANDCOUNT(VAR8,18)=1,12,'●↙择机买入'),COLOR0033FF;
DRAWTEXT(VAR8ANDCOUNT(VAR8,18)=1,8,'●↙多数会涨'),COLORFFFFAA;
G100:=FORCAST(CLOSE,3);
G102:=EMA(EMA(G100,21),8),COLORYELLOW;
G104:=EMA(EMA(G100,27),8),COLORYELLOW;
G106:=EMA(EMA(G100,34),8),COLORYELLOW;
T170:=HHV(CLOSE,176)*0.93,COLORRED,LINETHICK3;
LS190:=IF(CLOSE>G106ANDCLOSE>HHV(CLOSE,10)*0.94,1,0);
STICKLINE(LS190>0,CLOSE*2.618,CLOSE*1.08*2.618,2,0),COLORRED;
抄底1:=ABS((CROSS("MACD.DIF","MACD.DEA")
&&"MACD.DEA"<=-0.07)*"MACD.DIF")*1.09,COLORLIMAGENTA,LINETHICK2;
STICKLINE(抄底1,0,50,4,0),COLOR770077;
STICKLINE(抄底1,0,50,3,0),COLOR990099;
STICKLINE(抄底1,0,50,2,0),COLORBB00BB;
STICKLINE(抄底1,0,50,1,0),COLORDD00DD;
STICKLINE(抄底1,0,50,0.3,0),COLORFF00FF;
DRAWTEXT(抄底1>0,38,'超级拐点'),COLOR00C5FF;
反向钟摆线:=MA((LLV(LOW,45)-CLOSE)/(HHV(HIGH,45)-LLV(LOW,45))*100,20);
DK:=CROSS(-5,反向钟摆线);
STICKLINE(DK,0,50,4,0),COLOR770077;
STICKLINE(DK,0,50,3,0),COLOR990099;
STICKLINE(DK,0,50,2,0),COLORBB00BB;
STICKLINE(DK,0,50,1,0),COLORDD00DD;
STICKLINE(DK,0,50,0.3,0),COLORFF00FF;
DRAWTEXT(DK>0,48,'终极低点'),COLOR00C5FF;
{庄家出现}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
J1:=REVERSE(J);
买点:CROSS(J,J1)ANDAA;
STICKLINE(买点,0,30,6,0),COLORBLUE;
STICKLINE(买点,30,43,4,0),COLORWHITE;
STICKLINE(买点,43,80,2,0),COLORYELLOW;
DRAWTEXT(买点,70,'庄家出现'),COLORRED;
小V逆转:=REF(C,1)<REF(O,1)ANDO>REF(C,1)ANDC>=REF(C,1)*1.08;
STICKLINE(小V逆转,20,0,4,0),COLOR000099;
STICKLINE(小V逆转,30,0,2,0),COLOR0000BB;
STICKLINE(小V逆转,40,0,1,0),COLOR0000DD;
STICKLINE(小V逆转,60,0,0.9,0),COLOR0000FF;
DRAWICON(小V逆转,60,34);
DRAWTEXT(小V逆转>0,30,'小V逆转'),COLOR00C5FF;
VVOL:=IF(CURRBARSCOUNT=1AND
PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1AND
PERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;
VL:VOL,VOLSTICK;
倍量:VOL>=REF(V,1)*1.90ANDC>REF(C,1),NODRAW,COLORYELLOW;
十日低量:VOL<REF(LLV(VOL,13),1),NODRAW,COLORMAGENTA;
百日地量:VOL<REF(LLV(VOL,100),1),NODRAW,COLORGREEN;
平量:ABS(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5)<=0.03OR
ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.03,NODRAW,COLORWHITE;
倍缩:VOL<=REF(V,1)*0.55,NODRAW,COLORBLUE;
STICKLINE(倍量,0,V,1,0),COLORYELLOW;
STICKLINE(十日低量,0,V,1,0),COLORMAGENTA;
STICKLINE(百日地量,0,V,1,0),COLORGREEN;
STICKLINE(平量,0,V,1,0),COLORWHITE;
STICKLINE(倍缩,0,V,1,0),COLORBLUE;
MA5:MA(V,5),COLORWHITE;
MA10:MA(V,10),COLORGREEN;
[源码注释]通达信公式动态翻译结果
1日前的统计350日中满足收盘价的250日简单移动平均<1日前的收盘价的250日简单移动平均的天数>250并且收盘价的250日简单移动平均=1日前的收盘价的250日简单移动平均
推荐阅读:通达信高量柱指标公式
VOL,VOLSTICK;
STICKLINE(V>=3*REF(V,1),V/3,V/2.5,3.9,0),COLORWHITE;
STICKLINE(V>=2*REF(V,1),V/2,V/1.7,3.9,0),COLORYELLOW;
流通〖亿〗:CAPITAL/1000000,LINETHICK0;
内外比:DYNAINFO(51),COLORYELLOW,LINETHICK0;
单日量比:V/REF(V,1),COLORWHITE,LINETHICK0;
五日量比:V/(REF(MA(V,5),1)/240),COLORYELLOW,LINETHICK0;
5换:SUM(100*V/CAPITAL,5),LINETHICK0;
10换:SUM(100*V/CAPITAL,10),LINETHICK0;
20换:SUM(100*V/CAPITAL,20),LINETHICK0;
H1:=VOL<REF(LLV(VOL,13),1);
H2:=VOL<REF(LLV(VOL,55),1);
STICKLINE(H1,0,V,1.5,0),COLORBLUE;
STICKLINE(H2,0,V,1.5,0),COLORMAGENTA;
量能突
变:V+REF(V,1)>=(REF(V,2)+REF(V,3)+REF(V,4)+REF(V,5)+REF(V,6))/5*3
ANDV<2*REF(V,1)ANDC>OANDC>MA(C,21),COLORGREEN;
STICKLINE(量能突变,2*V/3,V,3,0),COLORFF00FF;
量价配合:REF(V,1)<MAX(MA(V,5),MAX(MA(V,10),MA(V,20)))AND
V>MAX(MA(V,5),MAX(MA(V,10),MA(V,20)))ANDV<2*REF(V,1)AND
CROSS(C,MA(C,21));
STICKLINE(量价配合,V/3,2*V/3,3,1),LINETHICK5;
量价突破:C>=HHV(C,15)ANDV>=HHV(V,15),COLORGREEN;
STICKLINE(量价突破,0,V/3,2,0),COLORGREEN;
T1:=COUNT(V>REF(V,1)*2,4)=1;
T2:=COUNT(V<REF(V,1)ANDL>MIN(L,4)ANDL>REF(L,1),3)=3;
T3:T1ANDT2;
倍量:V/REF(V,1)>=2ANDC-REF(C,1)>0;
DRAWTEXT(倍量,H,'倍'),COLORYELLOW;
缩倍量:V/REF(V,1)<=0.5;
DRAWTEXT(缩倍量,L,'半'),COLORYELLOW;
连跌:LAST(V<REF(V,1),2,1);
STICKLINE(倍量,0,VOL,1.8,0),COLORYELLOW;
STICKLINE(缩倍量,0,VOL/2,2,0),COLORWHITE;
{20日量布林线}
MID:MA(VOL,20),COLORWHITE;
饱和:MID+2*STDP(V,20),COLORYELLOW;
LLW:=MID-2*STDP(V,20);
VOLUME:VOL,VOLSTICK;
VOL5:MA(VOL,5);
VOL10:MA(VOL,10);
VOL60:MA(VOL,60),COLORGREEN;
{
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD
=5,240,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1&&(SETCODE=0||SETCODE=1),VVOL,0,-1,-1);
}
|:=COUNT(CLOSE>REF(CLOSE,1),2)=2ANDCOUNT(VOL<REF(VOL,1),2)=2;
STICKLINE(|,0,V,1,0),COLORGREEN;
DRAWTEXT(|,VOL*1.25,'降'),COLORGREEN;
T:=DYNAINFO(8)>0;
VO:=(VOL<=LLV(VOL,100)ANDT);
地量柱:TANDVO,COLORBLUE;
STICKLINE(地量柱,0,V,1,0),COLORBLUE;
DRAWTEXT(地量柱,VOL*1.15,'地'),COLORBLUE;
BLZ:=VOL>REF(V,1)*1.9;
BLZ1:=VOL<REF(LLV(VOL,13),1);
BLZ2:=VOL<REF(LLV(VOL,55),1);
STICKLINE(BLZ,0,V,1,0),COLORYELLOW;
倍量柱:BLZ,COLORYELLOW;
DRAWTEXT(倍量柱,VOL*1.50,'倍'),COLORYELLOW;
HJZ:=(3*C+H+L+O)/6;
HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4*REF(HJZ,4)+3*REF(HJZ,
5)+2*REF(HJZ,6)+REF(HJZ,8))/36;
HJZ3:=VOL=HHV(VOL,10)ANDVOL>2*REF(VOL,1)ANDCLOSE>HJZ2ANDC>O;
黄金柱:FILTER(HJZ3,5),STICK,COLORRED,LINETHICK4;
STICKLINE(黄金柱,0,V,1,0),COLORRED;
DRAWTEXT(黄金柱,VOL*1.15,'黄'),COLORRED;
价涨量缩:|,COLORGREEN;
FLZ:=V>REF(V,1)*0.98ANDV<REF(V,1)*1.02,LINETHICK0;
STICKLINE(FLZ,0,V,1,0),COLORMAGENTA;
DRAWTEXT(FLZ,VOL*1.25,'平'),COLORMAGENTA;
平量柱:FLZ,COLORMAGENTA;
SBZ:=V<=REF(V,1)*0.50;
STICKLINE(SBZ,0,V,1,0),COLORCYAN;
DRAWTEXT(SBZ,VOL*1.25,'缩'),COLORCYAN;
缩倍柱:SBZ,COLORCYAN;
HHH:=CONST(HHV(H,100));
LLL:=CONST(LLV(L,100));
HH:=HHH-LLL;
TJ2:=CURRBARSCOUNT=58;
DRAWTEXT(TJ2,LLL+HH*0.90,'百日低量处,倍量要涨停;凹口平量柱,确实猛如虎;');
DRAWTEXT(TJ2,LLL+HH*0.85,'倍量过左峰,涨停急先锋;凹口去淘金,报四三涨停;');
DRAWTEXT(TJ2,LLL+HH*0.80,'确定黄金柱,实盘擒牛股;回踩黄金线,腾飞不眨眼;');
DRAWTEXT(TJ2,LLL+HH*0.75,'接力黄金线,一步一重天;银谷黄金仓,涨停没商量;');
DRAWTEXT(TJ2,LLL+HH*0.70,'二次红波起,必有好戏看;长阴压短柱,攻势猛如虎;');
DRAWTEXT(TJ2,LLL+HH*0.65,'咬住峰顶线,伏击赚大钱;顶底若互换,牛股要逛奔。');
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
每日公式解答:
股票公式编写要求:
年线在过去200个交易日下跌或者上涨了1%的公式
股票公式编写结果:
REF(COUNT(MA(C,250)<REF(MA(C,250),1),350)>250,1)&&MA(C,250)=REF(MA(C,250),1);
评论(0)