public FutureOptionMessage(string symbol, FutureMessage future, OptionSide side, float strikePrice) { Symbol = symbol; Future = future; Side = side; StrikePrice = strikePrice; }
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)); }
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) )); }
public FutureSpreadMessage(string symbol, FutureMessage spread1, FutureMessage spread2) { Symbol = symbol; Spread1 = spread1; Spread2 = spread2; }