股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信主力痕迹主图指标公式源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-6-24 12:31:06

{指标介绍: “钱袋子”信号表示主力流入痕迹,结合“主力值”数据一起使用,比如“主力值”值显示红色且数值大于等于2时,涨停的概率也较大。}

DRAWTEXT_FIX(1,0.00,0.00,0,STRCAT(STRCAT(STRCAT(STRCAT(HYBLOCK,'__'),GNBLOCK),'__'),DYBLOCK)),COLORLIBLUE; ABC股:=NAMEINCLUDE('ST'); 涨停倍率:=IF(FINANCE(3)=2,0.3,IF(FINANCE(3)=3 OR FINANCE(3)=4 OR FINANCE(3)=6,0.2,0.1)); 涨停价:=ZTPRICE(REF(CLOSE,1),IF(ABC股,0.05,涨停倍率)); 跌停价:=DTPRICE(REF(CLOSE,1),IF(ABC股,0.05,涨停倍率)); AT:=REF(C,BARSLAST(DAY!=REF(DAY,1))); AT1:=DYNAINFO(4); AT2:=AT-AT1; D:=DYNAINFO(20); SPEED:=AT2/AT1*100; VAR16:=STRCAT('【主力值】',CON2STR(SPEED,2)); DRAWTEXT_FIX(ISLASTBAR AND SPEED< 2 AND SPEED>0.432,0.38,0.85,0,VAR16),COLOR00FFFF; DRAWTEXT_FIX(ISLASTBAR AND SPEED>=2.0,0.38,0.85,0,VAR16),COLOR0000FF; ABC1:=BARSLAST(DATE!=REF(DATE,1)); ABC2:=DYNAINFO(3); ABC3:=(CLOSE/ABC2-1)*100; ABC4:=crOSS(ABC3,5) OR CROSS(ABC3,7) OR CROSS(ABC3,9); 指标:=HHVBARS(CLOSE,ABC1)=0 AND ABC4; DRAWICON(指标,CLOSE,38); 正偏差:=IF(NAMELIKE('ST') OR NAMELIKE('*'),4.8,IF(FINANCE(3)=2,28.8,IF(FINANCE(3)=3 OR FINANCE(3)=4 OR FINANCE(3)=6,19.2,9.6))); 负偏差:=IF(NAMELIKE('ST') OR NAMELIKE('*'),-4.8,IF(FINANCE(3)=2,-28.8,IF(FINANCE(3)=3 OR FINANCE(3)=4 OR FINANCE(3)=6,-19.2,-9.6))); ABCA:=IF(ABC股,1.0432,IF(FINANCE(3)=2,1.2592,IF((FINANCE(3)=3 OR FINANCE(3)=4 OR FINANCE(3)=6),1.1728,1.0864))); ABCB:=IF(ABC股,1.0216,IF(FINANCE(3)=2,1.1296,IF((FINANCE(3)=3 OR FINANCE(3)=4 OR FINANCE(3)=6),1.0864,1.0432))); ABCC:=IF(ABC股,0.9784,IF(FINANCE(3)=2,0.8704,IF((FINANCE(3)=3 OR FINANCE(3)=4 OR FINANCE(3)=6),0.9136,0.9568))); ABCD:=IF(ABC股,0.9568,IF(FINANCE(3)=2,0.7048,IF((FINANCE(3)=3 OR FINANCE(3)=4 OR FINANCE(3)=6),0.8272,0.9136))); 现价:=CLOSE; 均价:=SUM(CLOSE*vol,240)/SUM(VOL,240); 量价齐升:=HHV(V,0)>REF(EMA(HHV(V,0),5),1) AND CLOSE>REF(EMA(CLOSE,7),1); EMA7:EMA(CLOSE,7),COLORRED,DOTLINE; ABC05:IF(EMA7< REF(EMA7,1) AND CLOSE<=EMA7,EMA7,DRAWNULL),COLORFFA800; ABC06:IF(HHV(V,0)>REF(EMA(HHV(V,0),5),1) AND CLOSE>REF(EMA(CLOSE,7),1) AND BETWEEN(TIME,0930,1030),EMA7,DRAWNULL),COLORMAGENTA,LINETHICK2; ABC07:IF(HHV(V,0)>REF(EMA(HHV(V,0),5),1) AND CLOSE>REF(EMA(CLOSE,7),1) AND BETWEEN(TIME,1030,1130),EMA7,DRAWNULL),COLORRED,LINETHICK2; EMA2:=EMA(CLOSE,26); SWS:=DMA(EMA(CLOSE,26),MAX(1,100*(SUM(VOL,5)/(3*CAPITAL)))); EMA26:IF(CODELIKE('11') OR CODELIKE('12'),EMA2,SWS),COLORGREEN,DOTLINE; DRAWTEXT(ISLASTBAR,EMA26*1.005,VARCAT(VAR2STR(EMA26,2),'←支撑')),COLORGREEN; ABC08:IF(EMA26< REF(EMA26,1) AND CLOSE<=EMA26,EMA26,DRAWNULL),COLOR9B6C00; 支撑有效:BARSLASTCOUNT(EMA26>=REF(EMA26,1))>=2 AND CLOSE>EMA26 AND 均价>=REF(均价,1),COLORYELLOW,NODRAW; 突破有效:EMA26>=REF(EMA26,1) AND EMA7>=REF(EMA7,1) AND CLOSE>=MAX(EMA7,EMA26) AND 均价>=REF(均价,1) AND 量价齐升,COLORRED,NODRAW; DRAWICON(FILTER(CROSS(支撑有效,0.5),7),EMA26,42); DRAWICON(FILTER(CROSS(突破有效,0.5),7),EMA7,1); 管住手:(EMA7< REF(EMA7,1) AND CLOSE<=EMA7) OR (EMA26< REF(EMA26,1) AND CLOSE<=EMA26),COLORFF8000,NODRAW; VAR1:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE)); 主力:=expma(CLOSE/VAR1,20); 大户:=EXPMA(CLOSE/VAR1,60); 散户:=EXPMA(CLOSE/VAR1,120); 主力来了:=主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003); DRAWICON(主力来了,C,9); DRAWTEXT(主力来了,C,'←主力'),COLORYELLOW; DIF12:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA12:=EMA(DIF12,9); macd12:=(DIF12-DEA12)*2; AA0:=MACD12>00 AND DIF12>0 AND DEA12>0; NX:=MA(((SLOPE(C,20)*5)+C),10); A100:=HOUR=10 AND MINUTE=0; A20:=HHV(H,30); A30:=BARSLAST(A100); A40:=REF(A20,A30); A50:=CONST(A40); A80:=CLOSE>A50 AND REF(C<=A50,1) AND CLOSE>NX; AB:=FILTER(A80,100); A90:=DYNAINFO(3); AC:=CLOSE<=A90*1.04 AND CLOSE>A90; 量比:=V/REF(MA(V,5),1); 捉牛:=AA0 AND AB AND AC AND A40>A90 AND 量比>=1; DRAWICON(捉牛,A50,38); DRAWTEXT(捉牛,C*0.998,'←牛'),COLORMAGENTA;








回复

举报

QQ|

GMT+8, 2024-11-16 17:53

快速回复 返回顶部 返回列表