Java & Ruby
2024-06-17 02:30:49
最佳回答
给你一个参考吧,可能不完全符合你的要求,有图片演示在下面网址里.pjj:=dma((h + l + c * 2) / 4,0.9);jj:=ref(ema(pjj,3),1);qjj:=vol / ((h - l) * 2 - abs(c - o));xvl:=if(c > o,qjj * (h - l),if(c < o,qjj * (h - o + (c - l)),vol / 2)) +if(c > o,0 - qjj * (h - c + (o - l)),if(c < o,0 - qjj * (h - l),0 - vol / 2));hsl:=xvl / 20 / 1.15;攻击流量:=hsl * 0.55 + ref(hsl,1) * 0.33 + ref(hsl,2) * 0.22;gjj:=ema(攻击流量,8);lljx:=ema(攻击流量,3);流量:lljx,colorc875b7,linethick0;流量基线:gjj,color00bbbb,linethick0;stickline(流量 > 0,流量*1000,0,7,0),colorred;stickline(流量 < 0,流量*1000,0,7,0),colorff4242;stickline(hsl * 0.4 >= 0,hsl * 0.4 * 1.5*1000,0,0,1),coloryellow;stickline(hsl * 0.4 < 0,hsl * 0.4 * 1.5*1000,0,0,1),colorgreen;力度:hsl/1000,color9b37ff,linethick0;zjll:=ref(lljx,1);qzjj:=(((lljx - zjll) / zjll) * 100);流量幅:if(((lljx > 0) and (zjll < 0)),abs(qzjj),if((((lljx < 0) and (zjll < 0)) and (lljx < zjll)),(0 - qzjj),qzjj)),linethick0,colorwhite;周流量:sum(lljx,5),colorffbfdf,linethick0;bb:=ref(周流量,1);zqzjj:=(周流量-bb) *100;周幅:if(周流量>0 and bb<0,abs(zqzjj),if(周流量<0 and bb<0 and 周流量<bb,-zqzjj,zqzjj)),colorwhite,linethick0;输出:gjj*1000,color00bbbb,linethick0; 20210311