{红面积MACD}
DRAWGBK(C>0, RGB(40,120,20),RGB(00,00,00),0,0,1),LINETHICK2;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
红面积:SUM(MACD,BARSLAST(MACD<0))*(MACD>0),COLOR0000FF,NODRAW;
绿面积:SUM(MACD,BARSLAST(MACD>0))*(MACD<0),COLORFFFF00,NODRAW;
AA:=ROUND(REF(绿面积,1)*100);
BB:=ROUND(REF(红面积,1)*100);
0,COLORF00FF0,LINETHICK2;
-0.40,COLORF00FF0,LINETHICK2;
DRAWNUMBER(CROSS(0,MACD),HHV(REF(MACD,1),5)+0.03,ABS(BB)),COLORMAGENTA;
DRAWNUMBER(CROSS(MACD,0),LLV(REF(MACD,1),5)-0.03,ABS(AA)),COLORGREEN;
TRLSX1:= MAX(MAX((HHV(DIF,13)-LLV(DIF,13)),ABS(REF(DIF,1)-HHV
(DIF,13))),ABS(REF(DIF,1)-LLV(DIF,13)));
TRLSX2:=EMA(TRLSX1,13);
TRLSX3:=REF(DIF,1)-REF(TRLSX2,1);
DRAWBAND(DIF,RGB(200,50,55),DEA,RGB(50,100,10));
MACDXG2:=REF(COUNT(DIF>0 AND MACD<0 AND MACD
MACD>REF(MACD,1);
STICKLINE(MACDXG2,MACD*1.2,0,2.8,0),COLORFF00FF;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.8,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.6,0),COLOR0000BB;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1.8,0),COLOR888888;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLORBBBBBB;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0.6,0),COLORDDDDDD;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.8,0),COLOR3377AA;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.1,0),COLOR3388BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.6,0),COLOR4499CC;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.8,0),COLORFF3300;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.1,0),COLORFF5500;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0.6,0),COLORFF7700;
DRAWICON(CROSS(DIF,0),DIF,1);
DRAWICON(CROSS(DIF,-0.40),DIF,1);
DRAWICON(CROSS(MACD,0),MACD,1);
{红面积MACD 条件选股预警公式
不追高不被套,买在刚刚启动点 }
零:=0,COLORF00FF0,LINETHICK2;
MACD1:="MACD.MACD">零 AND "MACD.MACD#WEEK">零 AND "MACD.MACD#MONTH">零;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
红面积:=SUM(MACD,BARSLAST(MACD<0))*(MACD>0);
绿面积:=SUM(MACD,BARSLAST(MACD>0))*(MACD<0);
AA:=ROUND(REF(绿面积,1)*100);
BB:=ROUND(REF(红面积,1)*100);
零下:=-0.40,COLORF00FF0,LINETHICK2;
股价:=C>=5.20 AND C<22.9;
流通盘:=CAPITAL/1000000<=5.15 ;
D11:=IF(CODELIKE('300'),0,1);
{创业板 }
D22:=IF(NAMELIKE('S'),0,1);
D33:=IF(NAMELIKE('*'),0,1);
{去掉停牌}
D44:=DYNAINFO(17)>0;
{5日均线比10日均线高}
KK:=MA(C,5) >MA(C,10) AND MA(C,5)>REF(MA(C,5),1);
{委买大于委卖}
E:=DYNAINFO(23)-DYNAINFO(22);
{昨天成交量比前天多}
F:=REF(V,1)-REF(V,2);
条件:= KK AND E ;
开盘小于6:=O/REF(C,1)<1.06;
去掉:=D11 AND D22 AND D33 AND D44;
量比:= DYNAINFO(17)>=1.51;
换手率:=V/CAPITAL*100; 涨幅限制:=C/REF(C,1)<=1.070;
五日倾角:=ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14159>58;
上升倾角:=ATAN((MA(C,13)/REF(MA(C,13),1)-1)*100)*180/3.14159>45;
DIF>=零下 AND MACD>=零下AND DIF>=零 AND MACD>=零
AND CLOSE>OPEN AND C>O AND C/REF(C,1)>=1.020 AND MACD1
AND 股价 AND 涨幅限制 AND 五日倾角 AND DYNAINFO(23)-DYNAINFO(22)
AND CAPITAL/1000000<=5.15 AND 去掉 AND 上升倾角
AND 量比 AND 换手率>=5.3 AND 换手率<=15.0 AND 开盘小于6;