五域论湛专家版源码
我只做了初步整理,也不知对不对。共有6个公式,后面4个我已经做了精简。
C/C++ Code复制内容到剪贴板
- 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);
- 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_ZFD1:=REF(YF_TDCG,2);
- YF_ZFD2:=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_ZFD1 < 0)),(0 - 1),1));
- SS:=REF(YF_TDCG,1);
- YF_YZFZ:=IF((((YF_YYZ1 > 11) AND (SS < 0)) AND (YF_TDCG > 0)),1,0);
- YF_JSD21:=BARSLAST((YF_YZFZ = 1));
- YF_JSD:=REF(YF_JSD21,1);
- A:=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_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_DMR:=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_DMR);
- YF_DMR:=(YF_DMR OR (BARPOS = 1));
- 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;
- 短买入:YF_DCGJ1,LINETHICK0;
- 短卖出:YF_DMRBUY,LINETHICK0;
- 短持股:YF_DCG11,LINETHICK0;
- 本次收益:YF_DCG,LINETHICK0;
- 短买价:IF((短买入 = 1),YF_DCGREAL,IF(((短持股 <> 0) OR (短卖出 = 1)),YF_DMRJ11,0)),LINETHICK0;
- 短卖价:IF((短卖出 = 1),YF_DMRJ,0),LINETHICK0;
- STICKLINE((短买入 = 1),短买价,YF_DMRJ,8,0),colorFF99FF;
- STICKLINE((短买入 = 1),短买价,YF_DMRJ,6,0),colorFF00FF;
- STICKLINE((短买入 = 1),短买价,YF_DMRJ,4,0),color9900FF;
- STICKLINE((短买入 = 1),短买价,YF_DMRJ,2,0),colorFF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,0,0),colorFFBBFF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,8,0),colorFF00FF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,7,0),colorFF22FF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,6,0),colorFF44FF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,5,0),colorFF66FF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,4,0),colorFF88FF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,3,0),colorFF99FF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,2,0),colorFFAAFF;
- STICKLINE((短持股 > 0),短买价,YF_DMRJ,1,0),colorFFBBFF;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,0,0),colorFF00;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,8,0),color8800;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,7,0),color9900;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,6,0),colorAA00;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,5,0),colorBB00;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,4,0),colorCC00;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,3,0),colorDD00;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,2,0),colorEE00;
- STICKLINE((短卖出 = 1),短买价,YF_DMRJ,1,0),colorFF00;
- YF_MAXDSY:=COUNT(((YF_DMR = 1) AND (YF_DCG <> 0)),0);
- YF_GLDSY:=HHV(YF_DCG,0);
- YF_DCSLJ:=BARSSINCE(((YF_DMR = 1) AND (YF_DCG <> 0)));
- YF_DCSLY:=IF((YF_DMR = 1),YF_DCG,0);
- 总收益:(SUM(YF_DCSLY,0) - YF_MAXDSY),LINETHICK0;
- 总次数:YF_MAXDSY,LINETHICK0;
- 总次数1:=IF((YF_YYZ1 < 240),YF_YYZ1,240);
- 年收益:((SUM(YF_DCSLY,0) - YF_MAXDSY) - REF((SUM(YF_DCSLY,0) - YF_MAXDSY),总次数1)),LINETHICK0;
- 年次数:(COUNT(((YF_DMR = 1) AND (YF_DCG <> 0)),0) - REF(COUNT(((YF_DMR = 1) AND (YF_DCG <> 0)),0),总次数1)),LINETHICK0;
- 短操盘状态:IF((短买入 = 1),1,IF((短持股 > 0),2,IF((短卖出 = 1),9,0))),LINETHICK0;
- 明日空间买卖点:EMA(CLOSE,6),LINETHICK0;
C/C++ Code复制内容到剪贴板
- 五域极限
-
- 短期动量线:=EMA((WINNER(CLOSE) * 100),5);
- 中期动量线:=EMA((WINNER(CLOSE) * 100),13);
- wy:=IF((短期动量线 >= 2),0,IF((中期动量线 >= 2),0,1));
- 五域极限:=IF((wy = 1),1,0),LINETHICK0;
- STICKLINE((五域极限 = 1),0,1,8,0),colorFF;
C/C++ Code复制内容到剪贴板
- 五域资金
-
- A个股收盘:=EMA(CLOSE,30);
- A大盘收盘:=EMA(INDEXC,49);
- A个股上限:=EMA(A个股收盘,7);
- A大盘上限:=EMA(A大盘收盘,7);
- A个股趋势:=((CLOSE / A个股上限)*100);
- A大盘趋势:=((INDEXC / A大盘上限)*100);
- 区域强弱度:(((A个股趋势 - A大盘趋势) / A大盘趋势) * 100);
- 五域资金:IF((区域强弱度 > 0),1,0),LINETHICK0;
- STICKLINE((五域资金 = 1),0,1,8,0),colorFF;
C/C++ Code复制内容到剪贴板
- 五域仓位
-
- 主力仓位密集率:=(((COST(90) - COST(10)) / COST(90)) * 100);
- 五域仓位:IF((主力仓位密集率 < 20),1,0),LINETHICK0;
- STICKLINE((五域仓位 = 1),0,1,8,0),colorFF;
C/C++ Code复制内容到剪贴板
- 五域风险
-
- VAR1:=((((2 * WINNER(CLOSE)) + WINNER(HIGH)) + WINNER(LOW)) / 4);
- VAR2:=EMA((((VAR1 - LLV(WINNER(LOW),34)) / (HHV(WINNER(HIGH),34) - LLV(WINNER(LOW),34))) * 100),13);
- VAR3:=EMA(((0.382 * REF(VAR2,2)) + (0.618 * VAR2)),12);
- 五域风险:IF((VAR3 < 10),1,0),LINETHICK0;
- STICKLINE((五域风险 = 1),0,1,8,0),colorFF;
-