A1:=(Ema((OPEN+HIGH+LOW+CLOSE)/4,3)+EMA((OPEN+HIGH+LOW+CLOSE)/4,6)+EMA((OPEN+HIGH+LOW+CLOSE)/4,9))/3;
A2:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,5)+EMA((OPEN+HIGH+LOW+CLOSE)/4,11)+EMA((OPEN+HIGH+LOW+CLOSE)/4,22))/3;
A3:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,7)+EMA((OPEN+HIGH+LOW+CLOSE)/4,14)+EMA((OPEN+HIGH+LOW+CLOSE)/4,29))/3;
A4:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,9)+EMA((OPEN+HIGH+LOW+CLOSE)/4,18)+EMA((OPEN+HIGH+LOW+CLOSE)/4,38))/3;
A5:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,11)+EMA((OPEN+HIGH+LOW+CLOSE)/4,22)+EMA((OPEN+HIGH+LOW+CLOSE)/4,48))/3;
A6:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,13)+EMA((OPEN+HIGH+LOW+CLOSE)/4,26)+EMA((OPEN+HIGH+LOW+CLOSE)/4,54))/3;
A7:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,21)+EMA((OPEN+HIGH+LOW+CLOSE)/4,34)+EMA((OPEN+HIGH+LOW+CLOSE)/4,72))/3;
VAR1:=FORCAst(A1,6);
VAR2:=FORCAST(A2,6);
VAR3:=FORCAST(A3,6);
VAR4:=FORCAST(A4,6);
VAR5:=FORCAST(A5,6);
VAR6:=FORCAST(A6,6);
VAR7:=FORCAST(A7,6);
IF(VAR1>REF(VAR1,1),VAR1,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR1<ref(var1,1),var1,drawnull),pointdot,color00ff00;
IF(VAR2>REF(VAR2,1),VAR2,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR2<ref(var2,1),var2,drawnull),pointdot,color00ff00;
IF(VAR3>REF(VAR3,1),VAR3,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR3<ref(var3,1),var3,drawnull),pointdot,color00ff00;
IF(VAR4>REF(VAR4,1),VAR4,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR4<ref(var4,1),var4,drawnull),pointdot,color00ff00;
IF(VAR5>REF(VAR5,1),VAR5,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR5<ref(var5,1),var5,drawnull),pointdot,color00ff00;
IF(VAR6>REF(VAR6,1),VAR6,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR6<ref(var6,1),var6,drawnull),pointdot,color00ff00;
IF(VAR7>REF(VAR7,1),VAR7,DRAWNULL),LINETHICK2,COLORFF00FF;
IF(VAR7<ref(var7,1),var7,drawnull),linethick2,color00ff00;
towERC:=FORCAST(EMA((3*CLOSE+2*OPEN+HIGH+LOW)/7,3),6);
DIRECTIONMAX:=MAX(REF(TOWERC,1),REF(TOWERC,1));
DIRECTIONMIN:=MIN(REF(TOWERC,1),REF(TOWERC,1));
STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,DIRECTIONMAX,4,0),COLOR0000FF;
STICKLINE(TOWERC<ref(towerc,1),towerc,directionmin,4,0),color00ff00;< p="">
标签:EMA,REF,HIGH,通达信,源码,LOW,CLOSE,狂舞,OPEN From: https://www.cnblogs.com/zhibiao/p/17993119