通达信半年百分线主图指标公式
2020/1/14 17:57:44
{上半年百分线,适用于日线周期}
半年:=1+(BARSLAST(CROSS(MONTH=1 OR MONTH=7,0.5) OR DATETODAY(DATE)=1));
天数:=IF(PERIOD=5,半年,DRAWNULL);
上高:=REF(HHV(H,天数),天数),COLORYELLOW;
上低:=REF(LLV(L,天数),天数),COLORWHITE;
高1:=上高;
低1:=上低;
振幅:(高1-低1)/低1*100,NODRAW,COLORWHITE;
H1:=高1;
H2:=高1-(高1-低1)*1/4;
H3:=高1-(高1-低1)*1/2;
H4:=高1-(高1-低1)*3/4;
H5:=低1;
天:REFDATE(H1,DATE),POINTDOT,LINETHICK4,COLORYELLOW;
地:REFDATE(H5,DATE),POINTDOT,LINETHICK4,COLOR00FF00;
强:REFDATE(H2,DATE),POINTDOT,LINETHICK4,COLORFFFF00;
中:REFDATE(H3,DATE),POINTDOT,LINETHICK4,COLORWHITE;
弱:REFDATE(H4,DATE),POINTDOT,LINETHICK4,COLOR0099FF;
N:=12;
DP:=(H+L+2*C)/4;
DN:=ABS(CLOSE-REF(CLOSE,N));
VY:=SUM(ABS(CLOSE-REF(CLOSE,1)),N);
{看股吧-股票公式网站 www.kanguba.com}
ER:=DN/VY;
FSC:=2/(2+1);
SSC:=2/(N+1);
SC:=ER*(FSC-SSC)+SSC;
SCSQ:=SC*SC;
KMA:DMA(DP,SCSQ),COLOR00FF00,LINETHICK2;
多空:EMA(DP,50),COLORFFFF00,LINETHICK2;
BUY:=KMA>EMA(KMA,3);
DRAWKLINE(H,O,L,C);
【量H】:=IF((AMOUNT/C)/(HHV(AMOUNT,21)/HHV(C,21))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,21)/HHV(C,21))*100);
STICKLINE(【量H】=100,L,H,0.4,0),COLORFF00FF;
STICKLINE(【量H】=100 AND C>=O,C,O,4,1),COLORFF00FF;
STICKLINE(【量H】=100 AND C<O,C,O,4,0),COLORFF00FF;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.8,O,C,2,0),COLORRED;
STICKLINE(ZDF<-9.8,O,C,2,0),COLORBLUE;
IF(多空>REF(多空,1),多空,DRAWNULL),COLOR00FF00,LINETHICK2;
IF(BUY=1,KMA,DRAWNULL),COLORRED,LINETHICK2;
看股 吧公式 www.kang uba.com
其它股票公式列表