通达信五域主图指标公式源码

 

YF_DDI:=(AMOUNT / vol);
YF_JJ:=((OPEN + CLOSE) / 2);
YF_DDING:=EMA(CLOSE,6);
YF_MMD:=MA(YF_DDING,1);
YF_XXD:=EMA(CLOSE,18);
YF_YYZ:=REF(YF_MMD,1);
YF_XXD1:=REF(YF_XXD,1);
YF_YYZ1:=BARSCOUNT(CLOSE);
YF_TDCG:=IF((YF_YYZ1 = 1),0,(((YF_MMD - YF_YYZ) / YF_YYZ) * 100));
YF_ZFD:=IF((YF_YYZ1 = 1),0,(((YF_XXD - YF_XXD1) / YF_XXD1) * 100));
YF_JSD2:=REF(CLOSE,1);
CLOSE1:=IF((YF_YYZ1 = 1),0,(((CLOSE - YF_JSD2) / YF_JSD2) * 100));
YF_JZDF:=IF((YF_YYZ1 = 1),((CLOSE + OPEN) / 2),YF_YYZ);
YF_DCGJ:=YF_MMD;
JJ0:=YF_YYZ;
JJ1:=REF(YF_MMD,2);
JJ2:=(((YF_DCGJ + JJ0) + JJ1) / 3);
JJ02:=(((Abs((YF_DCGJ - JJ2)) + ABS((JJ0 - JJ2))) + ABS((JJ1 - JJ2))) / 3);
SS:=REF(YF_TDCG,1);
YF_ZFD1:=REF(YF_TDCG,2);
YF_ZFD2:=IF((YF_YYZ1 < 3),0,((JJ02 / YF_DCGJ) * 100));
YF_DHPXS:=IF((YF_YYZ1 < 3),0,IF((((YF_TDCG < 0) AND (SS < 0)) AND (YF_ZFD1 < 0)),(0 - 1),1));
SS1:=REF(YF_TDCG,1);
YF_YZFZ:=IF((((YF_YYZ1 > 11) AND (SS1 < 0)) AND (YF_TDCG > 0)),1,0);
YF_JSD21:=BARSLAST((YF_YZFZ = 1));
YF_JSD:=REF(YF_JSD21,1);
AA:=IF((((YF_YYZ1 > 11) AND (SS < 0)) AND (YF_TDCG > 0)),(YF_JSD + 1),YF_JSD);
YF_PJJ:=IF((((YF_YYZ1 > 11) AND (SS > 0)) AND (YF_TDCG < 0)),1,0);
YF_JSD11:=YF_JZDF;
DMRJ:=YF_JZDF;
DMCJ:=IF(((YF_YYZ1 > 11) AND (YF_JSD11 < OPEN)),OPEN,YF_JZDF);
YF_DMRJ:=IF(((YF_YYZ1 > 11) AND (DMRJ > OPEN)),OPEN,YF_JZDF);
YF_DMCJ:=0;
YF_DCG1:=REF(YF_JZDF,1);
YF_BDF5:=IF(((((YF_TDCG > 0.5) AND ((YF_ZFD2 > 0.215) OR (LOW > YF_JZDF))) AND (CLOSE >= OPEN)) AND ((CLOSE >= 200) OR ((CLOSE < 200) AND (CLOSE1 < 11)))),1,0);
YF_DMR1:=IF((((YF_TDCG < (0 - 0.3)) AND ((YF_ZFD2 > 0.2) OR (HIGH < YF_JZDF))) AND ((OPEN >= CLOSE) OR (CLOSE1 < (0 - 1)))),1,0);
YF_DKS1:=BARSSINCE(YF_BDF5);
YF_TDMR:=BARSSINCE(YF_DMR1);
YF_DMR:=(YF_DMR1 );
YF_DCGJ1:=((COUNT(YF_BDF5,BARSLAST(YF_DMR)) = 1) AND YF_BDF5);
YF_DMRBUY:=((COUNT(YF_DMR,BARSLAST(YF_BDF5)) = 1) AND YF_DMR);
YF_DMCSELL:=BARSLAST(YF_DMRBUY);
YF_DCG10:=BARSLAST(YF_DCGJ1);
YF_DCG11:=((SUM(YF_DMRBUY,YF_DCG10) = 0) * YF_DCG10);
YF_DCGREAL:=REF(DMCJ,YF_DCG11);
YF_DMRJ11:=REF(YF_DCGREAL,1);
YF_DMRJ1:=IF((YF_DCGJ1 = 1),(((CLOSE - DMCJ) / DMCJ) * 100),(((YF_DMRJ - YF_DMRJ11) / YF_DMRJ11) * 100));
YF_DCG:=IF((((YF_DCG11 = 0) AND (YF_DCGJ1 = 0)) AND (YF_DMRBUY = 0)),0,YF_DMRJ1);
短买入:=YF_DCGJ1;
短买入C:IF(短买入,C,0),NODRAW;
短卖出:=YF_DMRBUY;
短卖出C:IF(短卖出,C,0),NODRAW;
短持股:YF_DCG11,NODRAW;
短持股1:=YF_DCG;
短本次收益:=IF((短买入 = 1),YF_DCGREAL,IF(((短持股 != 0) OR (短卖出 = 1)),YF_DMRJ11,0));
短买价:=IF((短卖出 = 1),YF_DMRJ,0);
STICKLINE((短买入=1),O,C,2,0),LINETHICK1,COLORFFFFFF;
STICKLINE((短卖出=1),O,C,2,0),LINETHICK1,COLORFF0000;
DRAWICON((短买入=1),LOW,1);
DRAWICON((短卖出=1),HIGH,2);
短操盘状态:IF((短买入 = 1),1,IF((短持股 > 0),2,IF((短卖出 = 1),9,0))),NODRAW;
明日空间买卖点:EMA(CLOSE,6),NODRAW;
五域股龄:BARSCOUNT(CLOSE),NODRAW;
短买入2:YF_DCGJ1,NODRAW;
短卖出2:YF_DMRBUY,NODRAW;
短持股2:YF_DCG11,NODRAW;
本次收益2:YF_DCG,NODRAW;
短买价2:IF((短买入2 = 1),YF_DCGREAL,IF(((短持股2 != 0) OR (短卖出2 = 1)),YF_DMRJ11,0)),NODRAW;
短卖价2:IF((短卖出2 = 1),YF_DMRJ,0),NODRAW;
YF_MAXDSY2:=COUNT(((YF_DMR = 1) AND (YF_DCG != 0)),0);
YF_DCSLY2:=IF((YF_DMR = 1),YF_DCG,0);
总收益:(SUM(YF_DCSLY2,0) - YF_MAXDSY2),NODRAW;
总次数:YF_MAXDSY2,NODRAW;
总次数1:=IF((YF_YYZ1 < 240),YF_YYZ1,240);
年收益:((SUM(YF_DCSLY2,0) - YF_MAXDSY2) - REF((SUM(YF_DCSLY2,0) - YF_MAXDSY2),总次数1)),NODRAW;
年次数:(COUNT(((YF_DMR = 1) AND (YF_DCG != 0)),0) - REF(COUNT(((YF_DMR = 1) AND (YF_DCG != 0)),0),总次数1)),NODRAW;
短操盘状态1:IF((短买入2>=1),1,IF((短持股2>0),2,IF((短卖出2>=1),9,0))),NODRAW;
明日买卖点1:EMA(CLOSE,6),NODRAW;




