Esempio n. 1
0
        public LiveTradeManager(IExchangeApi api, ITradingStrategy strategy, INotificationManager notificationManager, ILogger logger, TradeOptions settings, IDataStore dataStore)
        {
            _api          = api;
            _strategy     = strategy;
            _logger       = logger;
            _notification = notificationManager;
            _dataStore    = dataStore;
            _settings     = settings;

            if (_api == null)
            {
                throw new ArgumentException("Invalid exchange provided...");
            }
            if (_strategy == null)
            {
                throw new ArgumentException("Invalid strategy provided...");
            }
            if (_dataStore == null)
            {
                throw new ArgumentException("Invalid data store provided...");
            }
            if (_settings == null)
            {
                throw new ArgumentException("Invalid settings provided...");
            }
            if (_logger == null)
            {
                throw new ArgumentException("Invalid logger provided...");
            }
        }
Esempio n. 2
0
 public NotifyOnlyTradeManager(IExchangeApi api, ITradingStrategy strategy, INotificationManager notificationManager, string buyMessage, string sellMessage, ILogger logger, TradeOptions settings)
 {
     _api          = api;
     _strategy     = strategy;
     _logger       = logger;
     _notification = notificationManager;
     _buyMessage   = buyMessage;
     _sellMessage  = sellMessage;
     _settings     = settings;
 }