N:=10;
M:=30;
A:=MA(CLOSE,N)+Abs(MA(CLOSE,N)-REF(MA(CLOSE,N),1));
B:=MA(CLOSE,M)+ABS(MA(CLOSE,M)-REF(MA(CLOSE,M),1));
分水岭1:=IF(MA(CLOSE,N)<A,A,MA(CLOSE,N));
分水岭2:=IF(MA(CLOSE,M)<B,B,MA(CLOSE,M))LINETHICK2;
操作线1:=分水岭1-(EMA(CLOSE,3)-分水岭1);
操作线2:=分水岭2-(EMA(CLOSE,3)-分水岭2);
DIF:=EMA(CLOSE,9)-EMA(CLOSE,12);
DEA:=EMA(DIF,9);
macd:=(DIF-DEA)*2;
DD:=MACD>0;
买入笑脸:=crOSS(分水岭1,操作线1) AND CLOSE>OPEN AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>1;
XG:买入笑脸 AND C>分水岭2;