这是通达信版本源码:
n1:=5;n2:=8;n3:=13;
lc:=ref(close,1);
rsi1:=sma(max(close-lc,0),n1,1)/sma(abs(close-lc),n1,1)*100,colorred,linethick2;
rsi2:=sma(max(close-lc,0),n2,1)/sma(abs(close-lc),n2,1)*100;
rsi3:=sma(max(close-lc,0),n3,1)/sma(abs(close-lc),n3,1)*100;
drawicon(cross(rsi1,20),20,23);
wlt11:=cross(rsi1,rsi2);
wlt22:=count(wlt11,20)=2;
drawicon(filter(wlt22 and rsi1<50,5),rsi2,23);
{drawicon(cross(rsi1,rsi2) and rsi1<50,rsi2,23);}
drawicon(cross(80,rsi1) and rsi1<ref(rsi1,1),80,15);
drawband(rsi1,rgb(255,50,50),rsi2,rgb(0,0,220));
stickline(cross(rsi1,20) and (cross(rsi1,rsi2) and rsi1<50),20,0,4,0 ),color000099;
stickline(cross(rsi1,20) and (cross(rsi1,rsi2) and rsi1<50),20,0,3,0 ),color0000bb;
stickline(cross(rsi1,20) and (cross(rsi1,rsi2) and rsi1<50),20,0,1.5,0 ),color0000dd;
stickline(cross(rsi1,20) and (cross(rsi1,rsi2) and rsi1<50),20,0,0.3,0 ),color0000ff;
var2:=(close-llv(low,20))/(hhv(high,20)-llv(low,20))*100;
var3:=sma(sma(var2,3,1),3,1)/28.57;
var4:=ema(var3,5);
操盘:=3*var3-2*var4;
d1:=cross(操盘,var3) and var3<2.1 and c>o;
stickline(d1,20,0,4,0),color008888;
stickline(d1,20,0,3,0),color00aaaa;
stickline(d1,20,0,2,0),color00cccc;
stickline(d1,20,0,1,0),color00eeee;
stickline(d1,20,0,0.3,0),color00ffff;
drawtext(d1,41,'全'),colorffffff;
drawtext(d1,35,'仓'),colorffffff;
n:=14;m:=6;
tr:=expmema(max(max(high-low,abs(high-ref(close,1))),abs(ref(close,1)-low)),n);
hd :=high-ref(high,1);
ld :=ref(low,1)-low;
dmp:=expmema(if(hd>0&&hd>ld,hd,0),n);
dmm:=expmema(if(ld>0&&ld>hd,ld,0),n);
pdi:=dmp*100/tr;
mdi:=dmm*100/tr;
adx: expmema(abs(mdi-pdi)/(mdi+pdi)*100,m);
adxr:expmema(adx,m);
drawband(adx,rgb(255,255,0),adxr,rgb(0,255,0));
主升:pdi,color0000ff,linethick2;
主跌:mdi,colorffffff,linethick2;
天:80,color00ff00,pointdot,linethick4;
地:20,colorff00ff,pointdot,linethick4;
tjj:=主升>20 and adx>adxr;
tj11:=主升>20 and adx<adxr;
tj22:=主升<=20 and adx>adxr;
tj33:=主升<=20 and adx<adxr;
stickline(tjj,主升,20,0.1,0),colorred;
stickline(tj11,主升,20,0.1,0),colordddd00;
stickline(tj22,主升,20,0.1,0),colordd00dd;
stickline(tj33,主升,20,0.1,0),color00dd00;
stickline(cross(adx,主跌) and 主跌<20 and adx>adxr,20,10,4,0),color990099;
stickline(cross(adx,主跌) and 主跌<20 and adx>adxr,20,10,2,0),colorbb00bb;
stickline(cross(adx,主跌) and 主跌<20 and adx>adxr,20,10,1,0),colordd00dd;
stickline(cross(adx,主跌) and 主跌<20 and adx>adxr,20,10,0.5,0),colordd00ff;
drawicon(cross(adx,adxr) and 主跌<20,20,23);
d2:=cross(adx,主跌) and 主跌<20 and adx>adxr;
d33:=count(d1 or d2,3)>=2;
d66:=d1 and d2;
drawicon(filter(d33,5),0,23);
drawicon(filter(d66,5),0,23);
飞狐源码:
{金山银山}
n1:=5;n2:=8;n3:=13;
lc:=ref(close,1);
rsi1:=sma(max(close-lc,0),n1,1)/sma(abs(close-lc),n1,1)*100,colorred,linethick2;
rsi2:=sma(max(close-lc,0),n2,1)/sma(abs(close-lc),n2,1)*100;
rsi3:=sma(max(close-lc,0),n3,1)/sma(abs(close-lc),n3,1)*100;
drawicon(cross(rsi1,20),20,23);
wlt11:=cross(rsi1,rsi2);
wlt22:=count(wlt11,20)=2;
drawicon(filter(wlt22 and rsi1<50,5),rsi2,23);
drawicon(cross(80,rsi1) and rsi1<ref(rsi1,1),80,15);
fillrgn(rsi1>rsi2,rsi1,rsi2),color0000ff;
fillrgn(rsi2>rsi1,rsi2,rsi1),colorffff00;
stickline(cross(rsi1,20) and (cross(rsi1,rsi2) and rsi1<50),20,0,8,0 ),color000099;
stickline(cross(rsi1,20) and (cross(rsi1,rsi2) and rsi1<50),20,0,6,0 ),color0000bb;
stickline(cross(rsi1,20) and (cross(rsi1,rsi2) and rsi1<50),20,0,3,0 ),color0000dd;
stickline(cross(rsi1,20) and (cross(rsi1,rsi2) and rsi1<50),20,0,1,0 ),color0000ff;
var2:=(close-llv(low,20))/(hhv(high,20)-llv(low,20))*100;
var3:=sma(sma(var2,3,1),3,1)/28.57;
var4:=ema(var3,5);
操盘:=3*var3-2*var4;
d1:=cross(操盘,var3) and var3<2.1 and c>o;
stickline(d1,20,0,8,0),color008888;
stickline(d1,20,0,6,0),color00aaaa;
stickline(d1,20,0,3,0),color00cccc;
stickline(d1,20,0,2,0),color00eeee;
stickline(d1,20,0,1,0),color00ffff;
drawtext(d1,41,'全'),colorffffff;
drawtext(d1,35,'仓'),colorffffff;
n:=14;
tr1:=sum(max(max(high-low,abs(high-ref(close,1))),abs(ref(close,1)-low)),n);
hd :=high-ref(high,1);
ld :=ref(low,1)-low;
dmp:=sum(if(hd>0&&hd>ld,hd,0),n);
dmm:=sum(if(ld>0&&ld>hd,ld,0),n);
pdi: dmp*100/tr1;
mdi: dmm*100/tr1;
m:=6;
adx: ma(abs(mdi-pdi)/(mdi+pdi)*100,m);
adxr:ma(adx,m);
fillrgn(adx>adxr,adx,adxr),color00ffff;
fillrgn(adxr>adx,adxr,adx),color00ff00;
主升:pdi,color0000ff,linethick2;
主跌:mdi,colorffffff,linethick2;
天:80,color00ff00,pointdot,linethick4;
地:20,colorff00ff,pointdot,linethick4;
tjj:=主升>20 and adx>adxr;
tj11:=主升>20 and adx<adxr;
tj22:=主升<=20 and adx>adxr;
tj33:=主升<=20 and adx<adxr;
stickline(tjj,主升,20,0.1,0),colorred;
stickline(tj11,主升,20,0.1,0),colordddd00;
stickline(tj22,主升,20,0.1,0),colordd00dd;
stickline(tj33,主升,20,0.1,0),color00dd00;
stickline(cross(adx,主跌) and 主跌<20 and adx>adxr,20,10,8,0),color990099;
stickline(cross(adx,主跌) and 主跌<20 and adx>adxr,20,10,4,0),colorbb00bb;
stickline(cross(adx,主跌) and 主跌<20 and adx>adxr,20,10,2,0),colordd00dd;
stickline(cross(adx,主跌) and 主跌<20 and adx>adxr,20,10,1,0),colordd00ff;
drawicon(cross(adx,adxr) and 主跌<20,20,23);
d2:=cross(adx,主跌) and 主跌<20 and adx>adxr;
d33:=count(d1 or d2,3)>=2;
d66:=d1 and d2;
drawicon(filter(d33,5),0,23);
drawicon(filter(d66,5),0,23);
上一指标公式:烧香拜佛指标公式详解 通达信拜佛
下一指标公式:价量线主线快线版指标公式详解 通达信快线通达信
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文金山银山指标公式详解 通达信金山仅供学习研究。