源码:
{N1: 1 100 9;
N2 : 1 100 26;
N3 : 1 100 52 ;}
AA:=(HHV(HIGH,120)-LLV(LOW,120))/30;
VAR1:=(2*CLOSE+HIGH+LOW)/4;
转换线:(HHV(HIGH,N1)+LLV(LOW,N1))/2,COLORRED,LINETHICK2;
基准线:(HHV(HIGH,N2)+LLV(LOW,N2))/2,COLORBLUE,LINETHICK2;
迟行线:REF(CLOSE,N2),COLORFF9224;
先行带一:REF((转换线+基准线)/2,N2),COLORYELLOW,LINETHICK1;
先行带二:REF((HHV(HIGH,N3)+LLV(LOW,N3))/2,N2),COLOR909090,LINETHICK1;
选股:CROSS(转换线,基准线),LINETHICK0;
STICKLINE(先行带一<=先行带二,先行带一,先行带二,4,1.5),COLOR339933;
STICKLINE(先行带一>先行带二,先行带一,先行带二,4,1),COLOR0033CC;
DRAWTEXT(CROSS(转换线,基准线) AND VAR1<MIN(先行带一,先行带二),MIN(基准线,LOW)*0.995,'▲'),COLORYELLOW ;
DRAWTEXT(CROSS(转换线,基准线) AND RANGE(VAR1,MIN(先行带一,先行带二),MAX(先行带一,先行带二)),LOW*0.995,'▲\N▲'),COLORYELLOW;
DRAWTEXT(CROSS(转换线,基准线) AND VAR1>MAX(先行带一,先行带二),LOW-AA*0.5,'▲\N▲\N▲'),COLORYELLOW ;
DRAWTEXT(CROSS(基准线,转换线) AND VAR1<MIN(先行带一,先行带二),MAX(基准线,HIGH)+AA*2,'▼\N▼\N▼'),COLORFFFFFF ;
DRAWTEXT(CROSS(基准线,转换线) AND RANGE(VAR1,MIN(先行带一,先行带二),MAX(先行带一,先行带二)),MAX(基准线,HIGH)+AA,'▼\N▼'),COLORFFFFFF ;
DRAWTEXT(CROSS(基准线,转换线) AND VAR1>MAX(先行带一,先行带二),MAX(基准线,HIGH)+AA,'▼'),COLORFFFFFF ;
{阴柱}
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORFF9F68;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.5,0 ),COLOR009900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.2,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.8,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.6,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.4,0 ),COLOR00EE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.2,0 ),COLOR00FF00;
{红柱}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLORFFBBFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLORFF00FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0) ,COLORFF22FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.2,0) ,COLORFF44FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLORFF66FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.8,0) ,COLORFF88FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.6,0) ,COLORFF99FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.4,0) ,COLORFFAAFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.2,0) ,COLORFFBBFF;
|