Ejemplo n.º 1
0
 public SessionSignals(SessionIndicators sessionIndicators, Guid cacheId, bool cachingEnabled = true)
 {
     signals = new Dictionary <string, SessionSignal>();
     this.sessionIndicators = sessionIndicators;
     this.cacheId           = cacheId;
     this.cachingEnabled    = cachingEnabled;
 }
Ejemplo n.º 2
0
        public BacktestSession(Guid accountId, TickerType tickerType, string barDataFile, Guid cacheId, bool cachingEnabled = true)
        {
            this.accountId = accountId;

            this.tickerType      = tickerType;
            this.barDataFile     = barDataFile;
            this.sessionId       = Guid.NewGuid();
            indicators           = new SessionIndicators();
            signals              = new SessionSignals(indicators, cacheId, cachingEnabled);
            signals.EntrySignal += OnEntrySignal;
            signals.ExitSignal  += OnExitSignal;
            //strategies = new SessionStrategies(signals, indicators, cacheId, cachingEnabled);
            //strategies.EntryPosition += OnEntryStrategy;
            //strategies.ExitPosition += OnExitStrategy;
            this.cacheId        = cacheId;
            this.cachingEnabled = cachingEnabled;
        }