通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
“黄金三角”牛股形态的要点是:股价上升一波后进行三角形整理,然后放量突破三角形上轨的技术要点。大盘在调整能抓到这样票是非常开心的,今天已经获利,明天应该有出来的机会,短线收益应该相当客观。青岛金王就是“朝阳初起”牛股形态,莱茵置业今天放量上攻正好符合我们“黄金三角”牛股形态,在我的确认下果断介入,当天涨停。
当股价在一个区间进行盘整时,往往形成一些特殊的形态,只要股价处于这个形成的形态之中,就会相对稳定,一旦股价最终【盘出原有形状】,那么就意味着会有不同寻常的趋势发生——股价有可能进入另一种运行状态,股价运行的性质即将发生变化,比如由原来的下跌行情转为横向震荡,而后转为上升行情。
最有代表性的就是盘出【黄金三角形整理】,如果三角形整理出现在一个大的上升趋势中时,在盘整到向上突破后,总能够上涨一定的幅度,这个幅度最低也就是三角形的最大振幅。
除了三角形整理以外,还有诸如:“箱体整理”、“旗形整理”、“偰形整理”、“底部三角形”、“上升三角形”等等形态……
形态整理是换手的需要,只有让想卖出的人卖出,想买进的人买进,后面的行情才能够轻松上涨,也就是和我们的空中加油一个道理,所不同的是空中加油要求油管尽量要畅通,而整理形态就不一定,整理时间稍长,油管就闭塞了。
形态整理有各种各样,其中最经典和常用的还是“收敛三角形”,收敛三角形整理到成交量出现芝麻点的区域,之后只要能再次放量向上突破,就是行情启动的信号。
无论何种整理形态,一般末期都出现缩量,没有动静就快了,此时正式突破前夜,画线预警,放量过线就打!
大部分整理形态突破初期会出现反压原形态,以便确认突破是否有效。
还有一点是需要注意的:对于三角形整理,如果整理到最末端仍然不能向上突破,那么走势较弱,即便后市突破涨幅也将有限。
公式源码如下:
量:vol,VOLstICK;
VVOL:IF(BARSTATUS=2ANDDATATYPE=8,DYNAINFO(17)*DYNAINFO(38),V),LINETHICK0;
STICKLINE(BARSTATUS=2ANDDATATYPE=8,V,VVOL,8,0),COLORYELLOW;
V5:ma(V,5),COLORWHITE;
V10:MA(V,10),COLORYELLOW;
V20:MA(V,20),COLORMAGENTA;
V120:MA(V,120),POINTDOT;
换手率:V/CAPITAL*100;
换手10T:sum(100*v/capital,10);
倍量:VOL>REF(V,1)*1.9,COLORYELLOW;
低量10:VOL<REF(LLV(VOL,13),1),COLORGREEN;
倍缩:REF(V,1)>=VOL*1.9,COLORMAGENTA;
假阴柱:C<OANDC>REF(C,1),COLORRED;
低量50:VOL<REF(LLV(VOL,55),1),COLORBLUE;
百日地量:VOL<REF(LLV(VOL,100),1),COLORGRAY;
STICKLINE(倍量,0,V,5,0),COLORYELLOW;
STICKLINE(低量10,0,V,5,0),COLORGREEN;
STICKLINE(低量50,0,V,5,0),COLORBLUE;
STICKLINE(倍缩,0,V,5,0),COLORMAGENTA;
STICKLINE(百日地量,0,V,5,0),COLORGRAY;
STICKLINE(假阴柱,0,V,2,0),COLORRED;
Var1:=CLOSE/EMA(CLOSE,51)*100<76;
Var2:=CLOSE/EMA(CLOSE,60)*100<74;
TP1:=UPNDAY(C,3)ANDLLV(L,3)>REF(L,3)AND
(HHV(H,3)-REF(C,3))/REF(C,3)<0.10;
TP2:=REF(C,3)>REF(C,4)ORREF(C,3)>=REF(O,3);
TV1:=DOWNNDAY(V,3)ANDBARSCOUNT(V)>5;
TV2:=COUNT(V>=1.8*REF(V,1),4)=1ORREF(V,3)=HHV(V,5);
TJ:=TP1ANDTP2ANDTV1ANDTV2;
XG:TJ
Var3:=HIGH>LOW*1.092;
Var4:=Var3ANDCOUNT(Var3,5)>1;
超跌起爆:if(Var4AND(Var1ORVar2),1,0);
N:=1;
M:=13;
起爆点:(DCLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100;
割肉线:-12,COLORYELLOW;
买入线:M,COLORGREEN;
买入:=20;
倍量:=vol>=REF(V,1)*1.9ANDC>REF(C,1);
百日低量:=VOL<REF(LLV(VOL,70),1);
半月低量:=VOL<REF(LLV(VOL,13),1);
AA4:=C>REF(CLOSE,1)ANDC<O;//假阴真阳
AA5:=C<REF(CLOSE,1)ANDC>O;//假阳真阴
平量:=Abs(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5)<=0.03ORABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.03;
倍缩:=VOL<=REF(V,1)*0.5;
梯量:=COUNT(V>REF(V,1),3)=3ANDCOUNT(C>O,3)=3;
缩量涨:=COUNT(C>REF(C,1),2)=2ANDCOUNT(V<REF(V,1),2)=2;
stICKLINE(C>=O,0,V,9,1),COLORRED;
STICKLINE(C<O,0,V,9,0),COLORCYAN;
STICKLINE(AA4,0,V,9,0),COLORRED;
STICKLINE(AA5,0,V,9,0),COLORGREEN;
STICKLINE(倍量,0,V,6,0),COLORYELLOW;
STICKLINE(半月低量,0,V,6,0),COLORGRAY;
STICKLINE(百日低量,0,V/2,6,0),COLORmaGENTA;
STICKLINE(倍缩,0,V,6,0),COLORBLUE;
STICKLINE(梯量,0,V/2,4,0),COLORBROWN;
STICKLINE(缩量涨,0,V/2,9,0),COLORLIRED;
长阴短柱:=C/REF(C,1)<=0.96ANDV<HHV(V,30)/1.9;//长阴短柱
DRAWTEXT(长阴短柱,V,'长阴短柱'),COLORBLacK;
V5:EMA(V,5),COLORWHITE;
V60:EMA(V,60),COLORYELLOW;
倍:倍量,COLORYELLOW;
半月低:半月低量,COLORGRAY;
百日低:百日低量,COLORMAGENTA;
缩倍:倍缩,COLORBLUE;
量梯:梯量,COLORBROWN;
涨缩量:缩量涨,COLORLIRED;
假阴真阳:AA4,COLORRED;
假阳真阴:AA5,COLORGREEN;
DRAWICON(CROSS(起爆点,买入),买入-1,1);
MMS:=MA(SMA((L+H+2*C)/4-REF((L+H+2*C)/4,1),5,1)/SMA(ABS((L+H+2*C)/4-REF((L+H+2*C)/4,1)),5,1)*100,1)+50;
G1:=IF(-MMS>95,0,20);
UOO:=(-(((CLOSE-LLV(CLOSE,7))/(HHV(CLOSE,7)-LLV(CLOSE,7))*100=100)>0ANDG1)+1);
明日均线:=REF(C,2)*2-REF(C,5),LINETHICK0,COLOR550055;
后日均线:=REF(C,1)*2-REF(C,4),LINETHICK0,COLOR008800;
大后天均线:=C*2-REF(C,3),LINETHICK0,COLOR008888;
KS:=(((CLOSE-EMA(CLOSE,13))/EMA(CLOSE,13))*(0-100));
KS1:=IF(BARSCOUNT(C)=1,C/10000,(1-C/SMA(C,13,1))*100);
趋势线:=EMA(((KS/10)+EMA(CLOSE,10)),3);
AA:=-100*(趋势线-CLOSE)/趋势线;
AC:=(EMA(AA,5));
SSL:=EMA(CLOSE,5);
MMV:=EMA(((SLOPE(CLOSE,22)*20)+CLOSE),55);
MM:=(IF(((DAY>5)AND(DAY<9)),MA(MMV,1),IF((DAY=5),MA(MMV,4)
,IF((DAY=4),MA(MMV,8),IF((DAY=3),MA(MMV,16)
,IF((DAY=2),MA(MMV,32),1))))));
{STICKLINE(((SSL>MM)),SSL,MM,0.1,0),COLORRED;}
SA:=(MM*0.985);
SS:=(MA(CLOSE,18));
DD:=(MA(CLOSE,13));
GG:=(MA(CLOSE,21));
捞钱手:IF(((SSL>MM)),SS,SA),COLORFF00FF,LINETHICK2;
K1:=BACKSET(捞钱手<REF(捞钱手,1),2);
IF(K1,捞钱手,DRAWNULL),COLORFFFFCC,LINETHICK2;
VAR2Y:=(((CLOSE-REF(CLOSE,1))/REF(CLOSE,1))*100);
VAR3Y:=(((CLOSE-REF(OPEN,29))/REF(OPEN,29))*100);
VAR4Y:=REF(CLOSE,1);
VAR5Y:=((SMA(MAX((CLOSE-VAR4Y),0),6,1)/SMA(ABS((CLOSE-VAR4Y)),6,1))*100);
VAR6Y:=((SMA(MAX((CLOSE-VAR4Y),0),12,1)/SMA(ABS((CLOSE-VAR4Y)),12,1))*100);
VAR7Y:=((SMA(MAX((CLOSE-VAR4Y),0),24,1)/SMA(ABS((CLOSE-VAR4Y)),24,1))*100);
VAR8Y:=(((CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW,45)))*100);
VAR9Y:=SMA(VAR8Y,3,1);
VARAY:=SMA(VAR9Y,3,1);
VARBY:=((3*VAR9Y)-(2*VARAY));
VARCY:=(CROSS(VAR5Y,10)AND(VAR3Y<(0-(28*20))));
VARDY:=((100-CROSS(76,VAR5Y))AND(VAR3Y>(5*20)));
DRAWICON(((CROSS(76,VAR5Y)AND(VAR3Y>5))),(HIGH*1.01),2),COLORFFFFFF;
VAREY:=((((CROSS(VAR9Y,VARAY)AND(VARAY<10))AND(VAR3Y<(0-30)))AND(VAR2Y>3))*30);
VARFY:=-((((VARAY<11)AND(VAR5Y<15))AND(VAR3Y<(0-26)))*10);
DRAWICON((CROSS(VARFY,(0-9))),(LOW*0.998),4);
能量线:=DMA(((CLOSE+OPEN)/2),(VOL/(SMA(VOL,4,1)*4)));
上开:=O;
上收:=C;
上高:=H;
上低:=L;
JJ:=(上开+上高+上低)/3;
A:=EMA(JJ,4);
B:REF(A,1),POINTDOT,COLORYELLOW,LINETHICK4;
VA1:=EMA(上收,8);
VA2:=EMA(上收,20);
DRAWTEXT(CROSS(VA2,VA1),H+0.12,'止\N损')COLORYELLOW;
选手A:=MA(上收,3);
箱顶A:=MA(REF(HHV(上收,6),1),3);
箱底A:=MA(REF(LLV(上收,3),1),3);
T1:=MA(上收,20)>=REF(MA(上收,20),1);
T2:=CROSS(选手A,箱底A)AND箱顶A/箱底A>100/100ANDT1;
T3:=CROSS(箱顶A,选手A)AND箱顶A/箱底A>100/100;
选手:=MA(上收,2);
箱顶:MA(REF(HHV(上收,30),1),2),COLOR0000FF,LINETHICK2;
箱底:MA(REF(LLV(上收,30),1),2),COLOR00FF00,LINETHICK2;
IF(A>REF(A,1),A,DRAWNULL),COLORYELLOW,LINETHICK5;
IF(A<REF(A,1),A,DRAWNULL),COLORGREEN,LINETHICK1;
VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);
VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05)AND((HIGH)/(CLOSE)<1.01)AND(VAR3AA>0),91,0);
XG:(FILTER((VAR4AA>90),45)),COLORRED;
N:=14;
MM:=6;
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
多头线:DMP*100/MTR,COLORRED,LINETHICK2;
空头线:DMM*100/MTR,COLORGREEN,LINETHICK2;
趋势线:EXPMEMA(ABS(空头线-多头线)/(空头线+多头线)*100,MM),COLORYELLOW,LINETHICK2;
强弱分界:30,COLORWHITE,DOTLINE,LINETHICK1;
BOLL:=MA(CLOSE,20);
UB:=BOLL+2*STD(CLOSE,20);
VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);
VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.025)AND((HIGH)/(CLOSE)<1.03)AND((CLOSE)>(UB))AND(多头线-空头线)>5AND多头线>20AND(趋势线>REF(趋势线,1))AND(多头线>REF(多头线,1))AND(VAR3AA>0),91,0);
XG:=(FILTER((VAR4AA>90),21)),COLORYELLOW;
STICKLINE(XG,30,0,4,0),COLOR000099;
STICKLINE(XG,30,0,2,0),COLOR0000BB;
STICKLINE(XG,30,0,1,0),COLOR0000DD;
STICKLINE(XG,30,0,0.9,0),COLOR0000FF;
[源码注释]通达信公式动态翻译结果
ZT赋值:如果模糊匹配品种名称ORNAMELIKE('*ST'),返回计算涨停价,否则返回如果模糊匹配品种代码OR(模糊匹配品种代码ANDDATE>=1200824),返回计算涨停价,否则返回计算涨停价
TJ赋值:收盘价=ZT AND 成交量(手)>=3*1日前的成交量(手)
T赋值:上次TJ距今天数
输出XG:T<30 AND 最近T日一直存在最低价>T日前的开盘价ANDH<1.1*T日前的收盘价
评论(0)