通达信长短结合主图指标源码

[复制链接]
查看49 | 回复0 | 2022-7-24 07:52:58 | 显示全部楼层 |阅读模式

通达信长短结合主图指标源码

闲来无事,把在理想淘的几个精品指标倒腾了一下,取其精华组合成一个新指标感觉还行。原作者莫怪,呵呵
 
长短结合主图
 
长线启动点:(MA(C,188)),COLORGREEN,LINETHICK2;
 D90H1:EMA(长线启动点,90),CIRCLEDOT,COLORGRAY,LINETHICK4;
 LC:=REF(CLOSE,1);
 RS1:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
 起步:IF((RS1 >58),长线启动点,DRAWNULL),,COLORRED,LINETHICK2;
 C2:=REF(C,1),NODRAW;
 涨停:=REF(C,1)*1.1-C<0.01 AND H=C,NODRAW;
 STICKLINE(涨停,OPEN,CLOSE,0001,0),COLORYELLOW;
 STICKLINE(涨停,H,L,0,0),COLORRED;
 跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2) AND L=C,1,0),NODRAW;
 STICKLINE(跌停,OPEN,CLOSE,1,0),COLORBLUE;
 
操盘线:=EMA(EMA(EMA(CLOSE,2),2),2);
 趋势线:(MA(操盘线,5)),COLORWHITE,LINETHICK1;
 IF(趋势线>REF(趋势线,1),趋势线,DRAWNULL),COLORRED,LINETHICK1;
 IF(趋势线<REF(趋势线,1),趋势线,DRAWNULL),COLORGREEN,LINETHICK1;
 
止损线: EMA(COST(81),10),POINTDOT,COLORWHITE;
 
TY:=C;
 A1:=REF(TY,10)=HHV(TY,2*10+1);
 B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
 HD:=FILTER(C1,10);
 A2:=REF(TY,10)=LLV(TY,2*10+1);
 B2:=FILTER(A2,10);
C02:=BACKSET(B2,10+1);
LD:=FILTER(C02,10);
 前期高位:REF(C,BARSLAST(HD)),COLOR8000FF,POINTDOT;
 STICKLINE(C,前期高位,前期高位,8,0),COLOR8000FF;
 

HH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
 +13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
 +7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
 REF(H,20))/210,COLORBLUE,LINETHICK1;
 LL:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
 +13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
 +7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
 REF(L,20))/210,COLORBLUE,LINETHICK1;
 D90H:=EMA(HH,90),COLORRED,LINETHICK1;
 D90L:=EMA(LL,90),COLORRED,LINETHICK1;
 G0:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))+XMA(XMA(H,25),25);
 D0:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25));
 DTD:=(D0+G0)/2>=(D90H+D90L)/2;
 YM:EMA(SLOPE((CLOSE+HIGH+LOW)/3,24)*20+(CLOSE+HIGH+LOW)/3,48);  
YM1:EMA(YM,5);
 STICKLINE(L<D0 AND DTD=1 AND YM>YM1,L,D0,3,0),COLORMAGENTA;

 

73733705.jpg

73733705.jpg

 

回复

使用道具 举报

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

本版积分规则