//月 半月 周 日 叠加input:月(0,0,1),半月(0,0,1),周(0,0,1),日(0,0,1);T:=POW(10,ABS(LOG(MINDIFF)));BY:=MONTH;YB:=BY-REF(BY,1)<>0 OR BARPOS=1;w:=BARSLAST(YB),LINETHICK;dg:=w=0 or ISLASTBAR;wx:=0*C;for P=datacount-1 downto lbound(dg) doif dg[P] thenwx[P]:=0;elsewx[P]:=wx[P+1]+1;r:=BACKSET(ISLASTBAR,w+1)-ISLASTBAR;wx:=refx(wx,1)+r,LINETHICK;oo:=ref(o,w);zq1:=BARSLAST(ref(wx,1)=0 or BARPOS=1)+1;//月天数yt1:=if(zq1=1 and refx(zq1,2)=1,13,if(refx(zq1,1)=1 or zq1=1,7,14));YEK:=ROUND(OO*TBS)/TBS;YES:=ROUND(refx(c,wx)