【通达信源码分享】精品指标公式-上升二浪源码

通达信免费指标 04-02 阅读:589 评论:0

公式源码:


 


DRAWGBK(C>0,RGB(0,150,150),RGB(0,00,100),0,' ',0),LINETHICK2;


DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.70,0.02,0,YEAR);


DRAWTEXT_FIX(1,0.745,0.02,1,'年'),COLORRED;


DRAWTEXT_FIX(1,0.78,0.02,1,'月'),COLORRED;


DRAWTEXT_FIX(1,0.815,0.02,1,'日'),COLORRED;


DRAWTEXT_FIX(1,0.845,0.02,1,'星期'),COLORRED;


DRAWTEXT_FIX(1,0.92,0.02,1,'时'),COLORRED;


DRAWTEXT_FIX(1,0.95,0.02,1,'分'),COLORRED;


DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.74,0.02,0,MONTH);


DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.785,0.02,0,DAY);


DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.85,0.02,0,WEEKDAY);


DRAWNUMBER_FIX(CURRBARSCOUNT=1 AND FROMOPEN<121,0.88,0.02,0,INTPART((34200+FROMOPEN*60)/3600));


DRAWNUMBER_FIX(CURRBARSCOUNT=1 AND FROMOPEN>120,0.88,0.02,0,INTPART((34200+FROMOPEN*60+5400)/3600));


DRAWNUMBER_FIX(CURRBARSCOUNT=1 AND DYNAINFO(9)>5000 AND C>4,0.9,0.8,0,DYNAINFO(9)),COLORMAGENTA;


DRAWNUMBER_FIX(CURRBARSCOUNT=1 AND FROMOPEN<121,0.92,0.02,0,60*(((34200+FROMOPEN*60)/3600)-INTPART((34200+FROMOPEN*60)/3600)));


DRAWNUMBER_FIX(CURRBARSCOUNT=1 AND FROMOPEN>120,0.92,0.02,0,60*(((34200+FROMOPEN*60+5400)/3600)-INTPART((34200+FROMOPEN*60+5400)/3600)));


{波峰} 


TY:=H; 


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); C002:=BACKSET(B2,10+1); 


LD:=FILTER(C002,10); 


波峰:REF(H,BARSLAST(HD)),COLOR00FF00,POINTDOT,LINETHICK3; 


STICKLINE(H,波峰,波峰,8,0),COLORYELLOW,LINETHICK3;


DRAWTEXT(波峰,L-0.1,'波峰'),COLORYELLOW,LINETHICK3;


 


 


 


MA01:MA(C,1),LINETHICK1;


MA24:MA(C,24),COLOR0055FF,POINTDOT,LINETHICK4;


{画方框}


LL:=L<REF(L,1) AND L<REFX(L,1);


LT:BARSLAST(LL) NODRAW;


HH:=L>REF(L,1) AND L>REFX(L,1);


TJ:=EVERY(L>REF(L,1),LT) AND HH;


HT:BARSLAST(TJ)NODRAW;


HHH:=HHV(H,LT+1);


AA:DRAWLINE(CROSS(LT=0,0.5) ,L,HT=0 AND LT>2,REF(L,LT),0)COLORYELLOW,LINETHICK2;


 


三日最低:=EMA((REF(L,4)+REF(L,3)+REF(L,2))/3,3); 


三日最高:=EMA((REF(H,4)+REF(H,3)+REF(H,2))/3,3); 


EXITLONG:CROSS(CROSS(三日最高,C),0.6);


ENTERLONG:CROSS(CROSS(C,三日最低),0.5);


STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;


K:=KDJ.K;


J:=KDJ.J;


ENTERLONG1:CROSS(J,K)  ;


ENTERSHORT1:CROSS(K,J) ;


 


涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);


STICKLINE(涨停,OPEN,CLOSE,2.5,0),COLORYELLOW;


DRAWTEXT(涨停,L-0.1,'涨停'),COLORYELLOW;


窗口显示:=C>REF(C,1)*1.095 AND C=H;


T:=BARSLAST(窗口显示);


涨停价:REF(C,T)NODRAW;


涨停日期:REF(DATE-1000000,T)NODRAW;


 


STICKLINE(L>REF(H,1),L,REF(H,1),20,1001), COLORYELLOW ;


STICKLINE(REF(L,1)>H,REF(L,1),H,20,1001), COLORGREEN ;


 


TJ01:=C<O AND REFX(C<O,1) AND REFX(C>O,2);


DRAWLINE(TJ01,REFX(LLV(L,2),1),REF(TJ01,1),REF(REFX(LLV(L,2),1),1),1)COLORYELLOW,LINETHICK2;


DRAWLINE(TJ01,REFX(HHV(C,2),1),REF(TJ01,1),REF(REFX(HHV(C,2),1),1),1)COLORYELLOW,LINETHICK2;


 


 


TJ0:=H>MA(C,10) AND H>MA(C,20) AND MA(C,10)>L AND MA(C,20)>L;


