请老师帮忙写个预警公式,谢谢!
发布网友
发布时间:2024-10-18 11:19
我来回答
共1个回答
热心网友
时间:2024-11-19 11:56
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
KX:=BARSSINCE(CLOSE);
HHN:=CONST(HHV(DIFF,KX));
HLN:=CONST(LLV(DEA,KX));
RC1:=CONST((HHN+HLN)/2);
SS:=((HHN-HLN)/200);
MACD底部:=(-100*SS+RC1)+-(-100*SS+RC1);
MACD顶部:=(100*SS+RC1)+-(-100*SS+RC1);
MACD中轴:=0+-(-100*SS+RC1);
DIFF修正:=DIFF+-(-100*SS+RC1);
DEA修正:=DEA+-(-100*SS+RC1);
MACD修正:=2*(DIFF修正-DEA修正)+MACD中轴;
MACD超跌:=CONST(LLV(MACD修正,KX));
MACD超跌线:=IF(MACD超跌<MACD底部,MACD超跌,MACD底部);
中轴:=MACD中轴+-MACD超跌线;
顶部:=MACD顶部+-MACD超跌线;
RSVA:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*顶部;
K:=SMA(RSVA,3,1);
CROSS(K,中轴);