通达信超准完美主图公式

[复制链接]
查看54 | 回复0 | 2022-7-24 05:55:17 | 显示全部楼层 |阅读模式

通达信超准完美主图公式

DRAWTEXT(CROSS(MA(C,10),MA(C,20)),H,'-------------'),LINETHICK2;
DRAWBAND(MA(C,3),RGB(230,0,250),HHV(MA(C,5),10),RGB(0,100,150));
MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA30:MA(CLOSE,30);
MA60:MA(CLOSE,60);
MA120:MA(CLOSE,120);
MA250:MA(CLOSE,250);
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
Y:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,30,0);
主力:=EMA( (CLOSE-MA(CLOSE,3))/MA(CLOSE,3),2);
散户:=EMA( (CLOSE-MA(CLOSE,20))/MA(CLOSE,20),7);
VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
动能趋势线:=100*EMA((CLOSE-VAR2)/(VAR3-VAR2),4);
{DRAWTEXT(CROSS(动能趋势线,70),HIGH*1.02,'险'),COLORGREEN;
DRAWTEXT(CROSS(动能趋势线,80),HIGH*1.02,'减'),COLOR00FF00;}
DRAWTEXT(CROSS(动能趋势线,87.5),HIGH*1.02,'←出局'),COLORLIRED;
DRAWICON(CROSS(动能趋势线,87.5),HIGH*1.02,2);
DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW*0.96,'←短进'),COLORBLUE;
DRAWICON(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW*0.97,1);
DRAWTEXT(CROSS(主力,散户) AND 主力<0 AND 散户<0,LOW*0.95,'←见底'),COLORRED;
DRAWICON(CROSS(主力,散户) AND 主力<0 AND 散户<0,LOW*0.96,1);
{涨跌停显示}
{涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(O,1)),1,0);
STICKLINE(涨停,O,C,3,0),COLORYELLOW;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF<-9.9,O,C,3,0),COLORGREEN;}

{以下为K线上色}
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;

{STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;}
{STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;}

{STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;}

{STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;}

{STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;}

{STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;}

K1:=(C+H+L)/3;
D1:=MA(K1,4);
阻力:HHV(D1,55),COLORRED;
DRAWTEXT(REF(C,1)>D1 AND C<D1 AND D1>REF(D1,1),H*1.02,'←卖');
DRAWICON(REF(C,1)>D1 AND C<D1 AND D1>REF(D1,1),H*1.02,2);
DRAWTEXT(REF(C,1)<D1 AND C>D1 AND D1<REF(D1,1),L*0.98,'←买'),COLORMAGENTA;
DRAWICON(REF(C,1)<D1 AND C>D1 AND D1<REF(D1,1),LOW*0.99,1);
XXS:=MA(LOW,5)*(1-5/100);
XXS1:=MA(HIGH,5)*(1+5/100);
DRAWTEXT(CROSS(XXS1,C),H*1.01,'←砸'),COLORGREEN;
DRAWICON(CROSS(XXS1,C),HIGH*1.01,2);

五日乖离率:=(C-MA5)/MA5*100;
BB05:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((MA5-REF(MA5,1))/REF(MA5,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
三拾日乖离率:=(C-MA30)/MA30*100,NODRAW;
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND MA5>REF(MA5,1)  AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA10>REF(MA10,1) AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1)  ,10) ;
清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>MA30 OR O>MA30) AND MA5<REF(MA5,1)  AND 三拾日乖离率<REF(三拾日乖离率,1) AND MA10<REF(MA10,1),10);
DRAWTEXT(加仓 ,LOW*0.98,'◆加仓'),COLORYELLOW;
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA5>REF(MA5,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<MA30;
买入:=FILTER(MR,10);
DRAWTEXT(买入,LOW*0.96,'◆买入'),COLORYELLOW;
DRAWTEXT(清仓 ,HIGH*1.00,'◆清仓'),COLORGREEN;
{买卖主图}
{MA18:=MA(CLOSE,18);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买:=LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2));
DRAWTEXT(FILTER(买=1,5),LOW,'★买'),COLORRED;
加:=MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18);
DRAWTEXT(加,LOW*0.99,'★加'),COLORCC66FF;
卖:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX);
DRAWTEXT(FILTER(卖=1,1),HIGH*1.01,'★卖'),COLORGREEN;};

2112188785.png

2112188785.png

回复

使用道具 举报

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

本版积分规则