Esempio n. 1
0
 public SessionStrategies(SessionSignals sessionSignals, SessionIndicators sessionIndicators, Guid cacheId, bool cachingEnabled = true)
 {
     strategies             = new Dictionary <string, SessionStrategy>();
     this.sessionSignals    = sessionSignals;
     this.sessionIndicators = sessionIndicators;
     this.cacheId           = cacheId;
     this.cachingEnabled    = cachingEnabled;
 }
Esempio 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;
        }