Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共6 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:换月模型程序编写

1楼
phone 发表于:2013/9/23 9:16:20
麻烦编写换月模型程序

1.当下月合约当日成交手数>当月合约当日成交手数

则全部多单平仓,并市价委托开下月合约同等数量的多单

空仓也一样。
2楼
jinzhe 发表于:2013/9/23 9:30:13
这个需要专业版,用户请出示专业版账号
3楼
phone 发表于:2013/9/23 9:32:40
专业版帐号已通知信息发给你了
[此贴子已经被作者于2013/9/23 9:34:01编辑过]
4楼
jinzhe 发表于:2013/9/23 9:43:11
处理中
5楼
jinzhe 发表于:2013/9/23 10:02:45

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

6楼
jinzhe 发表于:2013/9/23 11:13:46

补充说明一点,这个是要在具体合约上使用的,不能使用在连续合约也就是00合约上

共6 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01563 s, 3 queries.