来函数检测结果如下
该公式没有未来函数


解密、定制、编写公式指标请联系QQ或微信同号:88652583
置顶指标

相关指标公式

YF_DDI赋值:(成交额(元) / 成交量(手))
YF_JJ赋值:((开盘价 + 收盘价) / 2)
YF_DDING赋值:收盘价的6日指数移动平均
YF_MMD赋值:YF_DDING的1日简单移动平均
YF_XXD赋值:收盘价的18日指数移动平均
YF_YYZ赋值:1日前的YF_MMD
YF_XXD1赋值:1日前的YF_XXD
YF_YYZ1赋值:收盘价的有效数据周期数
YF_TDCG赋值:如果(YF_YYZ1=1),返回0,否则返回(((YF_MMD-YF_YYZ)/YF_YYZ)*100)
YF_ZFD赋值:如果(YF_YYZ1=1),返回0,否则返回(((YF_XXD-YF_XXD1)/YF_XXD1)*100)
YF_JSD2赋值:1日前的收盘价
CLOSE1赋值:如果(YF_YYZ1=1),返回0,否则返回(((收盘价-YF_JSD2)/YF_JSD2)*100)
YF_JZDF赋值:如果(YF_YYZ1=1),返回((收盘价+开盘价)/2),否则返回YF_YYZ
YF_DCGJ赋值:YF_MMD
JJ0赋值:YF_YYZ
JJ1赋值:2日前的YF_MMD
JJ2赋值:(((YF_DCGJ + JJ0) + JJ1) / 3)
JJ02赋值:((((YF_DCGJ-JJ2)的绝对值 + (JJ0-JJ2)的绝对值) + (JJ1-JJ2)的绝对值) / 3)
SS赋值:1日前的YF_TDCG
YF_ZFD1赋值:2日前的YF_TDCG
YF_ZFD2赋值:如果(YF_YYZ1<3),返回0,否则返回((JJ02/YF_DCGJ)*100)
YF_DHPXS赋值:如果(YF_YYZ1<3),返回0,否则返回如果(((YF_TDCG<0)AND(SS<0))AND(YF_ZFD1<0)),返回(0-1),否则返回1
SS1赋值:1日前的YF_TDCG
YF_YZFZ赋值:如果(((YF_YYZ1>11)AND(SS1<0))AND(YF_TDCG>0)),返回1,否则返回0
YF_JSD21赋值:上次(YF_YZFZ=1)距今天数
YF_JSD赋值:1日前的YF_JSD21
AA赋值:如果(((YF_YYZ1>11)AND(SS<0))AND(YF_TDCG>0)),返回(YF_JSD+1),否则返回YF_JSD
YF_PJJ赋值:如果(((YF_YYZ1>11)AND(SS>0))AND(YF_TDCG<0)),返回1,否则返回0
YF_JSD11赋值:YF_JZDF
DMRJ赋值:YF_JZDF
DMCJ赋值:如果((YF_YYZ1>11)AND(YF_JSD11<开盘价)),返回开盘价,否则返回YF_JZDF
YF_DMRJ赋值:如果((YF_YYZ1>11)AND(DMRJ>开盘价)),返回开盘价,否则返回YF_JZDF
YF_DMCJ赋值:0
YF_DCG1赋值:1日前的YF_JZDF
YF_BDF5赋值:如果((((YF_TDCG>0.5)AND((YF_ZFD2>0.215)OR(最低价>YF_JZDF)))AND(收盘价>=开盘价))AND((收盘价>=200)OR((收盘价<200)AND(CLOSE1<11)))),返回1,否则返回0
YF_DMR1赋值:如果(((YF_TDCG<(0-0.3))AND((YF_ZFD2>0.2)OR(最高价=收盘价)OR(CLOSE1<(0-1)))),返回1,否则返回0
YF_DKS1赋值:首次YF_BDF5距今天数
YF_TDMR赋值:首次YF_DMR1距今天数
YF_DMR赋值:(YF_DMR1 )
YF_DCGJ1赋值:((统计上次YF_DMR距今天数日中满足YF_BDF5的天数 = 1) AND YF_BDF5)
YF_DMRBUY赋值:((统计上次YF_BDF5距今天数日中满足YF_DMR的天数 = 1) AND YF_DMR)
YF_DMCSELL赋值:上次YF_DMRBUY距今天数
YF_DCG10赋值:上次YF_DCGJ1距今天数
YF_DCG11赋值:((YF_DMRBUY的YF_DCG10日累和 = 0) * YF_DCG10)
YF_DCGREAL赋值:YF_DCG11日前的DMCJ
YF_DMRJ11赋值:1日前的YF_DCGREAL
YF_DMRJ1赋值:如果(YF_DCGJ1=1),返回(((收盘价-DMCJ)/DMCJ)*100),否则返回(((YF_DMRJ-YF_DMRJ11)/YF_DMRJ11)*100)
YF_DCG赋值:如果(((YF_DCG11=0)AND(YF_DCGJ1=0))AND(YF_DMRBUY=0)),返回0,否则返回YF_DMRJ1
短买入赋值:YF_DCGJ1
输出短买入C:如果短买入,返回收盘价,否则返回0,NODRAW
短卖出赋值:YF_DMRBUY
输出短卖出C:如果短卖出,返回收盘价,否则返回0,NODRAW
输出短持股:YF_DCG11,NODRAW
短持股1赋值:YF_DCG
短本次收益赋值:如果(短买入=1),返回YF_DCGREAL,否则返回如果((短持股不等于0)OR(短卖出=1)),返回YF_DMRJ11,否则返回0
短买价赋值:如果(短卖出=1),返回YF_DMRJ,否则返回0
当满足条件(短买入=1)时,在开盘价和收盘价位置之间画柱状线,宽度为2,0不为0则画空心柱.,线宽为1,COLORFFFFFF
当满足条件(短卖出=1)时,在开盘价和收盘价位置之间画柱状线,宽度为2,0不为0则画空心柱.,线宽为1,COLORFF0000
当满足条件(短买入=1)时,在最低价位置画1号图标
当满足条件(短卖出=1)时,在最高价位置画2号图标
输出短操盘状态:如果(短买入=1),返回1,否则返回如果(短持股>0),返回2,否则返回如果(短卖出=1),返回9,否则返回0,NODRAW
输出明日空间买卖点:收盘价的6日指数移动平均,NODRAW
输出五域股龄:收盘价的有效数据周期数,NODRAW
输出短买入2:YF_DCGJ1,NODRAW
输出短卖出2:YF_DMRBUY,NODRAW
输出短持股2:YF_DCG11,NODRAW
输出本次收益2:YF_DCG,NODRAW
输出短买价2:如果(短买入2=1),返回YF_DCGREAL,否则返回如果((短持股2不等于0)OR(短卖出2=1)),返回YF_DMRJ11,否则返回0,NODRAW
输出短卖价2:如果(短卖出2=1),返回YF_DMRJ,否则返回0,NODRAW
YF_MAXDSY2赋值:统计0日中满足((YF_DMR=1)AND(YF_DCG不等于0))的天数
YF_DCSLY2赋值:如果(YF_DMR=1),返回YF_DCG,否则返回0
输出总收益:(YF_DCSLY2的历史累和 - YF_MAXDSY2),NODRAW
输出总次数:YF_MAXDSY2,NODRAW
总次数1赋值:如果(YF_YYZ1<240),返回YF_YYZ1,否则返回240
输出年收益:((YF_DCSLY2的历史累和 - YF_MAXDSY2) - 总次数1日前的(YF_DCSLY2的历史累和-YF_MAXDSY2)),NODRAW
输出年次数:(统计0日中满足((YF_DMR=1)AND(YF_DCG不等于0))的天数 - 总次数1日前的统计0日中满足((YF_DMR=1)AND(YF_DCG不等于0))的天数),NODRAW
输出短操盘状态1:如果(短买入2>=1),返回1,否则返回如果(短持股2>0),返回2,否则返回如果(短卖出2>=1),返回9,否则返回0,NODRAW
输出明日买卖点1:收盘价的6日指数移动平均,NODRAW

指标安装下载帮助  |   联系我们  |  股朋指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

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