通达信分时MACD主图源码主图

对分时MACD看盘指标进行了修改、完善。特别是以前有朋友反映对应板块涨跌家数不准,这次进行修复!同时增加次日涨跌停价格的显示,省去了计算,更加直观便捷。祝大家投资愉快!不喜欢的朋友可以飘过。

RCC:=DYNAINFO(3);

S2:=SMA(C,3,1);

S6:=SMA(C,5,1);

DK:=10*(S2-S6);

KK:=IF(PERIOD=8,0.95,1);

STICKLINE(DK>0,RCC*KK,RCC*KK+DK,0,1),COLORRED;

STICKLINE(DK<0,RCC*KK,RCC*KK+DK,0,1),COLORCYAN;

XG:HHV(H,480),DOTLINE,COLORRED;

STICKLINE(FILTER(CROSS(C,REF(XG,1)),10),C*0.99,C,8,0),COLORGREEN;

DRAWTEXT(FILTER(CROSS(C,REF(XG,1)),10),C*0.99,'上突'),COLORYELLOW;

T:=BARSCOUNT(C);{WWW.GOODGUPIAO.COM}

TP:= FILTER( C>=HHV(H,T) AND V>MA(V,0)*2 AND DYNAINFO(17)>1 AND TIME>39600,240) ;

DRAWTEXT(TP,L,'★突破'),COLORRED;

HHV(H,T),DOTLINE,COLOR00FFFF;

SUM(V*C,0)/SUM(V,0),COLORYELLOW;

上涨家数:"SZJS.上涨家数#DAY",NODRAW,COLORRED;

下跌家数:"SZJS.下跌家数#DAY",NODRAW,COLORGREEN;

GP:=NAMELIKE('S') OR NAMELIKE('*');

涨停:=IF(GP,REF(C,1)*1.05,REF(C,1)*1.1);

跌停:=IF(GP,REF(C,1)*0.95,REF(C,1)*0.9);

DRAWTEXT_FIX(1,0.92,1,1,STRCAT('涨停:',CON2STR(涨停,2))),COLORRED;

DRAWTEXT_FIX(1,0.98,1,1,STRCAT('跌停:',CON2STR(跌停,2))),COLORGREEN;

一纯%:=CONST(IF(PERIOD=0 ,"FSKY2.一纯%#DAY",DRAWNULL)),NODRAW;

三纯%:=CONST(IF(PERIOD=0 ,"FSKY2.三纯%#DAY",DRAWNULL)),NODRAW;

五纯%:=CONST(IF(PERIOD=0 ,"FSKY2.五纯%#DAY",DRAWNULL)),NODRAW;

DRAWTEXT_FIX(1,0.200,1-0.08,0,STRCAT('上涨家数:',CON2STR(上涨家数,0))),COLOR0000FF;

DRAWTEXT_FIX(1,0.600,1-0.08,0,STRCAT('下跌家数:',CON2STR(下跌家数,0))),COLOR00FF00;

分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;

K:=IF((分时均价线-DYNAINFO(3))/DYNAINFO(3)*100>0.5,0.5,0);

DRAWTEXT_FIX(五纯%>=0,0.6,1-0.9+K,0,STRCAT('五日纯量%: ',CON2STR(五纯%,2))),COLOR0000FF;

DRAWTEXT_FIX(五纯%<0,0.6,1-0.9+K,0,STRCAT('五日纯量%: ',CON2STR(五纯%,2))),COLORFFFF00;

DRAWTEXT_FIX(三纯%>=0,0.6,1-0.8+K,0,STRCAT('三日纯量%: ',CON2STR(三纯%,2))),COLOR0000FF;

DRAWTEXT_FIX(三纯%<0,0.6,1-0.8+K,0,STRCAT('三日纯量%: ',CON2STR(三纯%,2))),COLORFFFF00;

DRAWTEXT_FIX(一纯%>=0,0.6,1-0.7+K,0,STRCAT('当日纯量%: ',CON2STR(一纯%,2))),COLOR0000FF;

DRAWTEXT_FIX(一纯%<0,0.6,1-0.7+K,0,STRCAT('当日纯量%: ',CON2STR(一纯%,2))),COLORFFFF00;

AAA1:=STRCAT('沪深总上涨家数:',CON2STR(DYNAINFO(60),0));

AAA2:=STRCAT('沪深总下跌家数:',CON2STR(DYNAINFO(61),0));

DRAWTEXT_FIX(ISLASTBAR,0,0,0,AAA1),COLORRED;

DRAWTEXT_FIX(ISLASTBAR,0,0.06,0,AAA2),COLORGREEN;

 


 ==========================以上源码,缺少 FSKY2/szjs 两个引用指标没有,显示不正常

只能改为:

RCC:=DYNAINFO(3);

S2:=SMA(C,3,1);

S6:=SMA(C,5,1);

DK:=10*(S2-S6);

KK:=IF(PERIOD=8,0.95,1);

STICKLINE(DK>0,RCC*KK,RCC*KK+DK,0,1),COLORRED;

STICKLINE(DK<0,RCC*KK,RCC*KK+DK,0,1),COLORCYAN;

XG:HHV(H,480),DOTLINE,COLORRED;

STICKLINE(FILTER(CROSS(C,REF(XG,1)),10),C*0.99,C,8,0),COLORGREEN;

DRAWTEXT(FILTER(CROSS(C,REF(XG,1)),10),C*0.99,'上突'),COLORYELLOW;

T:=BARSCOUNT(C);{WWW.GOODGUPIAO.COM}

TP:= FILTER( C>=HHV(H,T) AND V>MA(V,0)*2 AND DYNAINFO(17)>1 AND TIME>39600,240) ;

DRAWTEXT(TP,L,'★突破'),COLORRED;

HHV(H,T),DOTLINE,COLOR00FFFF;

SUM(V*C,0)/SUM(V,0),COLORYELLOW;

GP:=NAMELIKE('S') OR NAMELIKE('*');

涨停:=IF(GP,REF(C,1)*1.05,REF(C,1)*1.1);

跌停:=IF(GP,REF(C,1)*0.95,REF(C,1)*0.9);

DRAWTEXT_FIX(1,0.92,1,1,STRCAT('涨停:',CON2STR(涨停,2))),COLORRED;

DRAWTEXT_FIX(1,0.98,1,1,STRCAT('跌停:',CON2STR(跌停,2))),COLORGREEN;

分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;

K:=IF((分时均价线-DYNAINFO(3))/DYNAINFO(3)*100>0.5,0.5,0);

AAA1:=STRCAT('沪深总上涨家数:',CON2STR(DYNAINFO(60),0));

AAA2:=STRCAT('沪深总下跌家数:',CON2STR(DYNAINFO(61),0));

DRAWTEXT_FIX(ISLASTBAR,0,0,0,AAA1),COLORRED;

DRAWTEXT_FIX(ISLASTBAR,0,0.06,0,AAA2),COLORGREEN;




未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图