OK,收到,以后注意
不好意思,我的回复是:比如白银连续就是当前交割月后的第一个交易合约,白银连三就是当前交割月后的第三个交易合约,我如果想画一条收盘价的曲线该怎么写,谢谢
runmode:0;
v0:=callstock('ag00',vtvol,6);
v1:=callstock('ag01',vtvol,6);
v2:=callstock('ag02',vtvol,6);
v3:=callstock('ag03',vtvol,6);
v4:=callstock('ag04',vtvol,6);
v5:=callstock('ag05',vtvol,6);
v6:=callstock('ag06',vtvol,6);
v7:=callstock('ag07',vtvol,6);
v8:=callstock('ag08',vtvol,6);
v9:=callstock('ag09',vtvol,6);
v10:=callstock('ag10',vtvol,6);
v11:=callstock('ag11',vtvol,6);
v12:=callstock('ag12',vtvol,6);
nn:=if(v0=v1,01,if(v0=v2,02,if(v0=v3,03,if(v0=v4,04,if(v0=v5,05,if(v0=v6,06,if(v0=v7,07,if(v0=v8,08,if(v0=v9,09,if(v0=v10,10,if(v0=v11,11,12)))))))))));
kk1:=if(nn+3<=12,nn+3,nn+3-12);
kk2:=rounds(kk1,0);
nn1:=if(kk2<=9,STRCat('0',numtostr(kk2,0)),numtostr(kk2,0));
白银连三:callstock('ag'+nn1,vtclose,datatype);
runmode:0;
v0:=callstock('ag00',vtvol,6);
v1:=callstock('ag01',vtvol,6);
v2:=callstock('ag02',vtvol,6);
v3:=callstock('ag03',vtvol,6);
v4:=callstock('ag04',vtvol,6);
v5:=callstock('ag05',vtvol,6);
v6:=callstock('ag06',vtvol,6);
v7:=callstock('ag07',vtvol,6);
v8:=callstock('ag08',vtvol,6);
v9:=callstock('ag09',vtvol,6);
v10:=callstock('ag10',vtvol,6);
v11:=callstock('ag11',vtvol,6);
v12:=callstock('ag12',vtvol,6);
nn:=if(v0=v1,01,if(v0=v2,02,if(v0=v3,03,if(v0=v4,04,if(v0=v5,05,if(v0=v6,06,if(v0=v7,07,if(v0=v8,08,if(v0=v9,09,if(v0=v10,10,if(v0=v11,11,12)))))))))));
kk1:=if(nn+3<=12,nn+3,nn+3-12);
kk2:=rounds(kk1,0);
nn1:=if(kk2<=9,STRCat('0',numtostr(kk2,0)),numtostr(kk2,0));
白银连三:callstock('ag'+nn1,vtclose,datatype);
谢谢老师,受用