通达信反向MACD和RSI指标公式
现提出反向MACD和反向RSI,有利于从空头角度看待市场。高手忽略。
{反向MACD}
LONG:=26;SHORT:=12;MID:=9;
DIF:EMA(-CLOSE,SHORT)-EMA(-CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
{反向RSI}
N1:=6;N2:=12;N3:=24;
LC:=REF(-CLOSE,1);
RSI1:SMA(MAX(-CLOSE-LC,0),N1,1)/SMA(ABS(-CLOSE-LC),N1,1)*100;
RSI2:SMA(MAX(-CLOSE-LC,0),N2,1)/SMA(ABS(-CLOSE-LC),N2,1)*100;
RSI3:SMA(MAX(-CLOSE-LC,0),N3,1)/SMA(ABS(-CLOSE-LC),N3,1)*100;