private void OnEmulationConnectorOnLookupSecuritiesResult(Exception exception, IEnumerable <Security> securities) { EmulationConnector.LookupSecuritiesResult -= OnEmulationConnectorOnLookupSecuritiesResult; // start strategy before emulation started OnEmulationStarting(); // start historical data loading when connection established successfully and all data subscribed EmulationConnector.Start(); }
private void TryStartNextBatch() { if (!_batches.MoveNext() || _cancelEmulation) { State = EmulationStates.Stopping; State = EmulationStates.Stopped; return; } _batch = _batches.Current.ToArray(); _currentBatch++; InitAdapters(_batch); EmulationConnector.Connect(); EmulationConnector.Start(EmulationSettings.StartTime, EmulationSettings.StopTime); }
public void StartEmulation() { if (EmulationConnector.State == EmulationStates.Suspended) { EmulationConnector.Start(); } else { if (!CanStart) { return; } CanStart = false; CreateEmulationSession(); _basketEmulation.Start(GetStrategies().ToEx(Strategies.Count)); } }