资源描述:
《【股票指标公式下载】-【通达信】及时雨(浮动线、K线)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、【通达信】及时雨(浮动线、K线)-指标公式源码{及时雨}{可见K线N=75条};N:=75;{可见K线最高价};HH:=CONST(HHV(H,N));{可见K线最低价};LL:=CONST(LLV(L,N));{可见K线中间价};MM:=CONST(HH/2+LL/2);{最后收盘价};CC:=CONST(C),CROSSDOT;{浮动线&0.2差值};YY:=CONST(IF(CC>=MM,LL-(HH-LL)*0.2,HH+(HH-LL)*0.2)),POINTDOT;{MACD:-------------
2、----------------------------------------------------};{MACD原参数};DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);{MACD原参数};DEA:=EMA(DIF,9);{MACD原参数};MACD:=(DIF-DEA)*2,COLORSTICK;{MACDN内最高线};MHH:=CONST(HHV(MACD,N));{MACDN内最低线};MLL:=CONST(LLV(MACD,N));{MACDN内均顶底};MMM0:=MHH/2-M
3、LL/2;MMM:=IF(MMM0<(HH-LL)*0.1,(HH-LL)*0.1,MMM0);{浮动线灰衬底};STICKLINE(0=0,YY+MMM,YY-MMM,5,0),COLOR444444;{浮动线上红MACD};STICKLINE(MACD>=0,YY,YY-MACD,2,0),COLORRED;{颠倒图};{浮动线下蓝MACD};STICKLINE(MACD<0,YY,YY-MACD,2,0),COLORCYAN;{颠倒图};{KDJ3------------------------------
4、------------------------------------};{KDJ3原参数};RSV:=((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))-0.5)/100;{KDJ3原参数};K:=SMA(RSV,4,1);{KDJ3原参数};D:=SMA(K,4,1);{KDJ3原参数};J:=3*K-2*D;{浮动线上取J值};JJ:=(J/0.005)*MMM;{放在MACD后面};{浮动线上画J线};STICKLINE(J>REF(J,1),YY+REF(J
5、J,1),YY+JJ,2.0,0),COLORMAGENTA;{浮动线上画J线};STICKLINE(J6、20),SAR(4,2,20),0);{SAR快上抛物线};SARE:=IF(CLOSE>SAR(3,3,20),SAR(3,3,20),0);{SAR上行抛物线};SARA:=IF(CLOSE>SAR(4,2,10),SAR(4,2,10),0);{SAR合画抛物线};空仓:IF(MIN(SAR1,SAR2)>0,(SAR1+SAR2)/2,IF(SAR1+SAR2=0,DRAWNULL,SAR1+SAR2)),CIRCLEDOT,COLORGREEN;{SAR合画抛物线};持股:IF(MIN(SARE,SAR
7、A)>0,(SARE+SARA)/2,IF(SARE+SARA=0,DRAWNULL,SARE+SARA)),CIRCLEDOT,COLORMAGENTA;{MA--------------------------------------------------------------------};{MA1收盘价线};MA1:C,COLORYELLOW,NODRAW;{MA3天均线:4K价};MA3:MA(((3*C+L+O+H)/6),3),COLORYELLOW,NODRAW;{MA3上穿SAR提示};{D
8、RAWICON(CROSS(MA3,SAR(4,2,20))=1,SAR(4,2,20),7);};{MA3下穿SAR提示};{DRAWICON(CROSS(SAR(4,2,20),MA3)=1,SAR(4,2,20),8);};{BBI-------------------------------------------------------------------}