源代码:
n = input(title="K周期", type="number", value=9);
m = input(title="D周期", type="number", value=3);
lowv=llv(low,n);
highv=hhv(high,n);
rsv=ema((close-lowv)/(highv-lowv)*100,m);
k=ema(rsv,m);
d=ma(k,m);
draw(k, title="K", color="#F9EE30", showpricevalue=true, showtitle=true, linewidth=1.2,transp=1);
draw(d, title="D", color="#E748B9", showpricevalue=true, showtitle=true, linewidth=1.2, transp=1);