时空矩阵主图指标 通达信公式(附图)

拾荒网 通达信公式 1.7K+
Z:=ZIG(3,20),COLORGRAY;
HT:=BARSLAST(Z<REF(Z,1) AND REF(Z,1)>REF(Z,2));
LT:=BARSLAST(Z>REF(Z,1) AND REF(Z,1)<REF(Z,2));
HH:=HHV(C,LT+1);
LL:=LLV(C,HT+1);
QF1:=BACKSET(HT=0,2);
QF2:=BACKSET(LT=0,2);
Q1:=BARSLAST(CROSS(QF1=1,0.5));
Q2:=BARSLAST(CROSS(QF2=1,0.5));
X1:=REFX(HH,BARSNEXT(Q1=0));
X2:=REFX(LL,BARSNEXT(Q2=0));
{红下边延长线}
DRAWLINE(Q1=0,X2,Q2=0,LL,1),COLORRED,LINETHICK4;
{红上边}
DRAWLINE(Q2=0,X1,Q1=0,HH,0),COLORRED;
{红下边}
DRAWLINE(Q2=0,X2,Q1=0,LL,0),COLORRED,LINETHICK4;
{红左边}
STICKLINE(Q2=0 ,X1,C,0,0),COLORRED;
{红右边}
STICKLINE(Q2=0 ,HH,C,0,0),COLORRED;
{绿上边}
DRAWLINE(Q1=0,C,Q2=0,HH,0),COLOR009900;
{绿下边}
DRAWLINE(Q1=0,X2,Q2=0,LL,0),COLOR009900,LINETHICK4;
{绿左边}
STICKLINE(Q1=0 ,LL,C,0,0),COLOR009900;
{绿右边}
STICKLINE(Q1=0 ,X2,C,0,0),COLOR009900;
{下降三角斜边}
DRAWLINE(Q1=0,C,Q2=0,LL,0),COLOR009900;