通信达公式编写 通达信越红越好副图指标公式
VAR1:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,21))*100-70;
VAR2:=SMA(VAR1,9,1)+100;
VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4:=SMA(VAR3,3,1);
VAR5:=SMA(VAR4,3,1)+100;
VAR6:=VAR5-VAR2;
机构: IF(VAR6>100,VAR6-100,0)*2.5,COLORFF00FF,LINETHICK1;
DRAWBAND(10,RGB(0,0,0),机构,RGB(10,116,126));
EMA5:=EMA(C,5);
EMA10:=EMA(C,10);
EMA20:=EMA(C,20);
EMA30:=EMA(C,30);
EMA55:=EMA(C,55);
EMA120:=EMA(C,120);
A1:=EMA5>=REF(EMA5,1);
A2:=EMA5<REF(EMA5,1);
DRAWICON(A1,105,1);
DRAWICON(A2,105,2);
EMA5金叉:A1,NODRAW;
DRAWTEXT(ISLASTBAR=1,IF(A1,95,95),'-5金叉'),COLORCYAN;
B1:=EMA10>=REF(EMA10,1);
B2:=EMA10<REF(EMA10,1);
DRAWICON(B1,90,1);
DRAWICON(B2,90,2);
EMA10金叉:B1,NODRAW;
DRAWTEXT(ISLASTBAR=1,IF(B1,85,85),'-10金叉'),COLORCYAN;
C1:=EMA20>=REF(EMA20,1);
C2:=EMA20<REF(EMA20,1);
DRAWICON(C1,80,1);
DRAWICON(C2,80,2);
EMA20金叉:C1,NODRAW;
DRAWTEXT(ISLASTBAR=1,IF(C1,75,75),'-20金叉'),COLORCYAN;
D1:=EMA30>=REF(EMA30,1);
D2:=EMA30<REF(EMA30,1);
DRAWICON(D1,70,1);
DRAWICON(D2,70,2);
EMA30金叉:D1,NODRAW;
DRAWTEXT(ISLASTBAR=1,IF(D1,65,65),'-30金叉'),COLORCYAN;
(股票知识网zhishi.southmoney.com)