STICKLINE(TJ0,C,O,1.5,0)COLORYELLOW;


TJ1:=H>MA(C,10) AND H>MA(C,20);


TJ2:=L<MA(C,10) AND L<MA(C,20);


TJA:=TJ1 AND TJ2;


CF:=BACKSET(EVERY(TJA,4),4);


CFT:=BARSLAST(CROSS(CF=1,0.5));


STICKLINE(CFT<=3,C,O,1.5,0)COLORYELLOW;


 


BDGD:=C=HHV(C,13);


GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),2))+1;


高点:REF(C,GDSJ),COLORGREEN,LINETHICK2,POINTDOT;


突破:CROSS(C,REF(高点,1)),COLOR00FFFF,POINTDOT,LINETHICK0;


STICKLINE(GDSJ<=6,高点,高点,8,0),COLORGREEN,LINETHICK2;


BDDD:=C=LLV(C,13);


DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),2))+1;


低点:REF(C,DDSJ),COLORGREEN,POINTDOT,LINETHICK2;


STICKLINE(DDSJ<=6,低点,低点,8,0),COLORGREEN,LINETHICK2;


AAA:=(REF(CLOSE,1)+REF(CLOSE,2)+OPEN)/3;


 


前高:DRAWLINE(CURRBARSCOUNT=3,H,REF(CURRBARSCOUNT=3,1),REF(H,1),1),LINETHICK2;


 昨收:DRAWLINE(CURRBARSCOUNT=2,C,REF(CURRBARSCOUNT=2,1),REF(C,1),1),LINETHICK2;


压力线:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLOR0055FF,LINETHICK2;


DRAWTEXT(压力线,L-0.2,'压力↙'),COLORE8E8E8;


股价:=(C-LLV(L,35))/(HHV(H,35)-LLV(L,35))*100;


 


量比:=(MA(VOL,5)-LLV(MA(VOL,5),35))/(HHV(MA(VOL,5),35)-LLV(MA(VOL,5),35))*100;


量度:=IF(量比<35,0,量比),COLOR558899,LINETHICK2;


MA1:=MA(C,3);


MA2:=MA(C,5);


MA3:=MA(C,7);


MA4:=MA(C,14);


短线:MA((MA1+MA2+MA3+MA4)/4,5),COLORRED,LINETHICK0;


涨:IF(MA(CLOSE,短线)>REF(MA(CLOSE,短线),1),MA(CLOSE,10),DRAWNULL),COLORRED,LINETHICK3;


平:IF(MA(CLOSE,短线)=REF(MA(CLOSE,短线),1),MA(CLOSE,10),DRAWNULL),COLOR00FFFF,LINETHICK3;


跌:IF(MA(CLOSE,短线)<REF(MA(CLOSE,短线),1),MA(CLOSE,10),DRAWNULL),COLORGREEN,LINETHICK3;


DRAWTEXT(平=短线,短线*0.998-0.01,'关注'),COLORCYAN;


MA5:=MA(C,20);


MA6:=MA(C,30);


MA7:=MA(C,60);


中线:MA((MA5+MA6+MA7)/3,10),COLORFF9999,LINETHICK3;{,COLORWHITE}


 


DRAWICON(CROSS(短线 ,中线),短线 ,9);


DRAWTEXT(CROSS(短线,中线) AND 短线>0,中线-0.05,'牛叉↙'),COLORCYAN;


C3:=REF(C,1);


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


STICKLINE(跌停,OPEN,CLOSE,2.5,0),COLORBLUE;


DRAWTEXT(跌停,H+0.3,'跌停'),COLORBLUE;


NN:=120;


{跳空}


STICKLINE(REF(L,1)>H,H,REF(L,1),5,0),COLORGRAY;


STICKLINE(REF(H,1)<L,L,REF(H,1),5,0),COLORGRAY;


{彩色K线}


 TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);


 TYX4:=MA((C+L+O+H)/4,13);


 TYX5:=EMA((C+L+O+H)/4,21);


 {空心红}


 STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;


 STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;


 {深绿}


 STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR007700;


 STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR005500;


 STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR006600;


 STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR007700;


 {蓝}


 STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;


 STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;


 STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;


 STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;


 {黄}


 STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;


 STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;


 STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;


 STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;


 {粉红}


 STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;


 STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;


 STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;


 STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;


 {亮灰}


 STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;


 STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;


 STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;


 STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;


 {深红}


 STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;


 STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;


 STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;


 STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;


 {涨跌停K线}


 STICKLINE((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,1,0),COLORYELLOW;


 


DRAWTEXT_FIX(1,0.00,0.00,0,'主题投资:')COLOR0000FF;


DRAWTEXT_FIX(1,0.07,0.00,0,EXTERNSTR(0,1)),COLORWHITE;


 


DRAWTEXT_FIX(1,0.50,0.995,0,'★爱公式专用★'),COLOR8082C7; 

30-1G023215410.png

版权声明

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

服务热线

18020657357

微信客服

微信客服