公式描述
压力线是指当股票在上涨时,突破到某一个区域,受到空方的集中压制,这个区域顶部所连成的直线就叫做压力线。
支撑线是指当股票在下跌时,突破到某一个区域,受到多方的集中反扑,这个区域底部所连成的直线就叫做支撑线。
压力线和支撑线的作用
(1)助涨助跌
这是压力线和支撑线最主要的作用,也就是当股票在上涨过程中,回调到支撑线附近,受到支撑后,支撑线推动股价继续上涨,当股票在下跌过程中,反弹到压力线附近,受到压制后,压力线推动股价继续下跌。
(2)趋势反转
当股价下跌时,受到支撑线的强力支撑,多空双方力量在支撑线的作用下,有效发生改变,进而导致股票下跌的趋势发生改变,股价朝多头方向运行。反之,当股价上涨时,受到空方的压制,多空双方力量发生改变,股价下跌。
识别股票的支撑线和压力线是技术分析的关键一步,在一定情况下,股票的压力线和支撑线会发生逆转,压力线直接转换成支撑线,支撑线直接转化成压力线。
今日分享的通达信三线买卖指标公式,是一个分析个股支撑跟压力的指标。
具体信号说明:
指标中绿色信号线是高点压力线,白色信号线是中轨线,红色信号线是低点支撑线,当出现红色向上的箭头时,后市上涨的概率较大,是参考买入的信号。
当指标中出现绿色向下的箭头时,后市看跌是参考卖出的信号。
公式案例
公式源码
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
高点压力RAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT;
AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DRAWICON(CC1,L*0.98,1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(L,DD1),L);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
低点支撑RAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK2;
ZGSTAR:=(高点压力+低点支撑)/2;
ZGEND:=CONST((高点压力+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨RAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORWHITE,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGENTA,POINTDOT,;
DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYAN,POINTDOT;
STICKLINE(C/REF(C,1)>1.097 AND C=H,H,L,0,0),COLORYELLOW;
STICKLINE(C/REF(C,1)>1.097 AND C=H,C,O,3,0),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0,0,0,CODE),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,STKNAME),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.2,0,0,HYBLOCK),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR,0.3,0,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.4,0,0,GNBLOCK),COLORGREEN;
{DRAWTEXT_FIX(ISLASTBAR,0,0.1,0,FGBLOCK),COLORWHITE;}
{DRAWTEXT_FIX(1,0.01,0,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0.13,0,0,'概念:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.16,0,0,GNBLOCK),COLORYELLOW;}
DRAWTEXT_FIX(1,0.01,0.05,0,'风格:'),COLORGREEN;
DRAWTEXT_FIX(1,0.04,0.05,0,FGBLOCK),COLORGREEN; |