/// <summary> /// /// </summary> public AnalyzerSession(SessionInfo sessionInfo) { _sessionInfo = sessionInfo; symbol = AppUtil.ParseSymbol(sessionInfo.Symbol); }
public static void AddAvailableSession(string symbol) { SessionInfo info = new SessionInfo(symbol, symbol, Guid.NewGuid(), TimeSpan.FromMinutes(30), 100000, 2); if(!availableSessionList.Contains(info)) availableSessionList.Add( info); }
public AnalyzerSession CreateSimulationSession( SessionInfo sessionInfo) { AnalyzerSession session = new AnalyzerSession(sessionInfo); DataProvider dataProvider = null; lock (this) { if (AppContext.FirstDataProvider != null) { dataProvider = AppContext.FirstDataProvider; // new DataProvider(sessionInfo.Symbol); dataProvider.Run(); } else { dataProvider = new DataProvider(sessionInfo.Symbol); dataProvider.Init(); } session.Initialize(dataProvider); _existingSessions.Add(session); } // comment by Harry //GeneralHelper.SafeEventRaise(SessionsUpdateEvent, this); return session; }
void UpdateAvailableSourceSessions() { string current = Directory.GetCurrentDirectory(); Console.WriteLine(" XXXXXXXXXXXXXX file >>>>>>>>> " + current ); foreach (string symbol in Enum.GetNames(Symbol.AUDJPY.GetType())) { SessionInfo info = new SessionInfo(symbol , symbol, Guid.NewGuid(), TimeSpan.FromMinutes(30) , 100000, 2); this.AddSession(info); } }
private void AddSessionInfo(SessionInfo info) { availableSessionList.Add(info); }
protected void RemoveSession(SessionInfo sessionInfo) { sessionList.Remove(sessionInfo); }
protected void AddSession(SessionInfo sessionInfo) { sessionList.Add(sessionInfo); }
Type[] GetCompatibleSimulationOrderExecutionSources(SessionInfo dataProviderSession) { List<Type> types = ReflectionHelper.GatherTypeChildrenTypesFromAssemblies(typeof(LocalOrderExecutionProvider), ReflectionHelper.GetApplicationEntryAssemblyReferencedAssemblies()); types.Add(typeof(LocalOrderExecutionProvider)); return types.ToArray(); }