通达信波段王源码

VAR1:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
 VAR2:=SMA(VAR1,M1,1);
 VAR3:=SMA(VAR2,M2,1);
 VAR4:=3*VAR2-2*VAR3;
 VAR5:=(3*CLOSE+OPEN+HIGH+LOW)/6;
 VAR6:=FORCAST(EMA(VAR5,8),6);
 VAR7:=FORCAST(EMA(VAR5,17),6);
 VAR8:=FORCAST(EMA(VAR5,11),6);
 VAR9:=FORCAST(EMA(VAR5,14),6);
 IF(VAR6>=VAR7,VAR6,DRAWNULL),COLORRED;
 IF(VAR6<VAR7,VAR6,DRAWNULL),COLORGREEN;
 IF(VAR6>=VAR7,VAR7,DRAWNULL),COLORRED;
 IF(VAR6<VAR7,VAR7,DRAWNULL),COLORGREEN;
 IF(VAR6>=VAR7,VAR8,DRAWNULL),DOTLINE,COLORRED;
 IF(VAR6<VAR7,VAR8,DRAWNULL),DOTLINE,COLORGREEN;
 IF(VAR6>=VAR7,VAR9,DRAWNULL),DOTLINE,COLORRED;
 IF(VAR6<VAR7,VAR9,DRAWNULL),DOTLINE,COLORGREEN;
 VAR10:=CROSS(VAR4,50);
 VAR11:=CROSS(50,VAR4);
 STICKLINE(VAR4>=50,LOW,HIGH,0.01,0),COLORBLUE;
 STICKLINE(VAR4>=50,CLOSE,OPEN,3,0),COLORBLUE;
 STICKLINE(VAR4<50,LOW,HIGH,0.01,0),COLORE0E000;
 STICKLINE(VAR4<50,CLOSE,OPEN,3,0),COLORE0E000;
 STICKLINE(VAR10,LOW,HIGH,0.01,0),COLORRED;
 STICKLINE(VAR10,CLOSE,OPEN,3,0),COLORRED;
 STICKLINE(VAR11,LOW,HIGH,0.01,0),COLORYELLOW;
 STICKLINE(VAR11,CLOSE,OPEN,3,0),COLORYELLOW;