N1:=8;N2:=22;N3:=44;
AA:=(HHV(HIGH,120)-LLV(LOW,120))/30;
VAR1:=(2*CLOSE+HIGH+LOW)/4;
转换线: (HHV(HIGH,N1)+LLV(LOW,N1))/2,COLORAAFF99,LINETHICK2;
基准线: (HHV(HIGH,N2)+LLV(LOW,N2))/2,COLORFF6DD8,LINETHICK2;
迟行带:REF(CLOSE,N2),COLORFF9224;
先行带A:REF((转换线+基准线)/2,N2),COLORYELLOW,LINETHICK2;
先行带B:REF((HHV(HIGH,N3)+LLV(LOW,N3))/2,N2),COLOR909090,LINETHICK2;
STICKLINE(先行带A<先行带B,先行带A,先行带B,2,1.5),COLOR339933;
STICKLINE(先行带A>=先行带B,先行带A,先行带B,2,0.1),COLOR0033CC;
{POLYLINE(1,先行带A),COLORYELLOW;
POLYLINE(1,基准线),COLORFF6DD8;
POLYLINE(1,转换线),COLORAAFF99,LINETHICK;};
TL11:=REF(转换线,1)=REF(基准线,1) AND 转换线>基准线;
DRAWTEXT(CROSS(转换线,基准线) AND VAR1<MIN(先行带A,先行带B),MIN(基准线,LOW)*0.995,'▲'),COLORRED;
DRAWTEXT(CROSS(转换线,基准线) AND RANGE(VAR1,MIN(先行带A,先行带B),MAX(先行带A,先行带B)),LOW*0.995,'▲▲'),COLORRED;
DRAWTEXT(CROSS(转换线,基准线) AND VAR1>MAX(先行带A,先行带B),L*0.95,'▲▲▲'),COLORRED;
DRAWTEXT(TL11 AND VAR1>MAX(先行带A,先行带B),L*0.95,'▲▲▲'),COLORRED;
DRAWTEXT(CROSS(基准线,转换线) AND VAR1<MIN(先行带A,先行带B),MAX(基准线,HIGH)+AA*2,'▼▼▼'),COLORBLUE;
DRAWTEXT(CROSS(基准线,转换线) AND RANGE(VAR1,MIN(先行带A,先行带B),MAX(先行带A,先行带B)),MAX(基准线,HIGH)+AA,'▼▼'),COLORBLUE;
DRAWTEXT(CROSS(基准线,转换线) AND VAR1>MAX(先行带A,先行带B),MAX(基准线,HIGH)+AA,'▼'),COLORBLUE;
{阴柱}
STICKLINE(C<O,C,O,2,0),COLORGREEN;
{红柱}
STICKLINE(C>O,C,O,2,0),COLORFF33FF; |