资金共振指标 通达信公式(附图)

[复制链接]
查看155 | 回复0 | 2021-8-20 15:54:52 | 显示全部楼层 |阅读模式

M:=10;
0,COLOR666666;
VAR1:=SMA(AMOUNT/10,M,1)/10000; {10日成交额的SMA平均,考虑一日权重}
DIF1:=EMA(VAR1,20)-EMA(VAR1,60);
DEA1:=EMA(DIF1,10),COLORWHITE;
MACD1:=(DIF1-DEA1)*2;
MAMACD1:=MA(MACD1,3);
DIF2:=EMA(VAR1,30)-EMA(VAR1,60);
DEA2:=EMA(DIF2,10),COLORWHITE;
MACD2:=(DIF2-DEA2)*2;
MAMACD2:=MA(MACD2,3);
DIF3:=EMA(VAR1,40)-EMA(VAR1,60);
DEA3:=EMA(DIF3,10),COLORWHITE;
MACD3:=(DIF3-DEA3)*2;
MAMACD3:=MA(MACD3,3);
DIF4:=EMA(VAR1,60)-EMA(VAR1,120);
DEA4:=EMA(DIF4,10),COLORWHITE;
MACD4:=(DIF4-DEA4)*2;
MAMACD4:=MA(MACD4,3);
DIF5:=EMA(VAR1,120)-EMA(VAR1,250);
DEA5:=EMA(DIF5,10),COLORWHITE;
MACD5:=(DIF5-DEA5)*2;
MAMACD5:=MA(MACD5,3);
DIF6:=EMA(VAR1,250)-EMA(VAR1,500);
DEA6:=EMA(DIF6,10),COLORWHITE;
MACD6:=(DIF6-DEA6)*2;
MAMACD6:=MA(MACD6,3);
A1:=MAMACD1>=REF(MAMACD1,1);
A2:=MAMACD2>=REF(MAMACD2,1);
A3:=MAMACD3>=REF(MAMACD3,1);
A4:=MAMACD4>=REF(MAMACD4,1);
A5:=MAMACD5>=REF(MAMACD5,1);
A6:=MAMACD6>=REF(MAMACD6,1);
B1:=MAMACD1<=REF(MAMACD1,1);
B2:=MAMACD2<=REF(MAMACD2,1);
B3:=MAMACD3<=REF(MAMACD3,1);
B4:=MAMACD4<=REF(MAMACD4,1);
B5:=MAMACD5<=REF(MAMACD5,1);
B6:=MAMACD6<=REF(MAMACD6,1);
{A1:=DIF1>=REF(DIF1,1);
A2:=DIF2>=REF(DIF2,1);
A3:=DIF3>=REF(DIF3,1);
A4:=DIF4>=REF(DIF4,1);
A5:=DIF5>=REF(DIF5,1);
A6:=DIF6>=REF(DIF6,1);
B1:=DIF1<=REF(DIF1,1);
B2:=DIF2<=REF(DIF2,1);
B3:=DIF3<=REF(DIF3,1);
B4:=DIF4<=REF(DIF4,1);
B5:=DIF5<=REF(DIF5,1);
B6:=DIF6<=REF(DIF6,1);}
STICKLINE(A6,0,1,3,0),COLORBLUE;
STICKLINE(A5,1,2,3,0),COLORDDDDDD;
STICKLINE(A4,2,3,3,0),COLORRED;
STICKLINE(A3,3,4,3,0),COLORMAGENTA;
STICKLINE(A2 AND A1,4,5,3,0),COLORYELLOW;
STICKLINE(B6,0,1,3,0),COLOR333333;
STICKLINE(B5,1,2,3,0),COLOR444444;
STICKLINE(B4,2,3,3,0),COLOR555555;
STICKLINE(B3,3,4,3,0),COLOR666666;
STICKLINE(A6 OR A5,7.5,8,3,0),COLOR339999;
STICKLINE(A6 OR A5,7.5,8,1,0),COLOR33FFFF;
STICKLINE(B5 OR B6,7.5,8,3,0),COLOR333333;
STICKLINE(B5 OR B6,7.5,8,1,0),COLOR666666;
STICKLINE((A6 OR A5) AND A3 AND A2 AND A1,7.5,8,3,0),COLOR993399;
STICKLINE((A6 OR A5) AND A3 AND A2 AND A1,7.5,8,1,0),COLORFF00FF;
STICKLINE((B6 OR B5) AND A3 AND A2 AND A1,7.5,8,3,0),COLOR666600;
STICKLINE((B6 OR B5) AND A3 AND A2 AND A1,7.5,8,1,0),COLORFFFF00;
向上三线共振:=A3 AND A2 AND A1;
DRAWICON(IF(向上三线共振=1 AND REF(向上三线共振,1)=0 ,向上三线共振,0) AND COUNT(向上三线共振,20)<=3,7,1);
VAR2:=BARSLAST(A3=1 AND REF(A3,2)=0);
DRAWICON(IF(REF(向上三线共振,1)=1 AND 向上三线共振=0 AND COUNT(向上三线共振,VAR2)>8,1,0),7,2);

1211133N3-0.jpg

1211133N3-0.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则