【通达信源码分享】精品指标公式-成交量拐点源码
公式源码:
DRAWGBK(C>0,RGB(0,150,150),RGB(0,00,100),0,' ',0),LINETHICK2;
N1:=STRCAT(CON2STR(YEAR,0),' 年 ');
Y:=STRCAT(CON2STR(MONTH,0),' 月 ');
R:=STRCAT(CON2STR(DAY,0),' 日 ');
SJ:=STRCAT(STRCAT(N1,Y), R);
DRAWTEXT_FIX(C>0,0.68,0,0,SJ);
VOLUME:VOL,VOLSTICK;
主力启动线:MA(VOLUME,5),COLORRED,LINETHICK2;
主力洗盘线:MA(VOLUME,35),COLORE8E8E8,LINETHICK2;
资金异动线:MA(VOLUME,135),COLORBLUE,LINETHICK2;
DRAWICON(CROSS(主力启动线,主力洗盘线),主力启动线,11);
DRAWICON(CROSS(主力启动线,资金异动线),主力启动线,18);
DRAWICON(CROSS(主力洗盘线,资金异动线),主力洗盘线,18);
出击:STICKLINE(CROSS(主力启动线,资金异动线) OR ((主力洗盘线 > 资金异动线) AND CROSS(主力启动线,主力洗盘线)),0,VOL,2,0),COLORYELLOW;
启动:STICKLINE(主力启动线>REF(主力启动线,1) AND (CROSS(VOL,主力启动线) AND (REF(VOL,1)<REF(资金异动线,1) AND REF(VOL,2)<REF(资金异动线,2))),0,VOL,3,0),COLORGREEN;
V1:=CLOSE/REF(CLOSE,3)>=1.1;
V2:=BACKSET(V1,2);
V3:=REF(CLOSE,3)*1.1;
V4:=CROSS(C,V3);
OK:STICKLINE((V2 AND COUNT(V2,2)=1),VOL,0,5,0),COLORRED;
COND:(CROSS(主力启动线,资金异动线) OR ((主力洗盘线 > 资金异动线) AND CROSS(主力启动线,主力洗盘线)))
OR (主力启动线>REF(主力启动线,1) AND (CROSS(VOL,主力启动线) AND (REF(VOL,1)<REF(资金异动线,1) OR REF(VOL,2)<REF(资金异动线,2))))
OR (V2 AND COUNT(V2,2)=1),LINETHICK0;
RV:=REF(V,1);
LV:=LLV(V,8);
低量0:IF(RV=LV,0.5,0),COLORYELLOW,LINETHICK2;
H_L:=0.1*CONST(HHV(VOL,240));
V100:= V<=LLV(V,100)*1.2 AND V>0 AND BARSCOUNT(V)>=100;
百日地量群:=COUNT(V100,5)>=3;
DRAWTEXT(FILTER(百日地量群,4),V+3*H_L,'地量群'),COLORGRAY;
长阴短柱:=C/REF(C,1)<=0.96 AND V<HHV(V,30)/1.9;
DRAWTEXT(长阴短柱 ,V+1.6*H_L,'!'),COLORLICYAN;
倍量:V>=REF(V*1.9,1) AND C>O AND C>REF(C,1),LINETHICK0,COLORYELLOW;{倍量}
低量:LLV(VOL,21)=VOL AND C>=REF(C,1),LINETHICK0,COLORGREEN;
百日地量:LLV(VOL,100)=VOL,LINETHICK0,COLORMAGENTA;{100日地量}
平量:V/REF(V,1)>=0.97 AND V/REF(V,1)<1.03 AND C>=REF(C,1),LINETHICK0,COLORWHITE;{平量}
倍缩:VOL<=REF(V,1)*0.5,LINETHICK0,COLORRED;
STICKLINE(倍量,0,V,3,0),COLORYELLOW;
STICKLINE(低量,0,V,4,0),COLORGREEN;
STICKLINE(百日地量,0,V,6,0),COLORMAGENTA;
STICKLINE(平量,0,V*0.98,5,0),COLORWHITE;
STICKLINE(倍缩,0,V*0.9,3,0),COLORRED;
获利比例:WINNER(C)*100,NODRAW;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.5,0,STRCAT('获利比例:',CON2STR(获利比例,2)));
N:=120;
获利盘90均线:MA(COST(90),N);
获利盘50均线:MA(COST(50),N);
获利盘30均线:MA(COST(30),N);
获利盘10均线:MA(COST(10),N);
STICKLINE(V/REF(V,1)>2,V,0,3,0),COLORYELLOW;
STICKLINE(V/REF(V,1)>=6,V,0,3,0),COLORRED;
高倍量:V=HHV(V,55) AND V/REF(VOL,1)>=3 AND C>REF(C,1),COLORRED,LINETHICK1;
DRAWTEXT(高倍量,0.95,'高'),COLORRED;
梯量柱(3天):(COUNT(VOL>REF(VOL,1),3)=3 AND COUNT(CLOSE>OPEN,3)=3),COLORGREEN,STICK,LINETHICK1;
DRAWTEXT(梯量柱(3天),0.65,'梯'),COLORGREEN;
倍缩量:(COUNT((VOL/REF(VOL,1)<=0.5),1)=1 AND COUNT(CLOSE>OPEN,1)=1),STICK,COLORFF00FF,LINETHICK1;
DRAWTEXT(倍缩量,0.45,'倍缩'),COLORFF00FF;
缩量涨:(COUNT(C>REF(C,1),2)=2 AND COUNT(VOL<REF(VOL,1),2)=2),COLORYELLOW,STICK,LINETHICK1;
DRAWTEXT(缩量涨,0.3,'缩涨'),COLORYELLOW;
红太阳:(IF(LOW>REF(HIGH,1) AND COUNT(OPEN<CLOSE,1),0.5,0)),STICK,COLORRED,LINETHICK5;
{DRAWTEXT(红太阳,0.15,'红'),COLORRED;}
黑太阳:(IF(LOW>REF(HIGH,1) AND COUNT(OPEN>CLOSE,1),0.5,0)),STICK,COLORWHITE,LINETHICK5;
DRAWTEXT(黑太阳,0.15,'黑'),COLORWHITE;
预定黄金柱: DRAWICON(REF(V,2)>=REF(V,3)*1.99 AND REF(C,2)>REF(O,2) AND
REF(V,2)=HHV(V,3) AND C/REF(C,2) >=1.0995 AND REF(L,2)=LLV(L,3),V,1);
缩量:COUNT(CLOSE>REF(CLOSE,1),2)=2 AND COUNT(VOL<REF(VOL,1),2)=2;
STICKLINE(缩量,0,V,1,0),COLORGREEN; DRAWTEXT(缩量,VOL+3000,'缩量'),COLORGREEN;
T:=DYNAINFO(8)>0; VO:VOL=LLV(VOL,100) AND T; 地量柱:T AND VO,COLORBLUE;
STICKLINE(地量柱,0,V,1,0),COLORBLUE; DRAWTEXT(地量柱,VOL+3000,'芝麻地量'),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+3000,'倍'),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) AND VOL>2*REF(VOL,1) AND CLOSE>HJZ2 AND C>O;
黄金柱:FILTER(HJZ3,5),STICK,COLORRED,LINETHICK4; STICKLINE(黄金柱,0,V,1,0),COLORRED;
{DRAWTEXT(黄金柱,VOL+10000,'黄'),COLORRED;}
价涨量缩:缩量,COLORGREEN;
FLZ:=V>REF(V,1)*0.98 AND V<REF(V,1)*1.02,LINETHICK0;
STICKLINE(FLZ,0,V,1,0),COLORMAGENTA; DRAWTEXT(FLZ,VOL+3000,'平'),COLORMAGENTA;
平量柱:FLZ,COLORMAGENTA;
量柱:V/CAPITAL*100,VOLSTICK;
低量柱:=IF(V=LLV(V,10),9,8);
DRAWTEXT(低量柱>8,量柱*1.01,'凹口'),COLORYELLOW;
高量柱:=IF(V=HHV(V,10),3,2);
并肩平量柱:=IF((V/REF(V,1)>0.95 AND V/REF(V,1)<1.05),7,6);
缩量柱:=IF(V<REF(V,1) AND REF(V,1)<REF(V,2) AND REF(V,2)<REF(V,3),25,35);
梯量柱:=IF(V>REF(V,1) AND REF(V,1)>REF(V,2) AND REF(V,2)>REF(V,3),11,10);
DRAWTEXT(倍量柱>0,量柱*0.99,'倍');
DRAWTEXT(高量柱>2,量柱*0.85,'高');
DRAWTEXT(并肩平量柱>6,量柱*0.7,'平');
DRAWTEXT(梯量柱>10,量柱*0.55,'梯');
预定黄金柱1: DRAWICON(REF(V,2)>=REF(V,3)*1.99 AND REF(C,2)>REF(O,2) AND
REF(V,2)=HHV(V,3) AND C/REF(C,2) >=1.0995 AND REF(L,2)=LLV(L,3),V,9);
预定:预定黄金柱1;
DRAWTEXT(预定,VOL*1.01,'↙黄金柱'),COLORGREEN;
AA1:=REF(CLOSE,2)<REF(OPEN,2);
AA21:=REF(CLOSE,1)<REF(OPEN,1); AA22:=REF(CLOSE,1)>REF(OPEN,1);
AA2:=AA21 OR AA22; AA3:=REF(VOL,1)<REF(VOL,2); AA4:=VOL>REF(VOL,2);
AA:=AA1 AND AA2 AND AA3 AND AA4; BB1:=VOL/REF(VOL,1)>1.8;
BB2:=VOL/REF(VOL,1)<2.5; BB:=BB1 AND BB2; CC:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>0.02;
小倍阳:=AA AND BB AND CC;
DRAWICON(小倍阳,V,11);
DRAWTEXT(小倍阳,VOL*1.01,'↙小倍阳'),COLORGREEN;
AAA:=VOL>REF(V,1)*1.9;
VV4:=AAA AND V>(MA(V,40)*1.5),LINETHICK2;
共振量:REF(HHV(IF(VV4,IF(V/MA(V,40)>4.1,V*0.7,V*0.9),0),120),3),COLORGREEN,LINETHICK0;
DRAWTEXT(共振量,VOL*1.01,'↙共振量'),COLORGREEN,LINETHICK0;
{引用}
VA8:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV18:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA8),0);
OBV28:=EMA(OBV18,3)-MA(OBV18,9);
OBV38:=EMA(IF(OBV28>0,OBV28,0),3);
MAC38:=MA(C,3);
QS:=OBV38>REF(OBV38,1) AND MAC38>REF(MAC38,1);
STICKLINE(QS,0,V,3.5,0),COLORYELLOW;
吸:=XLPL.NOTEXT吸,COLORLIRED,CIRCLEDOT,LINETHICK3,NODRAW;
拉:=XLPL.NOTEXT拉,COLORRED,CIRCLEDOT,LINETHICK3,NODRAW;
派:=XLPL.NOTEXT派,COLORGREEN,CIRCLEDOT,LINETHICK3,NODRAW;
落:=XLPL.NOTEXT落,COLORWHITE,CIRCLEDOT,LINETHICK3,NODRAW;
STICKLINE(吸,0,V,2,0),COLORMAGENTA;
STICKLINE(拉,0,V,2,0),COLORRED;
STICKLINE(派,0,V,2,0),COLORGREEN;
STICKLINE(落,0,V,2,0),COLORGRAY;
QSLS:=QS AND 拉 AND 拉!=派;
STICKLINE(QSLS,0,V,2,0),COLORRED;
{量能潮}
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV1:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
OBV2:=EMA(OBV1,3)-MA(OBV1,9);
OBV3:=EMA(IF(OBV2>0,OBV2,0),3);
MAC3:=MA(C,3);
量能潮:OBV3,NODRAW,COLORBROWN;
STICKLINE(OBV3>REF(OBV3,1) AND MAC3>REF(MAC3,1),0,OBV3,0.1,0),COLORBROWN;
FL4:=V=HHV(V,250);
FL3:=V=HHV(V,120) AND V!=HHV(V,250);
FL2:=V=HHV(V,60) AND V!=HHV(V,120) AND V!=HHV(V,250);
FL1:=V=HHV(V,30) AND V!=HHV(V,60) AND V!=HHV(V,120) AND V!=HHV(V,250);
DRAWTEXT(FL4,V*1.18,'④'),COLORLIGRAY;
DRAWTEXT(FL3,V*1.18,'③'),COLORLIGRAY;
DRAWTEXT(FL2,V*1.18,'②'),COLORLIGRAY;
DRAWTEXT(FL1,V*1.18,'①'),COLORLIGRAY;
巨量平台:REF(V/2,BARSLAST(V=HHV(VOL,60))),COLOR0080FF,LINETHICK2;
芝麻平台:REF(V/2,BARSLAST(V=LLV(VOL,120))),COLORBROWN,LINETHICK2;
STICKLINE(V>=巨量平台,巨量平台,V,1,0),COLOR0080FF;
XG:=REF(巨量平台,1)!=巨量平台;
STICKLINE(XG,0,V,1,0),COLORYELLOW;
E1:=REF(芝麻平台,1)!=芝麻平台;
STICKLINE(E1,0,V,1,0),COLORGREEN;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!