自动分割画线-精品通达信指标公式源码分享

通达信免费指标 09-07 阅读:81 评论:0

image.png

 A1:=MA(H,6);   

 A2:=MA(L,6);   

 A3:IF(C>REF(A1,1),A2,IF(C<REF(A2,1),A1,A2)),COLORGRAY,LINETHICK1;   

 涨家数:INDEXADV,NODRAW, ;   

 跌家数:INDEXDEC,NODRAW,COLORGREEN;   

 C3:=REF(C,1);   

 涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);   

 STICKLINE(涨停,OPEN,CLOSE,1,0),COLORRED;   

 跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);   

 STICKLINE(跌停,OPEN,CLOSE,1,0),COLORGREEN;   

 VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);   

 VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);   

 VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);   

 VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);   

 短线:REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND     VAR1,COLORYELLOW,NODRAW;   

 STICKLINE(短线,O,(C+O)/2,1.5,0),COLORYELLOW;   

 F:=100*(C-REF(C,1))/REF(C,1);   

 今小昨:=IF(C<REF(O,1) AND F<0,1,0);   

 P1:=今小昨;   

 今小前:=IF(C<REF(O,2) AND F<0,1,0);   

 P2:=今小前;   

 爱琴海:P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,COLORMAGENTA,NODRAW;   

 STICKLINE(爱琴海,C,(C+O)/2,1.5,0),COLORMAGENTA;   

 {自动分割画线}   

 E1P:DRAWLINE(C=LLV(C,30),LOW,C=LLV(C,10) AND C>LLV(C,22),LLV(LOW,3),1),   

 LINETHICK2,COLORYELLOW;   

 E1PP:DRAWLINE(C=LLV(C,10),LOW,C=LLV(C,5) AND C>LLV(C,10),LLV(LOW,3),1),   

 LINETHICK2,COLORRED;   

 K:=(C+H+L)/3;   

 D:=MA(K,4);   

 B:REF(C,1)<D AND C>D AND D<REF(D,1),NODRAW,COLORRED;   

 DRAWICON(REF(C,1)>D AND C<D AND D>REF(D,1),H*1.002, 2);   

 DRAWICON(REF(C,1)<D AND C>D AND D<REF(D,1),E1PP*0.965 ,23);   


版权声明

本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!

服务热线

18020657357

微信客服

微信客服