【通达信源码分享】精品指标公式-趋势自动画线

通达信免费指标 07-13 阅读:403 评论:0

QA:=REF(HIGH,10)=HHV(HIGH,2*10+1);

QB:=BACKSET(QA,10+1);

QC:=FILTER(QB,10) AND HIGH=HHV(HIGH,10+1);

QD:=BARSLAST(QC);

QE:=IF(QC,CURRBARSCOUNT,0);

QF:=IF(QD,REF(QE,QD),QE);

QG:=CONST(QF);

QH:=REF(QF,QD+1);

QW:=CONST(QH);

TDXSTEP100:DRAWLINE(CURRBARSCOUNT=QW,HIGH,CURRBARSCOUNT=QG,HIGH,1),COLORGREEN;

TDXSTEP101:DRAWLINE(CURRBARSCOUNT=QW,HIGH,ISLASTBAR,REF(HIGH,QW-1),1),COLOR0099FF;

TDXSTEP102:DRAWLINE(CURRBARSCOUNT=QG,HIGH,ISLASTBAR,REF(HIGH,QG-1),1),COLOR0099FF;

QM:=INTPART(3*8/5);

QR:=REF(HIGH,QM)=HHV(HIGH,2*QM+1);

QT:=FILTER(QR,QM);

QY:=BACKSET(QT,QM+1);

QU:=FILTER(QY,QM);

QI:=BACKSET(ISLASTBAR,BARSLAST(QU)+1);

QP:=QI>REF(QI,1);

TDXSTEP103:DRAWLINE(QU,HIGH,QP,HIGH,1),COLORRED;

QA1:=REF(LOW,8)=LLV(LOW,2*8+1);

QB1:=BACKSET(QA1,8+1);

QC1:=FILTER(QB1,8) AND LOW=LLV(LOW,8+1);

QD1:=BARSLAST(QC1);

QE1:=IF(QC1,CURRBARSCOUNT,0);

QF1:=IF(QD1,REF(LOW,QD1),LOW);

QG1:=IF(QD1,REF(QE1,QD1),QE1);

QH1:=CONST(QG1);

QW1:=REF(QF1,QD1+1);

QM1:=REF(QG1,QD1+1);

QR1:=CONST(QM1);

TDXSTEP104:DRAWLINE(CURRBARSCOUNT=QR1,LOW,CURRBARSCOUNT=QH1,LOW,1),COLORBLUE;

TDXSTEP105:DRAWLINE(CURRBARSCOUNT=QH1,LOW,ISLASTBAR,REF(LOW,QH1-1),1),COLORWHITE;

TDXSTEP106:DRAWLINE(CURRBARSCOUNT=QR1,LOW,ISLASTBAR,REF(LOW,QR1-1),1),COLORWHITE;

QT1:=REF(LOW,QM)=LLV(LOW,2*QM+1);

QY1:=FILTER(QT1,QM);

QU1:=BACKSET(QY1,QM+1);

QI1:=FILTER(QU1,QM);

QP1:=BACKSET(ISLASTBAR,BARSLAST(QI1)+1);

QJ1:=QP1>REF(QP1,1);

TDXSTEP107:DRAWLINE(QI1,LOW,QJ1,LOW,1),COLORRED;

SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);

SR2:=FILTER(SR1,10);

SR3:=BACKSET(SR2,10+1);

HD:=FILTER(SR3,10);

前高:=REF(HIGH,BARSLAST(HD));

TDXSTEP108:DRAWICON(CROSS(CLOSE,前高),LOW-0.2,3);

C3:=REF(CLOSE,1);

涨停:=IF((CLOSE-C3)*100/C3>=10-0.01*100/C3,2,0);

TDXSTEP109:STICKLINE(涨停,OPEN,CLOSE,1.5,0),COLORYELLOW;

跌停:=IF((C3-CLOSE)*100/C3>=10-0.01*100/C3,2,0);

TDXSTEP110:STICKLINE(跌停,OPEN,CLOSE,1.5,0),COLORGREEN;

微信截图_20230713211754.png

版权声明

本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!

服务热线

18020657357

微信客服

微信客服