public static OOMigrationLib.Global.Quote QuoteToQuoteNG(OptionsOracle.Core core, OOServerLib.Global.Quote ql) { if (ql == null) { return(null); } OOMigrationLib.Global.Quote qm = new OOMigrationLib.Global.Quote(); qm.price.last = ql.price.last; qm.price.change = ql.price.change; qm.price.open = ql.price.open; qm.price.low = ql.price.low; qm.price.high = ql.price.high; qm.price.bid = ql.price.bid; qm.price.ask = ql.price.ask; qm.volume.total = ql.volume.total; qm.general.dividend_rate = ql.general.dividend_rate; qm.general.dividend_list = null; qm.volatility.actual = core.StockImpliedVolatility; qm.volatility.implied = core.StockImpliedVolatility; qm.volatility.historical = core.StockImpliedVolatility; qm.underlying = ql.stock; qm.name = ql.name; qm.update_timestamp = ql.update_timestamp; qm.currency = null; qm.interest_rate = Config.Local.FederalIterest * 0.01; return(qm); }
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); }
public static OOMigrationLib.Global.Greeks GreeksToGreeksNG(OptionsOracle.Core core, OOServerLib.Global.Greeks gl) { if (gl == null) { return(null); } OOMigrationLib.Global.Greeks gm = new OOMigrationLib.Global.Greeks(); gm.delta = gl.delta; gm.dividend_rate = gl.dividend_rate; gm.gamma = gl.gamma; gm.implied_volatility = gl.implied_volatility; gm.interest_rate = gl.interest; gm.theta = gl.theta; gm.time = gl.time; gm.vega = gl.vega; return(gm); }
public static List <double> DoubleListToDoubleListNG(OptionsOracle.Core core, ArrayList ll) { if (ll == null) { return(null); } List <double> lm = new List <double>(); if (ll.Count == 0) { return(lm); } foreach (double ol in ll) { lm.Add(ol); } return(lm); }
public static List <OOMigrationLib.Global.Option> OptionListToOptionListNG(OptionsOracle.Core core, ArrayList ll) { if (ll == null) { return(null); } List <OOMigrationLib.Global.Option> lm = new List <OOMigrationLib.Global.Option>(); if (ll.Count == 0) { return(lm); } foreach (OOServerLib.Global.Option ol in ll) { lm.Add(Convert.OptionToOptionNG(core, ol)); } return(lm); }
public Strategy(OptionsOracle.Core core) { this.core = core; }
public Market(OptionsOracle.Core core) { this.core = core; }
public Core(OptionsOracle.Core core) { market = new Market(core); strategy = new Strategy(core); analysis = new StrategyAnalysis(core); }
public StrategyAnalysis(OptionsOracle.Core core) { this.core = core; }