【通达信源码分享】TD结构压力线与支撑线主图公式源码 自动划线
希望有缘人能够读懂 其中黄色K线 绿色K线是TD结构所谓波段高低点吧 然后 按高手要求连起来 奥秘在哪里?
公式源码:
TJ:=H<REF(H,4) AND REF(H,1)<REF(H,4) AND REF(H,2)<REF(H,4) AND REF(H,3)<REF(H,4) AND REF(H,4)>REF(H,5) AND REF(H,4)>REF(H,6) AND REF(H,4)>REF(H,7) AND REF(H,4)>REF(H,8) AND REF(H,4)>REF(H,9);
TJ1:=L>REF(L,4) AND REF(L,1)>REF(L,4) AND REF(L,2)>REF(L,4) AND REF(L,3)>REF(L,4) AND REF(L,4)<REF(L,5) AND REF(L,4)<REF(L,6) AND REF(L,4)<REF(L,7) AND REF(L,4)<REF(L,8) AND REF(L,4)<REF(L,9);
T:=BARSLAST(TJ);
LT:=BARSLAST(TJ1);
CF1:=BACKSET(T=0,5);
HT:=BARSLAST(CROSS(CF1=1,0.5));
CF2:=BACKSET(LT=0,5);
TT1:=BARSLAST(CROSS(CF2=1,0.5));
TT:=BARSLAST(CURRBARSCOUNT=CONST(SUMBARS(TT1=0,1)));
TTH:=BARSLAST(CURRBARSCOUNT=CONST(SUMBARS(HT=0,1)));
TTH2:=BARSLAST(CURRBARSCOUNT=CONST(SUMBARS(HT=0,2)));
CL:=CONST(REF(L,TT));
CH:=CONST(REF(H,TTH));
CH2:CONST(REF(H,TTH2))NODRAW;
CHT:=BARSLAST(CROSS(REF(H,HT)>CH,0.5));
CHT2:=BARSLAST(CROSS(REF(H,HT)>CH2,0.5));
AA2:=FINDHIGHBARS(REF(H,HT),TTH2+1,REF(CHT2,TTH2)+1,1);
CLT:=BARSLAST(CROSS(REF(L,TT1)<CL,0.5));
DRAWLINE(CURRBARSCOUNT=CONST(CHT)+1,H,CURRBARSCOUNT=CONST(SUMBARS(HT=0,1)),H,1),COLORYELLOW,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=CONST(AA2)+1,H,CURRBARSCOUNT=CONST(SUMBARS(HT=0,2)),H,1),COLORLIMAGENTA,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=CONST(CLT)+1,L,CURRBARSCOUNT=CONST(SUMBARS(TT1=0,1)),L,1),COLORGREEN,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(HT=0,2)),H,CURRBARSCOUNT=CONST(SUMBARS(HT=0,1)),H,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(HT=0,3)),H,CURRBARSCOUNT=CONST(SUMBARS(HT=0,2)),H,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(HT=0,4)),H,CURRBARSCOUNT=CONST(SUMBARS(HT=0,3)),H,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(HT=0,5)),H,CURRBARSCOUNT=CONST(SUMBARS(HT=0,4)),H,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(TT1=0,2)),L,CURRBARSCOUNT=CONST(SUMBARS(TT1=0,1)),L,1),COLORGREEN;
DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(TT1=0,3)),L,CURRBARSCOUNT=CONST(SUMBARS(TT1=0,2)),L,1),COLORGREEN;
DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(TT1=0,4)),L,CURRBARSCOUNT=CONST(SUMBARS(TT1=0,3)),L,1),COLORGREEN;
DRAWLINE(CURRBARSCOUNT=CONST(SUMBARS(TT1=0,5)),L,CURRBARSCOUNT=CONST(SUMBARS(TT1=0,4)),L,1),COLORGREEN;
STICKLINE(HT=0 ,C,O,2,0),COLORYELLOW;
STICKLINE(TT1=0 ,C,O,2,0),COLORGREEN;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!