Exemple #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="callInstrumentID"></param>
 /// <param name="positionVolume"></param>
 /// <param name="parityInterval"></param>
 /// <param name="averagePrice"></param>
 public Vertical(string callInstrumentID, EnumPosiDirectionType callDirection, string putInstrumentID, EnumPosiDirectionType putDirection, double parityInterval)
 {
     this.callInstrumentID = callInstrumentID;
     this.callDirection = callDirection;
     this.putInstrumentID = putInstrumentID;
     this.putDirection = putDirection;
     this.parityInterval = parityInterval;
 }
Exemple #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="callInstrumentID"></param>
 /// <param name="positionVolume"></param>
 /// <param name="parityInterval"></param>
 /// <param name="averagePrice"></param>
 public Parity(string callInstrumentID, EnumPosiDirectionType callDirection, string putInstrumentID, EnumPosiDirectionType putDirection, 
     double parityInterval, double openThreshold, double closeThreshold, double maxOpenSets, double openedSets)
 {
     this.Tag = this;
     string[] callStrTemp = callInstrumentID.Split('-');
     this.longOption.InstrumentID = callInstrumentID;
     this.longOption.StrikePrice = double.Parse(callStrTemp[2]);
     this.longOption.OptionType = callStrTemp[1] == "C" ? OptionTypeEnum.call : OptionTypeEnum.put;
     this.callDirection = callDirection;
     //this.future.InstrumentID = callStrTemp[0];
     string[] putStrTemp = putInstrumentID.Split('-');
     this.shortOption.InstrumentID = putInstrumentID;
     this.shortOption.StrikePrice = double.Parse(putStrTemp[2]);
     this.shortOption.OptionType = putStrTemp[1] == "C" ? OptionTypeEnum.call : OptionTypeEnum.put;
     this.putDirection = putDirection;
     this.parityInterval = parityInterval;
     this.openThreshold = openThreshold;
     this.closeThreshold = closeThreshold;
     this.maxOpenSets = maxOpenSets;
     this.openedSets = openedSets;
 }