通达信,自用区间,统计,阳阴线条数,涨跌天数,红绿量比,换手和,指标公式
通达信是有区间统计的,不过每次都要去弄很麻烦,所以做了个指标
可以直接把代码附加大主图指标代码后面。
默认统计今天之前50天内数据。依次为50天内阳线条数、阴线条数、上涨天数、下跌天数、红色成交量柱和:绿色成交量柱和、区间换手率
实际应用中挑选红肥绿瘦的股票,阳线条数>30,上涨天数>30,此类股票走势比较强,可以关注
{N:=50}
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.01,0.01,0,'阳线-----阴线-----上涨-----下跌----阳阴量比--换手和'),COLORYELLOW;
阳线:=COUNT(REF(C,1)>REF(O,1),N);
阴线:=COUNT(REF(C,1)<REF(O,1),N);
上涨:=COUNT(REF(C,1)>REF(C,2),N);
下跌:=COUNT(REF(C,1)<REF(C,2),N);
阳量和:=SUM(IF(REF(C,1)>REF(O,1),REF(V,1),0),N);
阴量和:=SUM(IF(REF(C,1)<REF(O,1),REF(V,1),0),N);
换手和:=100*(阳量和+阴量和)/(FINANCE(7)/100);
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.01,0.05,0,阳线),COLORRED;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.05,0.05,0,阴线),COLORRED;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.09,0.05,0,上涨),COLORRED;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.13,0.05,0,下跌),COLORRED;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.17,0.05,0,阳量和/阴量和),COLORRED;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.22,0.05,0,换手和),COLORRED;