DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=(DIFF-DEA)*2;
DAYS:=IF(DIFF>DEA,BARSLAST(DIFFDEA));
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 HPREM10 ;
DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW. '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'交易策略'),COLORRED;