编写要求:
公式在线网解答:
网友求助:
公式源码:
a0:=BARSCOUNT(c);a3:=SYSPARAM(3);a2:=SYSPARAM(2);a4:=SYSPARAM(4);
a5:=SYSPARAM(5);nn0:=a3-a2;nn:=a0-a2;hh1:=(a4-a5)/10;
y0:=a0>=a2;vv0:=if(y0=1 and SYSPARAM(1)>=a0,v,0);
c1:=if(BETWEEN(c,a4-0*hh1,a4-1*hh1),vv0,0);
c2:=if(BETWEEN(c,a4-1*hh1,a4-2*hh1),vv0,0);
c3:=if(BETWEEN(c,a4-2*hh1,a4-3*hh1),vv0,0);
c4:=if(BETWEEN(c,a4-3*hh1,a4-4*hh1),vv0,0);
c5:=if(BETWEEN(c,a4-4*hh1,a4-5*hh1),vv0,0);
c6:=if(BETWEEN(c,a4-5*hh1,a4-6*hh1),vv0,0);
c7:=if(BETWEEN(c,a4-6*hh1,a4-7*hh1),vv0,0);
c8:=if(BETWEEN(c,a4-7*hh1,a4-8*hh1),vv0,0);
c9:=if(BETWEEN(c,a4-8*hh1,a4-9*hh1),vv0,0);
c10:=if(BETWEEN(c,a4-9*hh1,a4-10*hh1),vv0,0);
v1:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c1,nn0),0),2));
v2:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c2,nn0),0),2));
v3:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c3,nn0),0),2));
v4:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c4,nn0),0),2));
v5:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c5,nn0),0),2));
v6:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c6,nn0),0),2));
v7:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c7,nn0),0),2));
v8:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c8,nn0),0),2));
v9:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c9,nn0),0),2));
v10:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c10,nn0),0),2));
av0:=max(v1,max(v2,max(v3,max(v4,max(v5,max(v6,max(v7,max(v8,max(v9,v10)))))))));
x1:=v1/av0>=nn/nn0 and nn>=0;x2:=v2/av0>=nn/nn0 and nn>=0;
x3:=v3/av0>=nn/nn0 and nn>=0;x4:=v4/av0>=nn/nn0 and nn>=0;
x5:=v5/av0>=nn/nn0 and nn>=0;x6:=v6/av0>=nn/nn0 and nn>=0;
x7:=v7/av0>=nn/nn0 and nn>=0;x8:=v8/av0>=nn/nn0 and nn>=0;
FILLRGN(v1/av0>=nn/nn0 and nn>=0,a4-0*hh1,a4-1*hh1+0.05),colorgray;
FILLRGN(v2/av0>=nn/nn0 and nn>=0,a4-1*hh1,a4-2*hh1+0.05),colorgray;
FILLRGN(v3/av0>=nn/nn0 and nn>=0,a4-2*hh1,a4-3*hh1+0.05),colorgray;
FILLRGN(v4/av0>=nn/nn0 and nn>=0,a4-3*hh1,a4-4*hh1+0.05),colorgray;
FILLRGN(v5/av0>=nn/nn0 and nn>=0,a4-4*hh1,a4-5*hh1+0.05),colorgray;
FILLRGN(v6/av0>=nn/nn0 and nn>=0,a4-5*hh1,a4-6*hh1+0.05),colorgray;
FILLRGN(v7/av0>=nn/nn0 and nn>=0,a4-6*hh1,a4-7*hh1+0.05),colorgray;
FILLRGN(v8/av0>=nn/nn0 and nn>=0,a4-7*hh1,a4-8*hh1+0.05),colorgray;
FILLRGN(v9/av0>=nn/nn0 and nn>=0,a4-8*hh1,a4-9*hh1+0.05),colorgray;
FILLRGN(v10/av0>=nn/nn0 and nn>=0,a4-9*hh1,a4-10*hh1+0.05),colorgray;
KLINE(o,h,l,c,0);
下面的图例是另一个指标筹码峰指标的截图,希望老师们、高手们,帮我将上面源码公式的效果,改成下面一样。
x1:=v1/av0>=nn/nn0 and nn>=0;x2:=v2/av0>=nn/nn0 and nn>=0;
x3:=v3/av0>=nn/nn0 and nn>=0;x4:=v4/av0>=nn/nn0 and nn>=0;
x5:=v5/av0>=nn/nn0 and nn>=0;x6:=v6/av0>=nn/nn0 and nn>=0;
x7:=v7/av0>=nn/nn0 and nn>=0;x8:=v8/av0>=nn/nn0 and nn>=0;
x9:=v9/av0>=nn/nn0 and nn>=0;x10:=v10/av0>=nn/nn0 and nn>=0;
FILLRGN(v1/av0>=nn/nn0 and nn>=0,a4-0*hh1,a4-1*hh1+0.05),colorgray;
FILLRGN(v2/av0>=nn/nn0 and nn>=0,a4-1*hh1,a4-2*hh1+0.05),colorgray;
FILLRGN(v3/av0>=nn/nn0 and nn>=0,a4-2*hh1,a4-3*hh1+0.05),colorgray;
FILLRGN(v4/av0>=nn/nn0 and nn>=0,a4-3*hh1,a4-4*hh1+0.05),colorgray;
FILLRGN(v5/av0>=nn/nn0 and nn>=0,a4-4*hh1,a4-5*hh1+0.05),colorgray;
FILLRGN(v6/av0>=nn/nn0 and nn>=0,a4-5*hh1,a4-6*hh1+0.05),colorgray;
FILLRGN(v7/av0>=nn/nn0 and nn>=0,a4-6*hh1,a4-7*hh1+0.05),colorgray;
FILLRGN(v8/av0>=nn/nn0 and nn>=0,a4-7*hh1,a4-8*hh1+0.05),colorgray;
FILLRGN(v9/av0>=nn/nn0 and nn>=0,a4-8*hh1,a4-9*hh1+0.05),colorgray;
FILLRGN(v10/av0>=nn/nn0 and nn>=0,a4-9*hh1,a4-10*hh1+0.05),colorgray;
KLINE(o,h,l,c,0);
drawnumber(x1 and refx(x1,1)=0 or x1*islastbar,a4-0*hh1,a4-1*hh1+0.05,2),colorwhite;
drawnumber(x2 and refx(x2,1)=0 or x2*islastbar,a4-1*hh1,a4-2*hh1+0.05,2),colorwhite;
drawnumber(x3 and refx(x3,1)=0 or x3*islastbar,a4-2*hh1,a4-3*hh1+0.05,2),colorwhite;
drawnumber(x4 and refx(x4,1)=0 or x4*islastbar,a4-3*hh1,a4-4*hh1+0.05,2),colorwhite;
drawnumber(x5 and refx(x5,1)=0 or x5*islastbar,a4-4*hh1,a4-5*hh1+0.05,2),colorwhite;
drawnumber(x6 and refx(x6,1)=0 or x5*islastbar,a4-5*hh1,a4-6*hh1+0.05,2),colorwhite;
drawnumber(x7 and refx(x7,1)=0 or x6*islastbar,a4-6*hh1,a4-7*hh1+0.05,2),colorwhite;
drawnumber(x8 and refx(x8,1)=0 or x7*islastbar,a4-7*hh1,a4-8*hh1+0.05,2),colorwhite;
drawnumber(x9 and refx(x9,1)=0 or x8*islastbar,a4-8*hh1,a4-9*hh1+0.05,2),colorwhite;
drawnumber(x10 and refx(x10,1)=0 or x9*islastbar,a4-9*hh1,a4-10*hh1+0.05,2),colorwhite;