在线检测未来函数

通达信一条均线主图指标公式

来源:Internet,编辑:股旁网,2013-02-22

T:=20;N:=2;M:=30;
DIRECTION:=CLOSE-REF(CLOSE,T);
VOLATILITY:=SUM(ABS(CLOSE-REF(CLOSE,1)),T);
ER:=SUM(ABS(DIRECTION/VOLATILITY),1);
FASTC:=2/(N+1);
SLOWC:=2/(M+1);
SMOOTH:=ER*( FASTC- SLOWC)+ SLOWC;
SE:=SMOOTH* SMOOTH;
YY:=REF(CLOSE,1)+SE*(CLOSE-REF(CLOSE,1));
AA:=IF(SUM(1,0)=T+1,YY,0);
BB:=BARSLAST(AA>0);
CC:=REF(CLOSE,BB);
AMA1:=REF(CC,1)+SE*CLOSE-REF(CC,1);
AMA2:DMA(CLOSE,SE),COLORFFAA00,LINETHICK2;
BUY:=CROSS(AMA1,AMA2)AND AMA2>REF(AMA2,1);
SELL:=CROSS(AMA2,AMA1);
持股:AMA1>AMA2,NODRAW,COLORRED;
持币:AMA1<=AMA2,NODRAW,COLORGREEN;
趋势向上:IF(AMA2>REF(AMA2,1),AMA2,DRAWNULL),COLORFF00FF,LINETHICK2;

通达信一条均线主图指标公式

 

相关文章