示例#1
0
 public FutureOptionMessage(string symbol, FutureMessage future, OptionSide side, float strikePrice)
 {
     Symbol      = symbol;
     Future      = future;
     Side        = side;
     StrikePrice = strikePrice;
 }
示例#2
0
        public static FutureOptionMessage CreateFutureOptionMessage(string futureOptionSymbol)
        {
            var m           = Regex.Match(futureOptionSymbol, FutureOptionSymbolPattern);
            var future      = FutureMessage.CreateFutureMessage(m.Groups[FutureSymbolComponent].Value);
            var optionSide  = m.Groups[FutureOptionSideComponent].Value == "C" ? OptionSide.Call : OptionSide.Put;
            var strikePrice = float.Parse(m.Groups[FutureOptionStrikePriceComponent].Value) / 100f;

            return(new FutureOptionMessage(futureOptionSymbol, future, optionSide, strikePrice));
        }
示例#3
0
        public static FutureSpreadMessage CreateFutureSpreadMessage(string futureSpreadSymbol)
        {
            var m             = Regex.Match(futureSpreadSymbol, FutureSpreadSymbolPattern);
            var futureSymbol1 = m.Groups[FutureSymbol1Component].Value;
            var futureSymbol2 = m.Groups[FutureSymbol2Component].Value;

            return(new FutureSpreadMessage(
                       futureSpreadSymbol,
                       FutureMessage.CreateFutureMessage(futureSymbol1),
                       FutureMessage.CreateFutureMessage(futureSymbol2)
                       ));
        }
示例#4
0
 public FutureSpreadMessage(string symbol, FutureMessage spread1, FutureMessage spread2)
 {
     Symbol  = symbol;
     Spread1 = spread1;
     Spread2 = spread2;
 }