Board logo

标题: [金字塔源码] 大豆-豆粕的套利(大豆只做空,豆粕只做多) [打印本页]

作者: 龙听    时间: 2018-9-30 13:24     标题: 大豆-豆粕的套利(大豆只做空,豆粕只做多)

一个大豆-豆粕的套利(大豆只做空,豆粕只做多),代码如下:

  1. DD:="AX09$CLOSE";
  2. DP:="M09$CLOSE";
  3. diff:=DD-DP;

  4. if strcmp(stklabel,\'M09\') = 0 then
  5. begin
  6. buy(diff>1200 and holding=0,1,limitr,C);
  7. sell(diff<=600,1,limitr,C);
  8. end

  9. if strcmp(stklabel,\'AX09\') = 0 then
  10. begin
  11. buyshort(diff>1200 and holding=0,1,limitr,C);
  12. sellshort(diff<=600,1,limitr,C);
  13. end
复制代码






欢迎光临 龙听期货论坛 (http://www.qhlt.cn/) Powered by Discuz! 7.2