公式解读:
通达信指标公式源码:
N:=76;
M:=2;
L1:=LLV(HIGH,N);
H1:=HHV(L,N);
C1:=(H1+L1)/2;
D1:=LLV(HIGH,M);
天门阵:H1,COLORFFFF00,LINETHICK2;
RC:=DYNAINFO(3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=2*(S2-S6);
STICKLINE(DK 0,RC,RC+DK,0,1),COLORRED;
STICKLINE(DK 0,RC,RC+DK,0,1),COLORFFFF00;
RC,COLOR333399;
DRAWTEXT(FILTER(EMA(CLOSE,60)-EMA(CLOSE,12) 0ANDEMA(CLOSE,12)/LOW 1.15,5),
LOW,'●'),COLORFF00FF;
DRAWTEXT(FILTER(EMA(CLOSE,12)-EMA(CLOSE,60) 0ANDHIGH/EMA(CLOSE,12) 1.15,5),
HIGH,'●'),COLORYELLOW;
MA1:MA(CLOSE,6),COLORFFFFFF;
MA2:MA(CLOSE,13),COLORYELLOW;
X:=EMA(((SLOPE(CLOSE,21)*20)+CLOSE),68);
Y:=EMA(CLOSE,10);
LL:=REF(CLOSE,2);
MM:=((SMA(MAX((CLOSE-LL),0),6,1)/SMA(ABS((CLOSE-LL)),6,1))*100);
DB:=IF(((MM REF(MM,1))AND(MM 79)),MM,0);
DRAWTEXT(CROSS(Y,X),(LOW*0.985),'▲'),COLORRED;
DRAWTEXT(CROSS(X,Y),(HIGH*1.02),'◆'),COLORFF6699;
DRAWTEXT(DB,(HIGH*1.02),'○'),COLOR00FF00;
VAR1:=LLV(LOW,21);
VAR2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*100),5);
AK:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*50),13);
DD:=EMA(((0.667*REF(AK1,1))+(0.333*AK1)),2);
VAR3:=LLV(LOW,55);
VAR4:=HHV(HIGH,34);
VAR5:=EMA((((CLOSE-VAR3)/(VAR4-VAR3))*100),3);
VAR6:=((AK+VAR5)/2);
VAR7:=EMA(((0.667*REF(VAR5,1))+(0.333*AK1)),2);
VAR8:=EMA(VAR6,5);
BB:=EMA(((0.667*REF(VAR8,1))+(0.333*VAR8)),2);
AB:=CROSS(AK1,AK);
BB1:=(CROSS(AK1,BB)AND(BB 30));
CD:=(BB1*0.6);
DRAWTEXT((CD=0.6),(LOW*0.99),'□'),COLOR33CC99;
DRAWTEXT((AB=1),(LOW*0.99),'□'),COLORWHITE;
{}
{E4:=(2*CLOSE+LOW+HIGH)/4;
平仓:=(EMA(E4,55)+MA(FORCAST(CLOSE,2),40))/2*1.66;
DRAWICON(CROSS(HIGH,平仓*0.99),HIGH+0.08,11);
DRAWICON(CROSS(HIGH,平仓*0.99),HIGH+0.02,12);
DRAWTEXT(CROSS(HIGH,平仓*0.99),HIGH+0.1,'平'),COLORWHITE;
F1:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;
F2:=(CLOSE-LLV(LOW,43))/(HHV(HIGH,43)-LLV(LOW,43))*100;
F3:=SMA(F2,2,1);
顶:=100+(-ABS(F1));
DRAWICON(CROSS(60,顶),HIGH+0.08,1);
DRAWICON(CROSS(60,顶),HIGH+0.02,2);
DRAWTEXT(CROSS(60,顶),HIGH+0.1,'天'),COLORFFF800;
VAR3A:=LLV(LOW,5)=LLV(LOW,45)ANDCLOSE =OPEN*1.04;
VAR4A:=CLOSE (REF(HIGH,1)+REF(LOW,1))/2;
VAR5A:=VAR3AANDVAR4A;
DRAWTEXT(FILTER(VAR5A,5),LOW,'建仓'),COLORRED;
DRAWTEXT(FILTER(VAR5A,5),LOW,'●'),COLORRED;};
N:=76;M:=2;
L1:=LLV(HIGH,N);
H1:=HHV(L,N);
C1:=(H1+L1)/2;
D1:=LLV(HIGH,M);
RC:=DYNAINFO(3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=2*(S2-S6);
STICKLINE(DK 0,RC,RC+DK,0,1),COLORRED;
STICKLINE(DK 0,RC,RC+DK,0,1),COLORFFFF00;
RC,COLOR333399;
DRAWTEXT(FILTER(EMA(CLOSE,60)-EMA(CLOSE,12) 0ANDEMA(CLOSE,12)/LOW 1.15,5),
LOW,'●'),COLORFF00FF;
DRAWTEXT(FILTER(EMA(CLOSE,12)-EMA(CLOSE,60) 0ANDHIGH/EMA(CLOSE,12) 1.15,5),
HIGH,'●'),COLORYELLOW;
MA1:MA(CLOSE,6),COLORFFFFFF;
MA2:MA(CLOSE,13),COLORYELLOW;
X:=EMA(((SLOPE(CLOSE,21)*20)+CLOSE),68);
Y:=EMA(CLOSE,10);
LL:=REF(CLOSE,2);
MM:=((SMA(MAX((CLOSE-LL),0),6,1)/SMA(ABS((CLOSE-LL)),6,1))*100);
DB:=IF(((MM REF(MM,1))AND(MM 79)),MM,0);
DRAWTEXT(CROSS(Y,X),(LOW*0.985),'▲'),COLORRED;
DRAWTEXT(CROSS(X,Y),(HIGH*1.02),'◆'),COLORFF6699;
DRAWTEXT(DB,(HIGH*1.02),'○'),COLOR00FF00;
VAR1:=LLV(LOW,21);
VAR2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*100),5);
AK:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*50),13);
DD:=EMA(((0.667*REF(AK1,1))+(0.333*AK1)),2);
VAR3:=LLV(LOW,55);
VAR4:=HHV(HIGH,34);
VAR5:=EMA((((CLOSE-VAR3)/(VAR4-VAR3))*100),3);
VAR6:=((AK+VAR5)/2);
VAR7:=EMA(((0.667*REF(VAR5,1))+(0.333*AK1)),2);
VAR8:=EMA(VAR6,5);
BB:=EMA(((0.667*REF(VAR8,1))+(0.333*VAR8)),2);
AB:=CROSS(AK1,AK);
BB1:=(CROSS(AK1,BB)AND(BB 30));
CD:=(BB1*0.6);
DRAWTEXT((CD=0.6),(LOW*0.99),'□'),COLOR33CC99;
DRAWTEXT((AB=1),(LOW*0.99),'□'),COLORWHITE;
[源码注释]动态公式解读
DIF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均
DEA赋值:DIF的9日指数移动平均
赋值:DIF上穿DEA AND 平滑异同平均的MACD 0
输出XG:5日前的金叉