- UID
- 2
- 积分
- 2892977
- 威望
- 1396520 布
- 龙e币
- 1496457 刀
- 在线时间
- 13326 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-26
|
一个大豆-豆粕的套利(大豆只做空,豆粕只做多),代码如下:
- DD:="AX09$CLOSE";
- DP:="M09$CLOSE";
- diff:=DD-DP;
- if strcmp(stklabel,\'M09\') = 0 then
- begin
- buy(diff>1200 and holding=0,1,limitr,C);
- sell(diff<=600,1,limitr,C);
- end
- if strcmp(stklabel,\'AX09\') = 0 then
- begin
- buyshort(diff>1200 and holding=0,1,limitr,C);
- sellshort(diff<=600,1,limitr,C);
- end
复制代码
|
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|