{MACD回拉买点}
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<倍 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),COLORBLUE;
STICKLINE(H>=倍 AND C<倍,0,MACD,0.2,0),COLORWHITE;
DRAWTEXT(注=1 AND 涨停,0,'妖'),COLORGREEN,LINETHICK2;
STICKLINE(注=1 AND C>=MA(C,30),0,MACD,0.7,0),COLORRED;
WWW70822COM:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
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<0 AND DEA<0;
水上条件S:C>=金叉价*0.98 AND C>=MA(C,20) AND DIF>0 AND DEA>0 AND DIF>REF(DIF,1) AND DIF<=DEA;
水下条件S:C>=金叉价*0.98 AND C>=MA(C,20) AND DIF<0 AND DEA<0 AND DIF>REF(DIF,1) AND DIF<=DEA;
DRAWTEXT(水上条件=1,MACD,'上'),COLORRED;
DRAWTEXT(水上条件S=1,MACD,'上S'),COLORRED;
DRAWTEXT(水下条件=1,MACD,'下'),COLORRED;
DRAWTEXT(水下条件S=1,MACD,'下S'),COLORRED;
根据您提供的通达信公式,可以尝试将其转化为一个选股公式,以输出当天出现蓝色线柱的股票。下面是一个可能的转换:
选股条件:
CROSS(MACD, 0) AND STICKLINE(MACD>0, 0, MACD, 0.2, 0) = COLORBLUE
解释:
CROSS(MACD, 0):MACD指标上穿0轴,表示DIF线上穿DEA线,即产生买入信号。
STICKLINE(MACD>0, 0, MACD, 0.2, 0) = COLORBLUE:将MACD柱状图大于0的部分用蓝色柱子表示。
注意,这只是一种可能的转换方式,具体要根据您的需求和策略进行调整和优化。同时,需要注意的是,选股公式只是一种筛选股票的工具,不能保证股票的表现,投资需谨慎。