通达信K线动能源码副图

[复制链接]
查看36 | 回复0 | 2022-7-24 04:28:19 | 显示全部楼层 |阅读模式

K线动能源码

VAR1:=EMA((2*CLOSE+HIGH+LOW)/4,3);
 VAR2:=SLOPE(VAR1*5-REF(VAR1,5),5)+CLOSE;
 VAR3:=EMA(VAR2,3)-EMA(VAR2,13);
 VAR4:=EMA(VAR3,3);
 VAR5:=(VAR3-VAR4)*50;
 STICKLINE(VAR5>0,0,VAR5,2,0),COLORYELLOW;
 STICKLINE(VAR5>0,0,VAR5*0.9,2,0),COLORYELLOW;
 STICKLINE(VAR5>0,0,VAR5*0.8,2,0),COLORYELLOW;
 STICKLINE(VAR5>0,0,VAR5*0.7,2,0),COLORRED;
 STICKLINE(VAR5>0,0,VAR5*0.6,2,0),COLORRED;
 STICKLINE(VAR5>0,0,VAR5*0.5,2,0),COLORRED;
 STICKLINE(VAR5>0,0,VAR5*0.4,2,0),COLORRED;
 STICKLINE(VAR5>0,0,VAR5*0.3,2,0),COLORRED;
 STICKLINE(VAR5>0,0,VAR5*0.2,2,0),COLORRED;
 STICKLINE(VAR5>0,0,VAR5*0.1,2,0),COLORRED;
 STICKLINE(VAR5<0,0,VAR5,2,0),COLORGREEN;
 STICKLINE(VAR5<0,0,VAR5*0.9,2,0),COLORGREEN;
 STICKLINE(VAR5<0,0,VAR5*0.8,2,0),COLORGREEN;
 STICKLINE(VAR5<0,0,VAR5*0.7,2,0),COLORFF9900;
 STICKLINE(VAR5<0,0,VAR5*0.6,2,0),COLORFF9900;
 STICKLINE(VAR5<0,0,VAR5*0.5,2,0),COLORFF9900;
 STICKLINE(VAR5<0,0,VAR5*0.4,2,0),COLORFF9900;
 STICKLINE(VAR5<0,0,VAR5*0.3,2,0),COLORFF9900;
 STICKLINE(VAR5<0,0,VAR5*0.2,2,0),COLORFF9900;
 STICKLINE(VAR5<0,0,VAR5*0.1,2,0),COLORFF9900;
 VAR6:=(CLOSE*2+HIGH+LOW)/4*10;
 VAR7:=EMA(VAR6,13)-EMA(VAR6,34);
 VAR8:=EMA(VAR7,5);
 VAR9:=2*(VAR7-VAR8)*5.5;
庄家进:IF(VAR9>=0,VAR9,0),COLORRED,LINETHICK2;
 VAR10:=(HIGH*18+REF(HIGH,1)*17+REF(HIGH,2)*16+REF(HIGH,3)*15+REF(HIGH,4)*14+REF(HIGH,5)*13+REF(HIGH,6)*12+REF(HIGH,7)*11+REF(HIGH,8)*10+REF(HIGH,9)*9+REF(HIGH,10)*8+REF(HIGH,11)*7+REF(HIGH,12)*6+REF(HIGH,13)*5+REF(HIGH,14)*4+REF(HIGH,15)*3+REF(HIGH,16)*2+REF(HIGH,17)*1)/171;
 VAR11:=(LOW*18+REF(LOW,1)*17+REF(LOW,2)*16+REF(LOW,3)*15+REF(LOW,4)*14+REF(LOW,5)*13+REF(LOW,6)*12+REF(LOW,7)*11+REF(LOW,8)*10+REF(LOW,9)*9+REF(LOW,10)*8+REF(LOW,11)*7+REF(LOW,12)*6+REF(LOW,13)*5+REF(LOW,14)*4+REF(LOW,15)*3+REF(LOW,16)*2+REF(LOW,17)*1)/171;
 VAR12:=MA(CLOSE,5);
 VAR13:=MA(CLOSE,10);
 VAR14:=MA(CLOSE,20);
 VAR15:=MA(CLOSE,60);
 VAR16:=CLOSE>=VAR10 OR (CLOSE>VAR12 AND CLOSE>VAR13 AND CLOSE>VAR14 AND CLOSE>VAR15);
 VAR17:=VAR11>CLOSE OR (CLOSE<VAR12 AND CLOSE<VAR13 AND CLOSE<VAR14 AND CLOSE<VAR15);
 VAR18:=BARSLAST(VAR16);
 VAR19:=BARSLAST(VAR17);
 VAR20:=BARSLAST(CROSS(VAR19,VAR18));
 VAR21:=BARSLAST(CROSS(VAR18,VAR19));
 VAR22:=CROSS(VAR21,VAR20);
 DRAWTEXT(VAR22>0,0.3,27),COLORYELLOW;
 VAR23:=EMA(CLOSE,3)-EMA(CLOSE,8);
 VAR24:=EMA(VAR23,5);
 VAR25:=2*(VAR23-VAR24);
 VAR26:=EMA(VAR23,5)*5;
 VAR27:=(EMA(CLOSE,3)-EMA(CLOSE,8))*5;
 VAR28:=VAR27;
 VAR29:=VAR26;
 DRAWICON(CROSS(VAR28,VAR29) AND VAR29<(-0.25),VAR29,1);
 
 

631277441.jpg

631277441.jpg

回复

使用道具 举报

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

本版积分规则