以下是通达信经典指标公式源码
通达信短线经典指标公式源码:
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,10)+EMA((OPEN+HIGH+LOW+CLOSE)/4,20))/3;
A3:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,7)+EMA((OPEN+HIGH+LOW+CLOSE)/4,14)+EMA((OPEN+HIGH+LOW+CLOSE)/4,28))/3;
A4:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,9)+EMA((OPEN+HIGH+LOW+CLOSE)/4,18)+EMA((OPEN+HIGH+LOW+CLOSE)/4,36))/3;
A5:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,11)+EMA((OPEN+HIGH+LOW+CLOSE)/4,22)+EMA((OPEN+HIGH+LOW+CLOSE)/4,44))/3;
A6:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,13)+EMA((OPEN+HIGH+LOW+CLOSE)/4,26)+EMA((OPEN+HIGH+LOW+CLOSE)/4,52))/3;
A7:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,21)+EMA((OPEN+HIGH+LOW+CLOSE)/4,34)+EMA((OPEN+HIGH+LOW+CLOSE)/4,68))/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);
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;
乖离率:=(C-MA(C,250))/MA(C,250)*100,COLOR00FFFF,LINETHICK2;
MA乖离率5:=EMA(乖离率,5),COLOR4080FF;
MA乖离率20:=EMA(乖离率,20),COLORRED;
N1:=BARSLAST(CROSS(C,MA(C,250)));
N2:=BARSLAST(CROSS(MA(C,250),C));
长期:=IF(N1 N2,N1+1,0),COLOR0000FF;
峰值乖离:=HHV(乖离率,长期趋势),COLOR00FF00;
N1A:=BARSLAST(CROSS(C,MA(C,13)));
N2A:=BARSLAST(CROSS(MA(C,13),C));
短线跟踪:IF(N1A N2A,N1A+1,0),COLORFFFFFF,LINETHICK1,LINESTICK;
V0:0,COLORFFA2AF;
RSV5:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100-50;
短K5:=SMA(RSV5,3,1);
短D5:=SMA(短K5,3,1);
短J5:3*短K5-2*短D5,COLORAAAAAA;
RSV27:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100-50;
中K27:SMA(RSV27,3,1),LINETHICK3,COLORFFFFFF;
RSV89:=(CLOSE-LLV(LOW,89))/(HHV(HIGH,89)-LLV(LOW,89))*100-50;
K89:=SMA(RSV89,13,1);
长D89:SMA(K89,3,1),LINETHICK3,COLORFF00FF;
V50:50,COLOR00FF00;
V30:30,COLOR00FF00,POINTDOT;
V30A:-30,COLOR00FF00,POINTDOT;
V50A:-50,COLOR00FF00;
VAR1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VAR2:=2*ABS(VAR1);
上升浪:IF(VAR1 0,VAR1,0),COLORRED,LINESTICK;
下跌浪:IF(VAR1 0,VAR2,0),COLOR00FF00,LINESTICK;
S1:=V/MA(V,20);
XG:IF(S1 2ANDC REF(C,1)ANDV REF(V,1),30,0),STICK,COLORFFFFFF,
LINETHICK2;
DRAWTEXT(S1 2ANDC REF(C,1)ANDV REF(V,1),40,'大'),COLORFF00FF;
DRAWTEXT(S1 2ANDC REF(C,1)ANDV REF(V,1),55,'量'),COLORFF00FF;
V1:=MA(C,3)=HHV(MA(C,3),7);
V2:=MA(C,3) MA(C,5);
V3:=MA(V,5) MA(V,10)*1.01;
V4:=COUNT(MA(C,1) REF(C,1),2)=2;
LC20:=REF(CLOSE,1);
RSI20:=SMA(MAX(CLOSE-LC20,0),4.1,1)/SMA(ABS(CLOSE-LC20),4.1,1)*100;
STICKLINE(CROSS(RSI20,11)*1,-10,20,2,0),coloryellow;
VAR3A:=3;
VAR2A:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
YXF:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX 0,2)ANDCROSS(DX,MA(DX,2)),1,0);
加仓:IF(FILTER(YXF=1,5),20,-10),STICK,colorliblue,LINETHICK3;
A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV
(L,55))*100,5,1);
FY:=EMA(A51,5);
A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
QS:(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2)),LINETHICK2,colorred;
通达信短线经典指标公式截图