以下是通达信红绿灯,趋势清晰明公式主图源码无加密

红绿灯,趋势清晰明了

 

公式用法:

红灯涨,绿灯跌;

趋势清晰,结合自动画线,支撑压力明显;

同时又BS买卖 提示;

更多用法,自己发掘

 

{红绿灯}

N1:=15;

买线:=EMA(C,2);

卖线:=EMA(SLOPE(C,21)*20+C,42); 

BU:=CROSS(买线,卖线);

SEL:=CROSS(卖线,买线);

DRAWICON(BU,L-0.0009,8);

DRAWICON(SEL,H+0.0009,9);

DRAWTEXT(BU,LOW*1,’B ‘),COLORRED;

DRAWTEXT(SEL,HIGH*1,’S’),COLORGREEN;

VAR1:=(HIGH+LOW+OPEN+CLOSE)/4;

生命线: MA(3*VAR1-2*SMA(VAR1,2,1),12),,LINETHICK;

VARQS1:=2091231;

VARQS2:=IF(DATE<=VARQS1,1,0);

VARQS3:=MA(CLOSE,45)*0.98;

STICKLINE(买线>=卖线,LOW,HIGH,0,1),COLORRED;

STICKLINE(买线>=卖线,CLOSE,OPEN,3,1),COLORRED;

STICKLINE(买线<卖线,LOW,HIGH,0,1),COLORGREEN;

STICKLINE(买线<卖线,CLOSE,OPEN,3,1),COLORGREEN;

AA:=REF(HIGH,N1)=HHV(HIGH,2*N1+1);

BB:=BACKSET(AA,N1+1);

CC:=FILTER(BB,N1) AND HIGH=HHV(HIGH,N1+1);

AA2:=REF(LOW,N1)=LLV(LOW,2*N1+1);

BB2:=BACKSET(AA2,N1+1);

CC2:=FILTER(BB2,N1) AND LOW=LLV(LOW,N1+1);

GG:=ISLASTBAR AND REF(CC,BARSLAST(CC));

HH:=BACKSET(GG,BARSLAST(CC)+1);

II:=HH>REF(HH,1);

JJ:=REF(BARSLAST(CC),1);

KK:=BACKSET(II,JJ+2);

LL:=KK>REF(KK,1);

DRAWLINE(LL,HIGH,II,HIGH,1),POINTDOT,COLORMAGENTA;

GG2:=ISLASTBAR AND REF(CC2,BARSLAST(CC2));

HH2:=BACKSET(GG2,BARSLAST(CC2)+1);

II2:=HH2>REF(HH2,1);

JJ2:=REF(BARSLAST(CC2),1);

KK2:=BACKSET(II2,JJ2+2);

LL2:=KK2>REF(KK2,1);

DRAWLINE(LL2,LOW,II2,LOW,1),COLOR3EC20C;

CS:=(REF(HIGH,BARSLAST(II))-REF(HIGH,BARSLAST(LL)))/(BARSLAST(LL)-BARSLAST(II));

阻力线:=REF(HIGH,BARSLAST(II))+BARSLAST(II)*CS;

阻力值:阻力线,LINETHICK3,COLOR1ECBE6;

DRAWICON(CROSS(C,阻力线),L*0.95,12);

N:=20;

TY:=C;A1:=REF(TY,N)=HHV(TY,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);

HD:=FILTER(C1,N);A2:=REF(TY,N)=LLV(TY,2*N+1);B2:=FILTER(A2,N);

C2:=BACKSET(B2,N+1);LD:=FILTER(C2,N);A:=REF(C,BARSLAST(HD));

B:=REF(C,BARSLAST(LD));T1:=BARSLAST(HD) AND BARSLAST(LD) AND NOT(LD);

M1:=IF(CAPITAL<1,EMA(VOL,55),C);

M2:=IF(CAPITAL<1,WMA(M1,360),DMA(M1,VOL/CAPITAL));

M3:=IF(CAPITAL<1,DMA(MA(C,5),VOL/CAPITAL),DMA(MA(C,5),VOL/CAPITAL));

STICKLINE(T1,A,A,3,0),COLOR00FF00,LINETHICK2;

STICKLINE(T1,B,B,3,0),COLOR0000FF,LINETHICK2;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。