通达信双底背离副图指标原码
信号出现后买入,因为是见底信号。
DIF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
QZQ:=BARSLAST(REF(MACD,1) 0 AND MACD
QM:=LLVBARS(MACD,QZQ+20);
MQDZ:=IF(QM QZQ,REF(MACD,QM),0);
QF:=LLVBARS(DIF,QZQ+20);
DQDZ:=IF(QF QZQ,REF(DIF,QF),0);
XG1:=MACD 0 AND MACD MQDZ AND DIF 0 AND DIF DQDZ AND C=LLV(C,QZQ+20) AND MQDZ 0 AND DQDZ
XG:REF(XG1,1)=1 AND MACD REF(MACD,1);
S05:=SUM(MACD,0);
QST:=BARSLAST(MACD 0 AND REF(MACD,1) 0)+1;
QXT:=BARSLAST(MACD 0 AND REF(MACD,1) 0)+1;
S5:=IF(MACD 0,S05-REF(S05,BARSLAST(MACD 0)),S05-REF(S05,BARSLAST(MACD 0)))/10;
ST:=IF(MACD 0,REF(QST,QXT)+QXT,REF(QXT,QST)+QST);
RS5:=REF(S5,ST);
BC:IF(MACD 0 AND S5 RS5,0,IF(MACD 0 AND S5 RS5 AND DEA 0,1,0));