马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
546.问:
谁能给我个周K线副图指标,原码
答(xkl):
{周KDJ}
周K:ma("kdj.k#week",5);
周D:ma("kdj.d#week",5);
周J:ma("kdj.j#week",5),colorgreen;
STICKLINE(周K>=周D,周D,周K,5,0) COLORmagenta;
STICKLINE(周K<周D,周K,周D,5,0) COLORff9999;
547.问:
当日最高的指标值,是N天内的最高值?
当日最低的指标值,是N天内的最低值?
就以RSI为例
答(懒汉):
i:=ref(c,1);
s:=5*ref(sma(max(c-i,0),6,1),1);
e:=5*ref(sma(abs(c-i),6,1),1);
Rc:sma(max(c-i,0),6,1)/sma(abs(c-i),6,1)*100;
rh max(h-i,0)+s)/(abs(h-i)+e)*100;
rh=hhv(rh,N);
或许
rh=hhv(rc,N);
548.问:
制作一个K线公式,使它在0与此100之间摆动。
答(懒汉):
0;50;100;
b:=100/(SYSPARAM(4)-SYSPARAM(5));
y:=(SYSPARAM(4)+SYSPARAM(5))*b/2-50;
fc:=c-ref(c,1);
STICKLINE(o<c or (o=c and fc>0),L*b-y,h*b-y,0.1,0),COLORRED;
STICKLINE(o<c or (o=c and fc>0),o*b-y,c*b-y,6,1),COLORRED;
STICKLINE(o>c or (o=c and fc<0),L*b-y,h*b-y,0.1,0),COLORCYAN;
STICKLINE(o>c or (o=c and fc<0),o*b-y,c*b-y,6,0),COLORCYAN;
549.问:
帮我写一段指标,飞狐用,一月换手率,三月换手率,流通盘,每股收益.副图用的
答(懒汉):
t:=barslast(day<ref(day,1));
hs1:sum(v,t)/capital*100;
hs3:sum(v,sumbars(t=0,3))/capital*100;
LtP:capital/100;//万股
sy:FINANCE(33);
550.问:
30日均线向上变色怎样编写?
答(馨芸):
partline(Slope(ma(c,30),2)>0,ma(c,30)),colorred;
partline(Slope(ma(c,30),2)<0,ma(c,30)),colorgreen;
也可以
partline(ma(c,30) >=ref(ma(c,30),1),ma(c,30)),colorred;
partline(ma(c,30) <ref(ma(c,30),1),ma(c,30)),colorgreen;
|