--
input:最高成本(6);
input:收益目标(1);
input:开仓组数(1);
input:开仓价格偏移(20);
////选用期权(卖出低执行价看跌期权合约,同时卖出高执行价看涨期权合约,建议选择活跃期权合约)
NO1_option:=\'10001889\';///看涨期权(高执行价)
NO2_option:=\'10001894\';///看跌期权(低执行价)
/////看涨期权的执行价格高于看跌期权的执行价格,如果是卖出跨式套利,两个期权合约的strike需要一致
NO1_option_strike:=2.45;
NO2_option_strike:=2.35;
qq_account1:=\'1000000\';
NO1_option_ask:=DYNAINFO2(34,NO1_option);
NO1_option_bid:=DYNAINFO2(28,NO1_option);
NO1_option_zt:=DYNAINFO2(54,NO1_option);
NO1_option_dt:=DYNAINFO2(55,NO1_option);
NO2_option_ask:=DYNAINFO2(34,NO2_option);
NO2_option_bid:=DYNAINFO2(28,NO2_option);
NO2_option_zt:=DYNAINFO2(54,NO2_option);
NO2_option_dt:=DYNAINFO2(55,NO2_option);
/////构建买入宽跨式套利价差成本
卖出宽跨式入场成本:=NO1_option_bid+NO2_option_bid;
卖出宽跨式离场:=NO1_option_ask+NO2_option_ask;
if 卖出宽跨式入场成本>最高成本 and EXTGBDATA(\'卖出宽跨式入场\')=0 and DYNAINFO(207)<=145655 and DYNAINFO(207)>090000 and DYNAINFO2(29,NO1_option)>0 and DYNAINFO2(29,NO2_option)>0 then begin
TBUYSHORT(1,开仓组数,lmt,max(NO1_option_bid-开仓价格偏移*mindiff,NO1_option_dt),0,qq_account1,NO1_option);
TBUYSHORT(1,开仓组数,lmt,max(NO2_option_bid-开仓价格偏移*mindiff,NO2_option_dt),0,qq_account1,NO2_option);
EXTGBDATASET(\'卖出宽跨式入场\',1);
end
if 卖出宽跨式离场<最高成本-收益目标 and EXTGBDATA(\'卖出宽跨式入场\')=1 and DYNAINFO(207)<=145655 and DYNAINFO(207)>090000 and DYNAINFO2(35,NO1_option)>0 and DYNAINFO2(35,NO2_option)>0 then begin
TSELLSHORT(1,开仓组数,lmt,min(NO1_option_ask+开仓价格偏移*mindiff,NO1_option_zt),0,qq_account1,NO1_option);
TSELLSHORT(1,开仓组数,lmt,min(NO2_option_ask+开仓价格偏移*mindiff,NO2_option_zt),0,qq_account1,NO2_option);
EXTGBDATASET(\'卖出宽跨式入场\',0);
end
这个程序怎么运行?最高成本6是啥意思?NO1_option_ask:=DYNAINFO2(34,NO1_option);读出的价格是0.0177