打印本文打印本文 关闭窗口关闭窗口

大豆-豆粕的套利(大豆只做空,豆粕只做多),

作者:未知 来源:本站原创 发布时间:2017年08月19日
: none; color: rgb(85,85,85); font-style: normal; widows: 1; letter-spacing: normal; line-height: 18px; background-color: rgb(246,249,251); text-indent: 0px; -webkit-text-stroke-width: 0px">一个大豆-豆粕的套利(大豆只做空,豆粕只做多),代码如下:: none; color: rgb(85,85,85); font-style: normal; widows: 1; letter-spacing: normal; line-height: 18px; background-color: rgb(246,249,251); text-indent: 0px; -webkit-text-stroke-width: 0px">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
打印本文打印本文 关闭窗口关闭窗口