多空波段 按图中变红为买点变绿为卖点
F_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_Z,D:=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);
JJ1:=REF(YF_MMD,2);
JJ2:=(((YF_MMD + YF_YYZ) + JJ1) / 3);
JJ02:=(((ABS((YF_MMD - JJ2)) + ABS((YF_YYZ - JJ2))) + ABS((JJ1 - JJ2))) / 3);
SS:=REF(YF_TDCG,1);
YF_Z,D1:=REF(YF_TDCG,2);
YF_Z,D2:=IF((YF_YYZ1 < 3),0,((JJ02 / YF_MMD) * 100));
YF_DHPXS:=IF((YF_YYZ1 < 3),0,IF((((YF_TDCG < 0) AND (SS < 0)) AND (YF_Z,D1 < 0)),(0 - 1),1));
SSX:=REF(YF_TDCG,1);
YF_YZ,Z:=IF((((YF_YYZ1 > 11) AND (SSX < 0)) AND (YF_TDCG > 0)),1,0);
YF_JSD21:=BARSLAST((YF_YZ,Z = 1));
YF_JSD:=REF(YF_JSD21,1);
A:=IF((((YF_YYZ1 > 11) AND (SSX < 0)) AND (YF_TDCG > 0)),(YF_JSD + 1),YF_JSD);
YF_PJJ:=IF((((YF_YYZ1 > 11) AND (SSX > 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_DCG1:=REF(YF_JZDF,1);
YF_BDF5:=IF(((((YF_TDCG > 0.5) AND ((YF_Z,D2 > 0.215) OR (LOW > YF_JZDF))) AND (CLOSE >= OPEN)) AND ((CLOSE >= 200) OR ((CLOSE < 200) AND (CLOSE1 < 11)))),1,0);
YF_DMRX:=IF((((YF_TDCG < (0 - 0.3)) AND ((YF_Z,D2 > 0.2) OR (HIGH < YF_JZDF))) AND ((OPEN >= CLOSE) OR (CLOSE1 < (0 - 1)))),1,0);
YF_DKS1:=BARSSINCE(YF_BDF5);
YF_TDMR:=BARSSINCE(YF_DMRX);
YF_DMR:=(YF_DMRX );
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);
五域股龄:BARSCOUNT(CLOSE),LINETHICK0,NODRAW;
短买入:YF_DCGJ1,LINETHICK0,NODRAW;
短卖出:YF_DMRBUY,LINETHICK0,NODRAW;
短持股:YF_DCG11,LINETHICK0,NODRAW;
短买价:IF((短买入 = 1),YF_DCGREAL,IF(((短持股 != 0) OR (短卖出 = 1)),YF_DMRJ11,LLV(L,60))),LINETHICK3,COLORYELLOW;
短卖价:IF((短卖出 = 1),YF_DMRJ,0),LINETHICK0,NODRAW;
STICKLINE((短买入 = 1),C,O,3,0),COLOR0000FF;
STICKLINE((短买入 = 1),C,O,2.7.5,0),COLOR001BFF;
STICKLINE((短买入 = 1),C,O,2.4,0),COLOR0035FF;
STICKLINE((短买入 = 1),C,O,2.1,0),COLOR0050FF;
STICKLINE((短买入 = 1),C,O,1.8,0),COLOR0062FF;
STICKLINE((短买入 = 1),C,O,1.5,0),COLOR007AFF;
STICKLINE((短买入 = 1),C,O,1.2,0),COLOR0089FF;
STICKLINE((短买入 = 1),C,O,0.9,0),COLOR009CFF;
STICKLINE((短买入 = 1),C,O,0.6,0),COLOR00C0FF;
STICKLINE((短买入 = 1),C,O,0.3,0),COLOR00EAFF;
STICKLINE((短持股 > 0),短买价,YF_DMRJ,2.0,0),COLOR1122DD;
STICKLINE((短持股 > 0),短买价,YF_DMRJ,1.7,0),COLOR2233DD;
STICKLINE((短持股 > 0),短买价,YF_DMRJ,1.3,0),COLOR3344EE;
STICKLINE((短持股 > 0),短买价,YF_DMRJ,1,0),COLOR4455EE;
STICKLINE((短卖出 = 1),C,O,2.7,0),COLORFFAA00;
STICKLINE((短卖出 = 1),C,O,2.4,0),COLOR00BB00;
STICKLINE((短卖出 = 1),C,O,2.1,0),COLOR00CC00;
STICKLINE((短卖出 = 1),C,O,1.8,0),COLOR00DD00;
STICKLINE((短卖出 = 1),C,O,1.5,0),COLOR00EE00;
STICKLINE((短卖出 = 1),C,O,1.2,0),COLOR00FF00;
STICKLINE((短卖出 = 1),C,O,0.3,0),COLOR009900;
{收盘划横线}
β0:=(H-L)/2+L;
α:=β0,LINETHICK0;
β:=REF(β0,1),LINETHICK0,COLORGREEN;
γ:=REF(β0,2),LINETHICK0,COLORMAGENTA;
高位:PLOYLINE(1,CONST(HHV(H,20))),COLOR880088,LINETHICK1,DOTLINE;
低位:PLOYLINE(1,CONST(LLV(L,20))),COLORYELLOW,LINETHICK1,DOTLINE;
止赢止损位:PLOYLINE(1,CONST(HHV(H,20)*0.95)),COLOR888888,LINETHICK2;
收盘划横线&持股:IF(CONST(α>β) AND DYNAINFO(7)>0,DYNAINFO(7),DRAWNULL),COLORRED,LINETHICK1;
持币:IF(CONST(α<=β)AND DYNAINFO(7)>0 ,DYNAINFO(7),DRAWNULL),COLORGREEN,LINETHICK1;
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
F_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赋值:IF((YF_YYZ1 = 1),0,(((YF_MMD - YF_YYZ) / YF_YYZ) * 100))
YF_Z,D赋值:IF((YF_YYZ1 = 1),0,(((YF_XXD - YF_XXD1) / YF_XXD1) * 100))
YF_JSD2赋值:1日前的收盘价
CLOSE1赋值:IF((YF_YYZ1 = 1),0,(((收盘价 - YF_JSD2) / YF_JSD2) * 100))
YF_JZDF赋值:IF((YF_YYZ1 = 1),((收盘价 + 开盘价) / 2),YF_YYZ)
JJ1赋值:2日前的YF_MMD
JJ2赋值:(((YF_MMD + YF_YYZ) + JJ1) / 3)
JJ02赋值:((((YF_MMD - JJ2的绝对值) + ABS((YF_YYZ - JJ2))) + ABS((JJ1 - JJ2))) / 3)
SS赋值:1日前的YF_TDCG
YF_Z,D1:=2日前的YF_TDCG
YF_Z,D2:=IF((YF_YYZ1 < 3),0,((JJ02 / YF_MMD) * 100))
YF_DHPXS赋值:IF((YF_YYZ1 < 3),0,IF((((YF_TDCG < 0) AND (SS < 0)) AND (YF_Z,D1 < 0)),(0 - 1),1))
SSX:=1日前的YF_TDCG
YF_YZ,Z赋值:IF((((YF_YYZ1 > 11) AND (SSX < 0)) AND (YF_TDCG > 0)),1,0)
YF_JSD21:=上次(YF_YZ,Z = 1距今天数)
YF_JSD赋值:1日前的YF_JSD21
A赋值:IF((((YF_YYZ1 > 11) AND (SSX < 0)) AND (YF_TDCG > 0)),(YF_JSD + 1),YF_JSD)
YF_PJJ赋值:IF((((YF_YYZ1 > 11) AND (SSX > 0)) AND (YF_TDCG < 0)),1,0)
YF_JSD11:=YF_JZDF
DMRJ赋值:YF_JZDF
DMCJ赋值:IF(((YF_YYZ1 > 11) AND (YF_JSD11 < 开盘价)),开盘价,YF_JZDF)
YF_DMRJ赋值:IF(((YF_YYZ1 > 11) AND (DMRJ > 开盘价)),开盘价,YF_JZDF)
YF_DCG1赋值:1日前的YF_JZDF
YF_BDF5赋值:IF(((((YF_TDCG > 0.5) AND ((YF_Z,D2 > 0.215) OR (最低价 > YF_JZDF))) AND (收盘价 >= 开盘价)) AND ((收盘价 >= 200) OR ((收盘价 < 200) AND (收盘价1 < 11)))),1,0)
YF_DMRX赋值:IF((((YF_TDCG < (0 - 0.3)) AND ((YF_Z,D2 > 0.2) OR (最高价 < YF_JZDF))) AND ((开盘价 >= 收盘价) OR (收盘价1 < (0 - 1)))),1,0)
YF_DKS1赋值:BARSSINCE(YF_BDF5)
YF_TDMR赋值:BARSSINCE(YF_DMRX)
YF_DMR赋值:(YF_DMRX )
YF_DCGJ1赋值:((COUNT(YF_BDF5,上次YF_DMR距今天数) = 1) AND YF_BDF5)
YF_DMRBUY:=((COUNT(YF_DMR,上次YF_BDF5距今天数) = 1) AND YF_DMR)
YF_DMCSELL赋值:上次YF_DMRBUY距今天数
YF_DCG10:=上次YF_DCGJ1距今天数
YF_DCG11:=((YF_DCG10的YF_DMRBUY日累和 = 0) * YF_DCG10)
YF_DCGREAL赋值:YF_DCG11日前的DMCJ
YF_DMRJ11:=1日前的YF_DCGREAL
YF_DMRJ1:=IF((YF_DCGJ1 = 1),(((收盘价 - 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)
输出
五域股龄:收盘价的有效数据周期数,LINETHICK0,NODRAW
输出
短买入:YF_DCGJ1,LINETHICK0,NODRAW
输出
短卖出:YF_DMRBUY,LINETHICK0,NODRAW
输出
短持股:YF_DCG11,LINETHICK0,NODRAW
输出
短买价:IF((短买入 = 1),YF_DCGREAL,IF(((短持股 != 0) OR (短卖出 = 1)),YF_DMRJ11,60日内L最低值)), 线宽为3,画黄色
输出
短卖价:IF((短卖出 = 1),YF_DMRJ,0),LINETHICK0,NODRAW
STICKLINE((短买入 = 1),C,O,3,0),COLOR0000FF
STICKLINE((短买入 = 1),C,O,2.7.5,0),COLOR001BFF
STICKLINE((短买入 = 1),C,O,2.4,0),COLOR0035FF
STICKLINE((短买入 = 1),C,O,2.1,0),COLOR0050FF
STICKLINE((短买入 = 1),C,O,1.8,0),COLOR0062FF
STICKLINE((短买入 = 1),C,O,1.5,0),COLOR007AFF
STICKLINE((短买入 = 1),C,O,1.2,0),COLOR0089FF
STICKLINE((短买入 = 1),C,O,0.9,0),COLOR009CFF
STICKLINE((短买入 = 1),C,O,0.6,0),COLOR00C0FF
STICKLINE((短买入 = 1),C,O,0.3,0),COLOR00EAFF
STICKLINE((短持股 > 0),短买价,YF_DMRJ,2.0,0),COLOR1122DD
STICKLINE((短持股 > 0),短买价,YF_DMRJ,1.7,0),COLOR2233DD
STICKLINE((短持股 > 0),短买价,YF_DMRJ,1.3,0),COLOR3344EE
STICKLINE((短持股 > 0),短买价,YF_DMRJ,1,0),COLOR4455EE
STICKLINE((短卖出 = 1),C,O,2.7,0),COLORFFAA00
STICKLINE((短卖出 = 1),C,O,2.4,0),COLOR00BB00
STICKLINE((短卖出 = 1),C,O,2.1,0),COLOR00CC00
STICKLINE((短卖出 = 1),C,O,1.8,0),COLOR00DD00
STICKLINE((短卖出 = 1),C,O,1.5,0),COLOR00EE00
STICKLINE((短卖出 = 1),C,O,1.2,0),COLOR00FF00
STICKLINE((短卖出 = 1),C,O,0.3,0),COLOR009900
{收盘划横线}
Β0赋值:(H-L)/2+L
Α赋值:Β0,LINETHICK0
Β赋值:1日前的Β0,LINETHICK0,画绿色
Γ赋值:2日前的Β0,LINETHICK0,画洋红色
输出
高位:PLOYLINE(1,CONST(20日内H最高值)),COLOR880088,LINETHICK1,DOTLINE
输出
低位:PLOYLINE(1,CONST(20日内L最低值)),画黄色,LINETHICK1,DOTLINE
输出
止赢止损位:PLOYLINE(1,CONST(20日内H最高值*0.95)),COLOR888888, 线宽为2
输出
收盘划横线&持股:IF(CONST(Α>Β) AND 现价>0,现价,DRAWNULL),画红色,LINETHICK1
输出
持币:IF(CONST(Α<=Β)AND 现价>0 ,现价,DRAWNULL),画绿色,LINETHICK1