DIFF:=EMA(CLOSE,3)-EMA(CLOSE,15); DEA:=EMA(DIFF,9); MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2; 中:0,LINETHICK1,COLORRED; VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1); VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5); VA2R:=CONST(BARSLAST(VA2)+1); QG:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5); 前高:DRAWLINE(VA2 AND CURRBARSCOUNT<=VA2R,MACD,REF(VA2,1),REF(MACD,1),1),COLORMAGENTA,LINETHICK3; VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1); VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),0.5); VA4R:=CONST(BARSLAST(VA4)+1); BD:=BARSLAST(FILTERX(CROSS(0,MACD),BARSCOUNT(C))); 前低:DRAWLINE(VA4 AND CURRBARSCOUNT<=VA4R,MACD,REF(VA4,1),REF(MACD,1),1),COLORCYAN,LINETHICK3; E:=(HIGH+LOW+OPEN+2*CLOSE)/5; 明日阻力:=2*E-LOW; 明日支撐:=2*E-HIGH; 明日突破:=E+(HIGH-LOW); 明日反轉(zhuǎn):=E-(HIGH-LOW); 今日阻力:=REF(明日阻力 , 1); 今日支撐:=REF(明日支撐 , 1); DRAWTEXT_FIX(C!=0,0.8,0.18,0,STRCAT('支撐:',STRCAT(CON2STR(明日支撐,2),' 元'))),COLORRED; DRAWTEXT_FIX(C!=0,0.8,0.28,0,STRCAT('反轉(zhuǎn):',STRCAT(CON2STR(明日反轉(zhuǎn),2),' 元'))),COLORYELLOW; X1:=IF(MA(C,5)>MA(C,10),20,0); X2:=IF(MA(C,20)>MA(C,60),10,0); X3:=IF(KDJ.J>KDJ.K,10,0); X4:=IF(MACD.DIF>MACD.DEA,10,0); X5:=IF(MACD.MACD>0,10,0); X6:=IF(V>MA(V,60),10,0); X7:=IF(WINNER(C)>0.5,10,0); X8:=IF(C/REF(C,1)>1.03,10,0); XX:=X1+X2+X3+X4+X5+X6+X7+X8; DRAWTEXT_FIX(V>O,0.8,0.080,0,STRCAT('均線量化評分:',STRCAT(CON2STR(XX,2),' '))),COLORFFFFFF; DRAWTEXT(ISLASTBAR,DRAWLINE(VA4 AND CURRBARSCOUNT<=VA4R,MACD,REF(VA4,1),REF(MACD,1),1),STRCAT(' 前低:',CON2STR(DRAWLINE(VA4 AND CURRBARSCOUNT<=VA4R,MACD,REF(VA4,1),REF(MACD,1),1),2))),COLORCYAN; DRAWTEXT(ISLASTBAR,DRAWLINE(VA2 AND CURRBARSCOUNT<=VA2R,MACD,REF(VA2,1),REF(MACD,1),1),STRCAT(' 前高:',CON2STR(DRAWLINE(VA2 AND CURRBARSCOUNT<=VA2R,MACD,REF(VA2,1),REF(MACD,1),1),2))),COLORMAGENTA; |
|