DIF:EMA(CLOSE,12)-EMA(CLOSE,26) COLORRED;
DEA:EMA(DIF,9) COLORGREEN;
MACD:(DIF-DEA)*2,COLORSTICK;
買線1:=LLV(MA(((C+L+O+H)/4),10),5);
賣線:=HHV(MA(((C+L+O+H)/4),5),5);
倍:=(賣線+買線1)/2;
漲停價:=ZTPRICE(REF(C,1),0.1) NODRAW;
跌停價:=DTPRICE(REF(C,1),0.1) NODRAW;
注:=CROSS(C,倍) NODRAW;
試:=H>=倍 AND C=O OR C>=REF(CLOSE,1)) NODRAW;
價:(賣線+買線1)/2 NODRAW;
漲停:=CLOSE/REF(CLOSE,1)>=1.095;
STICKLINE(注=1,0,MACD,0.2,0),COLORYELLOW;
STICKLINE(H>=倍 AND C
DRAWTEXT(注=1 AND 漲停,0,'妖'),COLORGREEN,LINETHICK2;
STICKLINE(注=1 AND C>=MA(C,30),0,MACD,0.7,0),COLORRED;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
A11:=BARSLAST(REF(CROSS(DIF,DEA),1));
金叉價:=REF(C,BARSLAST(CROSS(DIF,DEA)));
金叉量:=REF(V,BARSLAST(CROSS(DIF,DEA)));
水上條件:C>=金叉價*0.98 AND 注=1 AND C>=MA(C,20) AND DIF>0 AND DEA>0;
水下條件:C>=金叉價*0.98 AND 注=1 AND C>=MA(C,20) AND DIF
水上條件S:C>=金叉價*0.98 AND C>=MA(C,20) AND DIF>0 AND DEA>0 AND DIF>REF(DIF,1) AND DIF
水下條件S:C>=金叉價*0.98 AND C>=MA(C,20) AND DIF
DRAWTEXT(水上條件=1,MACD,'上'),COLORRED;
DRAWTEXT(水上條件S=1,MACD,'上S'),COLORRED;
DRAWTEXT(水下條件=1,MACD,'下'),COLORRED;
DRAWTEXT(水下條件S=1,MACD,'下S'),COLORRED;