ma(C,9),LINETHICK2,COLORBLUE;
MA(C,21),LINETHICK2,COLORWHITE;
IF(MA(C,9)<REF(MA(C,9),1),MA(C,9),DRAWNULL),LINETHICK2,COLORYELLOW;
IF(MA(C,21)<REF(MA(C,21),1),MA(C,21),DRAWNULL),LINETHICK2,COLORCYAN;
VAR1:=((((HHV((((ema(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),4)<0) AND ((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2)>REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),3)));
DRAWTEXT(VAR1,L*0.98,'★短买'),COLORBLUE;
DRAWTEXT(crOSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*0.98,'★加仓'),COLORLIMAGENTA;