DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=(DIFF-DEA)*2;
DAYS:=IF(DIFF>DEA,BARSLAST(DIFF<DEA),BARSLAST(DIFF>DEA));
AREA0:=SUM(macd,DAYS);
AREAM1:=REF(AREA0,DAYS);
AREAM2:=REF(AREAM1,DAYS);
AREAM3:=REF(AREAM2,DAYS);
HPRE:=HHV(L,DAYS);
HPREM1:=REF(HPRE,DAYS);
HPREM2:=REF(HPREM1,DAYS);
HPREM3:=REF(HPREM2,DAYS);
LPRE:=LLV(L,DAYS);
LPREM1:=REF(LPRE,DAYS);
XG:AREAM1>AREAM3 AND HPREM1<HPREM3 AND REF(MACD,1)<0 AND MACD>0 ;
九毛八公式解读
DIFF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均 DEA赋值:DIFF的9日指数移动平均 MACD赋值:(DIFF-DEA)*2 DAYS赋值:如果DIFF>DEA,返回上次DIFFDEA距今天数 AREA0赋值:MACD的DAYS日累和 AREAM1赋值:DAYS日前的AREA0 AREAM2赋值:DAYS日前的AREAM1 AREAM3赋值:DAYS日前的AREAM2 HPRE赋值:DAYS日内最低价的最高值 HPREM1赋值:DAYS日前的HPRE HPREM2赋值:DAYS日前的HPREM1 HPREM3赋值:DAYS日前的HPREM2 LPRE赋值:DAYS日内最低价的最低值 LPREM1赋值:DAYS日前的LPRE 输出XG:AREAM1>AREAM3 AND HPREM1 0