internal void qZcLyn7Uf(double obj0, FreeQuant.Instruments.Currency obj1, DateTime obj2, string obj3) { this.portfolio.Account.Withdraw(obj0, obj1, obj2, obj3); foreach (Portfolio portfolio in this.portfolios.Values) { portfolio.Account.Withdraw(obj0, obj1, obj2, obj3); } }
internal void cXaFP441d(double obj0, FreeQuant.Instruments.Currency obj1, DateTime obj2, string obj3) { this.portfolio.Account.Deposit(obj0, obj1, obj2, obj3); foreach (Portfolio portfolio in this.portfolios.Values) { portfolio.Account.Deposit(obj0, obj1, obj2, obj3); } }
public SimulationManager() : base() { this.Mode = SimulationMode.MaxSpeed; this.SpeedMultiplier = 1.0; this.Step = 86400; this.EntryDate = new DateTime(1970, 1, 1); this.ExitDate = DateTime.Today; this.Cash = 10000.0; this.Currency = CurrencyManager.DefaultCurrency; this.requests = new RequestList(); this.staticRequests = new RequestList(); }
public override double Convert(double amount, FreeQuant.Instruments.Currency fromCurrency, FreeQuant.Instruments.Currency toCurrency) { if (fromCurrency == toCurrency) return amount; Instrument instrument1 = InstrumentManager.Instruments[fromCurrency.Code + "_" + toCurrency.Code]; if (instrument1 != null) return amount * this.GetAmount(instrument1, amount); Instrument instrument2 = InstrumentManager.Instruments[toCurrency.Code + "_" + fromCurrency.Code]; if (instrument2 == null) return amount; else return amount / this.GetAmount(instrument2, amount); }
private static void nf3XP7Xf3(SingleOrder obj0, DateTime obj1, double obj2, double obj3) { if (obj0.LastQty <= 0.0 || obj0.Portfolio == null) { return; } Transaction transaction = new Transaction(); transaction.DateTime = obj1; transaction.ClOrdID = obj0.ClOrdID; transaction.Instrument = obj0.Instrument; transaction.Side = obj0.Side; transaction.Price = obj2; transaction.Qty = obj3; transaction.Strategy = obj0.Strategy; transaction.Text = obj0.Text; FreeQuant.Instruments.Currency currency = (CurrencyManager.Currencies[obj0.Currency] ?? CurrencyManager.Currencies[obj0.Instrument.Currency]) ?? CurrencyManager.DefaultCurrency; transaction.Currency = currency; transaction.TransactionCost.Set(CommType.Absolute, obj0.Commission); obj0.Portfolio.Add(transaction); }
public void Withdraw(string currencyCode, double value, DateTime dateTime, string text) { FreeQuant.Instruments.Currency currency = CurrencyManager.Currencies[currencyCode]; this.account.Withdraw(value, currency, dateTime, text); }
public void Withdraw(string currencyCode, double value) { FreeQuant.Instruments.Currency currency = CurrencyManager.Currencies[currencyCode]; this.account.Withdraw(value, currency); }
public void Deposit(string currencyCode, double value, DateTime dateTime) { FreeQuant.Instruments.Currency currency = CurrencyManager.Currencies[currencyCode]; this.account.Deposit(value, currency, dateTime); }