在线检测未来函数

通达信MACD反推价指标公式

来源:Internet,编辑:股旁网,2024-11-04

{指标介绍:
股价趋势的走向首先最快反应的是表现在MACD量柱的长短上,绿柱逐渐变短、红柱逐渐变长,趋势逐步走好、走强。
红柱逐渐变短,绿柱逐渐变长,趋势逐步走弱、走坏。
其次是反应在DIF的走向上,DIF拐头向上趋势走好,DIF拐头向下趋势走弱。
DIF向上金叉DEA趋势走强,DIF向下死叉DEA趋势走坏。
反推价格的节点,就能判断和预测股价趋势的走向:
1、如未达到柱体变向的价格,红柱就会变短,绿柱就会变长。反之绿柱变短、红柱变长。
2、如未达到DIF拐头价格,DIF向下时继续往下,DIF向上时拐头往下,反之DIF向下时拐头向上,DIF向上时继续向上。
3、如未达到金叉死叉价格时,不形成两线交叉,反之两线交叉,DIF从下往上交叉DEA时为金叉,DIF从上往下交叉DEA时为死叉。}

SHORT:=9;
LONG:=19;
M:=7;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,M);
macd:(DIF-DEA)*2,COLORSTICK;
X_1:=(M-1)/(M+1)*DEA/(1-2/(M+1));
X_2:=(MACD/2+DEA*(M-1)/(M+1))/(1-2/(M+1));
X_3:=(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(CLOSE,SHORT)+(SHORT+1)*(LONG-1)*EMA(CLOSE,LONG))/(2*(LONG+1-(SHORT+1)));
X_4:=(X_1*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(CLOSE,SHORT)+(SHORT+1)*(LONG-1)*EMA(CLOSE,LONG))/(2*(LONG+1-(SHORT+1)));
X_5:=(X_2*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(CLOSE,SHORT)+(SHORT+1)*(LONG-1)*EMA(CLOSE,LONG))/(2*(LONG+1-(SHORT+1)));
DRAWNUMBER_FIX(1,0.12,0.002,0,CONST(X_3)),COLORLIRED;
DRAWNUMBER_FIX(1,0.26,0.002,0,CONST(X_5)),COLORYELLOW;
DRAWNUMBER_FIX(1,0.4,0.002,0,CONST(X_4)),COLORFFDD44;

通达信MACD反推价指标公式

相关文章