通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
以下是通达信量能正负柱副图指标公式源码
黑马拉升由两个阶段构成:同步上涨阶段(黄芯柱)和惯性上涨阶段(背离阶段、红芯柱)
DRAWGBK(C>O,RGB(60,0,0),RGB(0,0,0),1,2,1);
SAT:=(AMOUNT/C)/(HHV(AMOUNT,180)/HHV(C,180));
量能饱和度:=IF(SAT>1,1,SAT)*100+50,,COLORYELLOW,LINETHICK2;
量能:=EMA(量能饱和度,3),COLORYELLOW,LINETHICK2;
量能正负:=量能-90;
W1:STICKLINE(量能正负>0,量能正负,0,3,1),COLORRED;
W2:STICKLINE(量能正负<0,量能正负,0,3,1),COLORCYAN;
VA1:=HHVBARS(量能正负,BARSLAST(量能正负<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,量能正负),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,量能正负)OR(ISLASTBARAND量能正负>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,量能正负,REF(VA2,1),REF(量能正负,1),1),COLORMAGENTA;
VA3:=LLVBARS(量能正负,BARSLAST(量能正负>0)+1);
VA4:=CROSS(BACKSET(CROSS(量能正负,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,量能正负),BARSCOUNT(C)));
前低:DRAWLINE(VA4,量能正负,REF(VA4,1),REF(量能正负,1),1);
BDTJ:=IF(量能正负<0,filterx(量能正负=llv(量能正负,barslast(量能正负>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(量能正负<CONST(LLV(量能正负,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(量能正负,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(量能正负>本低/2AND量能正负<0,0.5),tsbdtj)=1,0.5)and=""tsbdtj="">=0;
终点:=IF(ISLASTBARAND量能正负>0AND量能正负=HHV(量能正负,BARSLAST(量能正负<0)),1,
IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1OR终点=2)AND量能正负>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,量能正负,REF(ZZ,1),REF(量能正负,1),1),COLORWHITE;
横线:=CONST(REF(量能正负,BARSLAST(ZZ)));
WW:=量能正负>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(量能正负,BD+1)),BDTJ=1,量能正负,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(量能正负,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0AND天数<=ref(tj,天数),sum(量能>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(量能正负<本高2=""and="">0,0.5),ZZ)=1,0.5)ANDZZ>=0;
STICKLINE(量能正负>前高AND本高>前高ANDBARSLAST(CROSS(量能正负<本高>0AND
量能正负>(前高+本高)/2,量能正负,前高,1,0),COLORYELLOW;
前高本高二分位:IF(量能正负>0AND本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1)
,DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,
DRAWNULL),2));
DRAWTEXT(WQG,量能正负*1.1,'本高成立'),COLORWHITE;
KAAA:DRAWTEXT(BDCL,量能正负*1.1,'本低成立'),COLORWHITE;
STICKLINE(量能正负>前高,量能正负,前高,1,0),COLORYELLOW;
STICKLINE(WQG,量能正负,0,1,0),COLORGREEN;
STICKLINE(量能正负<0AND量能正负<前低AND前低<0,量能正负,前低,1,0),COLORBLUE;
B1:=IF(CROSS(量能正负<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(量能正负>0)-1;
STICKLINE(BARSLAST(BDCL)>=0AND量能正负<前低AND量能正负<0,量能正负,前低,1,0),COLORGREEN;
STICKLINE(BDCL,量能正负,0,1,0),COLORWHITE;
STICKLINE(量能正负>前高AND本高>前高ANDBARSLAST(WQG)>0,
量能正负,前高,1,0),COLORRED;
DRAWTEXT(VA2ANDVA2!=UU,(量能正负/10)*9,'前');
DRAWTEXT(VA2ANDVA2!=UU,量能正负/10,'高');
DRAWTEXT(ZZ,(量能正负/10)*9,'本'),COLORWHITE;
DRAWTEXT(ZZ,量能正负/10,'高'),COLORWHITE;
DRAWTEXT(BDTJ,(量能正负/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,量能正负/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
DRAWICON(CROSS(量能正负,0),0,9);
DRAWTEXT_FIX(1,0.05,0.04,0,'【黑马拉升由两个阶段构成:同步上涨阶段(黄芯柱)
和惯性上涨阶段(背离阶段、红芯柱)】'),COLORFFFF00;
KKK:=KAAA;
评论(0)