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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信多空趋势A副图指标


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

以下是通达信多空趋势A副图指标

通达信多空趋势A副图指标

源码

VAR1:=EMA(MA(IF(C>O,(C-O)*V,IF(C<O,(C-O)*V,0)),5),1);
VAR2:=EMA(MA(IF(C>REF(C,1),(C-REF(C,1))*V,IF(C<REF(C,1),(C-REF(C,1))*V,0)),5),1);
VAR3:=EMA(MA(IF(O>REF(C,1),(O-REF(C,1))*V,IF(O<REF(C,1),(O-REF(C,1))*V,0)),5),1);
VAR4:=EMA(MA(IF(C<O,(O-C)*V,IF(C>O,(O-C)*V,0)),10),1);
VAR5:=EMA(MA(IF(C<REF(C,1),(REF(C,1)-C)*V,IF(C>REF(C,1),(REF(C,1)-C)*V,0)),10),1);
VAR6:=EMA(MA(IF(O<REF(C,1),(REF(C,1)-O)*V,IF(O>REF(C,1),(REF(C,1)-O)*VOL,0)),10),1);
VAR7:=C>O;
VAR8:=C>REF(C,1);
VAR9:=O>REF(C,1);
多头:(VAR1+VAR2+VAR3)/3/100,COLORWHITE;
空头:(VAR4+VAR5+VAR6)/3/100,COLORYELLOW ;
一次警报:EMA(EMA((VAR1+VAR2+VAR3)/3-(VAR4+VAR5+VAR6)/3,5),5)*1/100,COLORMAGENTA;
二次警报:EMA((COUNT(VAR8,12)/12+COUNT(VAR7,12)/12+COUNT(VAR9,12)/12)/3*MA(多头,5)*2*1.1,2),COLORGREEN;
STICKLINE(空头>0,0,空头,1,0),COLORCYAN;
STICKLINE(空头<0,0,空头,1,0),COLORRED;
X1:=EMA(EMA((VAR1+VAR2+VAR3)/3-(VAR4+VAR5+VAR6)/3,5),5)*1/100;
X2:=EMA((COUNT(VAR8,12)/12+COUNT(VAR7,12)/12+COUNT(VAR9,12)/12)/5*MA(多头,5.3)*2*6.8,5);
X3:=EMA((COUNT(VAR8,22)/22+COUNT(VAR7,22)/22+COUNT(VAR9,22)/22)/18*MA(多头,8)*5*1.8,5);
DRAWTEXT(CROSS(X1,0),0,'★'),COLORFF9999,LINETHICK2;
DRAWTEXT(CROSS(X2,0),0,'★'),COLORFF99FF,LINETHICK2;
DRAWTEXT(CROSS(X3,0),0,'★<'),COLORGREEN,LINETHICK2;





回复

举报

QQ|

GMT+8, 2024-11-17 08:40

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