同花顺飘带KDJ指标公式源码

N:=9;
M1:=3;
M2:=3;
RSV=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
a=SMA(RSV,M1,1);
b=Sma(a,M2,1);
e=3*a-2*b;
IF(a<0) a=0;
IF(a>100) a=100;
IF(b<0) b=0;
IF(b>100) b=100;
IF(e<0) e=0;
IF(e>100) e=100;
K:a;
D:b;
J:e,LINETHICK01;
VARK:=K,colorwhite;
升K:=IF(VARK>REF(VARK,1),VARK,DRAWNULL),colorred;
平K:=IF(VARK=REF(VARK,1),VARK,DRAWNULL),colorwhite;
降K:=IF(VARK<REF(VARK,1),VARK,DRAWNULL),colorgreen;
VARD:=D,colorwhite;
升D:=IF(VARD>REF(VARD,1),VARD,DRAWNULL),colorred;
平D:=IF(VARD=REF(VARD,1),VARD,DRAWNULL),colorwhite;
降D:=IF(VARD<REF(VARD,1),VARD,DRAWNULL),colorgreen;
VARJ:=J,colorwhite;
升J:IF(VARJ>REF(VARJ,1),VARJ,DRAWNULL),colorred,LINETHICK2;
平J:IF(VARJ=REF(VARJ,1),VARJ,DRAWNULL),colorwhite,LINETHICK1;
降J:IF(VARJ<REF(VARJ,1),VARJ,DRAWNULL),colorgreen,LINETHICK1;
LC:=REF(CLOSE,1);
rsi5:=(SMA(MAX(CLOSE-LC,0),3,1))/(SMA(Abs(CLOSE-LC),3,1))*100;
wr10:=100*(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3));
总金额亿:AMOUNT/10000/10000,COLORFF00FF,NODRAW;
VAR1:=AMOUNT/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
流入亿:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),AMOUNT/2))/10000/10000,colorred,NODRAW;
流出亿:IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-AMOUNT/2))/10000/10000,COLOR00FF00,NODRAW;
差额亿:流入亿+流出亿,colorwhite,NODRAW;
活跃度:RSI5-WR10,LINETHICK0,COLORFFFF00;
stICKLINE(活跃度>0 AND 活跃度<68,0,活跃度,9,1),COLORFF00FF;
STICKLINE(活跃度>68 AND 活跃度<78,0,活跃度,9,0),COLORFFFF00;
STICKLINE(活跃度>78,0,活跃度,9,0),COLOR00FFFF;
SC:100*(CLOSE-MA(CLOSE,20)),LINETHICK2,colorred;
AAA:=REF(CLOSE,1);
BBB:=SMA(MAX(CLOSE-AAA,0),5,1)/SMA(ABS(CLOSE-AAA),5,1)*1000;
HHH:=BBB-LLV(BBB,10);
SS:=(MA(HHH,2)*3+HHH*13)/16;
短线买点:=IF(SS>13,MA(SS,2),SS)/6;
短线出击:IF(crOSS(短线买点,1) AND (短线买点<30),10,0),coloryellow,LINETHICK2;
地域:DRAWTEXT_FIX(ISLASTBAR,0.78,0,1,BLOCK(2,1)),coloryellow;
所属行业:DRAWTEXT_FIX(ISLASTBAR,0.85,0,1,BLOCK(1,1)),coloryellow;
主概念:DRAWTEXT_FIX(ISLASTBAR,0.1,0,1,BLOCK(3,1)),colorred;
当前价:=MA(CLOSE,1); //当前价
中间价:=(LOW+HIGH+CLOSE)/3;//周期内中间价(周期内最低价+周期内最高价+周期内收盘价)/3
中间价的移动平均值:= MA(中间价,N);//求N个周期内的中间价的平均值
中间价最高值:= HHV(中间价的移动平均值,K);//求K个周期内的中间价的移动平均值的最高值。
急卖:IF(HHV((当前价<中间价最高值),5),100,50),coloryellow;//急卖
短卖:IF(HHV((当前价<中间价最高值),10),100,50),colorgreen;//短卖
中间价的均价:= MA(中间价,5);//求L个周期内中间价的平均价
买卖:=LLV(中间价的均价,10),colorgreen;
急买:IF(LLV((当前价<买卖),5),50,0),colorred;
短买:IF(LLV((当前价<买卖),10),50,0),colorwhite;
买点:IF(LLV((当前价<买卖),10),1,0);
卖点:IF(HHV((当前价<中间价最高值),10),1,0),coloryellow;
TD:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),5);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=(SUM(IF(((HD > 0) AND (HD > LD)),HD,0),5) );
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),5);
神偷线:=(((DMP ) * 100) / TD);
辅助线:=((DMM * 100) / TD);
动向趋势线:=(MA(((ABS((辅助线 - 神偷线)) / (辅助线 + 神偷线)) * 100),3));
ADXR:=((动向趋势线 + REF(动向趋势线,3)) / 2);
VAR1:=MA(LOW,1);
VAR2:=MA(HIGH,2);
VAR3:=MA(CLOSE,2);
VAR7:=REF(VAR3,1);
【强弱】:=((SMA(MAX((VAR3 - VAR7),0),5,1) / SMA(ABS((VAR3 - VAR7)),5,1)) * 100);
准备现金:( IF(((动向趋势线 > 88) AND (神偷线 < 5.8)),80,0)),LINETHICK3,COLORFF00FF;
底:10,DOTLINE,colorgreen;
顶:100,colorred;
中轴:50,colorwhite;
N:=5;
VAR1:4*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1),3.2,1),colorcyan,LINETHICK0;
VAR2:8,colorgreen,LINETHICK0;
准备拉升: IF(CROSS(VAR1,VAR2),80,0),STICK,COLOR0000CC,LINETHICK2;
庄家吸筹: IF(VAR1<=8,25,0),STICK,colorwhite,LINETHICK2;
RSV:=(CLOSE - LLV(LOW,18))/(HHV(HIGH,18) - LLV(LOW,18))*100;
K:ema(RSV,3);
D:EMA(K,3);
J:=(3*K-2*D);
火山:IF(J<=0,-J*5,0),LINETHICK0;
STICKLINE(J<=0,0,火山,2,0),colorred;



来函数检测结果如下:
该公式没有未来函数

解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图