public static OOMigrationLib.Global.Option OptionToOptionNG(OptionsOracle.Core core, OOServerLib.Global.Option ol) { if (ol == null) { return(null); } OOMigrationLib.Global.Option om = new OOMigrationLib.Global.Option(); om.price.last = ol.price.last; om.price.change = ol.price.change; om.price.bid = ol.price.bid; om.price.ask = ol.price.ask; om.price.timevalue = ol.price.timevalue; om.volume.total = ol.volume.total; om.type = ol.type == "Call" ? OOMigrationLib.Global.Option.OptionT.Call : OOMigrationLib.Global.Option.OptionT.Put; om.underlying = ol.stock; om.symbol = ol.symbol; om.strike = ol.strike; om.expiration = ol.expiration; om.open_int = ol.open_int; om.update_timestamp = ol.update_timestamp; om.contract_size = ol.stocks_per_contract; om.currency = null; om.greeks = new OOMigrationLib.Global.Greeks(); om.greeks.delta = ol.greeks.delta; om.greeks.gamma = ol.greeks.gamma; om.greeks.theta = ol.greeks.theta; om.greeks.vega = ol.greeks.vega; om.greeks.time = ol.greeks.time; om.greeks.interest_rate = ol.greeks.interest; om.greeks.implied_volatility = ol.greeks.implied_volatility; om.greeks.dividend_rate = ol.greeks.dividend_rate; om.indicators = null; om.strike_index = 0; om.expiration_index = 0; return(om); }
// option data public void SetOption(OOMigrationLib.Global.Option option) { throw new Exception("Unsupported Method"); }