heyue:=STRLEFT(stklabel ,2 );
dangyue:=strtonum(STRRIGHT(stklabel ,2));
xiayue:=if(dangyue<>12,dangyue+1,1);
dy:=if(dangyue<10,'0'+numtostr(dangyue,0),numtostr(dangyue,0));
xy:=if(xiayue<10,'0'+numtostr(xiayue,0),numtostr(xiayue,0));
duo:=tbuyholdingex('',strcat(heyue,dy),1);
kong:=tsellholdingex('',strcat(heyue,dy),1);
{drawtext(islastbar,h+4*mindiff,dy);
drawtext(islastbar,l-4*mindiff,xy);
drawtext(barpos=datacount-2,c,heyue);
drawtext(barpos=datacount-3,c,strcat(heyue,dy));
drawtext(barpos=datacount-4,c,strcat(heyue,xy));}
dy_vol_day:=callstock(strcat(heyue,dy),vtvol,6);
xy_vol_day:=callstock(strcat(heyue,xy),vtvol,6);
if xy_vol_day>dy_vol_day then begin
tsell(1,duo,mkt,0,0,'',strcat(heyue,dy));
tbuy(tbuyholding(1)=0,duo,mkt,0,0,'',strcat(heyue,xy));
end
if xy_vol_day>dy_vol_day then begin
tsellshort(1,kong,mkt,0,0,'',strcat(heyue,dy));
tbuyshort(tsellholding(1)=0,kong,mkt,0,0,'',strcat(heyue,xy));
end
补充说明一点,这个是要在具体合约上使用的,不能使用在连续合约也就是00合约上