/// <summary>
        /// Constructor.
        /// </summary>
        public YahooFinanceAdapter()
        {
            DataSourceStub stub = new DataSourceStub("Yahoo Finance Data Source", false);

            stub.Initialize(this);
            base.SetStub(stub);
        }
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public LiveDemoSource(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _sessionInformation = (RuntimeDataSessionInformation)info.GetValue("sessionInformation", typeof(RuntimeDataSessionInformation));
     _dataStub = (DataSourceStub)info.GetValue("dataStub", typeof(DataSourceStub));
     Construct();
 }
Esempio n. 3
0
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public LiveDemoSource(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _sessionInformation = (RuntimeDataSessionInformation)info.GetValue("sessionInformation", typeof(RuntimeDataSessionInformation));
     _dataStub           = (DataSourceStub)info.GetValue("dataStub", typeof(DataSourceStub));
     Construct();
 }
 /// <summary>
 /// Restore state.
 /// </summary>
 public YahooStockDataSource(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _filesFolder = info.GetString("filesFolder");
     _yahooStockSymbolsFileName = info.GetString("yahooStockSymbolsFileName");
     _dataSourceStub = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
     _dataSourceStub.Initialize(this);
 }
Esempio n. 5
0
 /// <summary>
 /// Restore state.
 /// </summary>
 public YahooStockDataSource(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _filesFolder = info.GetString("filesFolder");
     _yahooStockSymbolsFileName = info.GetString("yahooStockSymbolsFileName");
     _dataSourceStub            = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
     _dataSourceStub.Initialize(this);
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        public FXCMAdapter()
        {
            DataSourceStub dataSourceStub = new DataSourceStub("FXCM Adapter Data", true);
            OrderExecutionSourceStub orderExecutionSourceStub = new OrderExecutionSourceStub("FXCM Adapter Execution", true);

            base.SetInitialParameters(dataSourceStub, orderExecutionSourceStub);
            Construct();
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public LiveDemoDataAdapter()
        {
            DataSourceStub stub = new DataSourceStub("Live Demo Data Source", false);
            _sessionInformation = new RuntimeDataSessionInformation(new DataSessionInfo(Guid.NewGuid(), "DEMO150", new Symbol("Unknown", "DEMO10D15"), 10000, 4), _period);
            base.SetStub(stub);

            Construct();
        }
Esempio n. 8
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public LiveDemoDataAdapter()
        {
            DataSourceStub stub = new DataSourceStub("Live Demo Data Source", false);

            _sessionInformation = new RuntimeDataSessionInformation(new DataSessionInfo(Guid.NewGuid(), "DEMO150", new Symbol("Unknown", "DEMO10D15"), 10000, 4), _period);
            base.SetStub(stub);

            Construct();
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public FXCMAdapter()
        {
            _orderExecutionStub = new OrderExecutionSourceStub("FXCM Adapter Execution", false);
            _dataSourceStub = new DataSourceStub("FXCM Adapter Data", true);

            base.SetStub(_dataSourceStub);
            base.SetStub(_orderExecutionStub);

            Construct();
        }
Esempio n. 10
0
        /// <summary>
        ///
        /// </summary>
        public bool SetStub(DataSourceStub dataSourceStub)
        {
            if (_dataSourceStub != null)
            {
                return(false);
            }

            _dataSourceStub = dataSourceStub;

            return(true);
        }
Esempio n. 11
0
        /// <summary>
        ///
        /// </summary>
        public bool SetInitialParameters(DataSourceStub dataSourceStub, OrderExecutionSourceStub orderExecutionStub)
        {
            if (_dataSourceStub != null || _orderExecutionStub != null)
            {
                return(false);
            }

            _dataSourceStub     = dataSourceStub;
            _orderExecutionStub = orderExecutionStub;

            return(true);
        }
Esempio n. 12
0
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public StubIntegrationAdapter(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     try
     {
         _dataSourceStub     = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
         _orderExecutionStub = (OrderExecutionSourceStub)info.GetValue("orderSourceStub", typeof(OrderExecutionSourceStub));
     }
     catch (Exception ex)
     {
         SystemMonitor.OperationError("Failed to deserialize stub integration adapter", ex);
     }
 }
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public StubIntegrationAdapter(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     try
     {
         _dataSourceStub = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
         _orderExecutionStub = (OrderExecutionSourceStub)info.GetValue("orderSourceStub", typeof(OrderExecutionSourceStub));
     }
     catch (Exception ex)
     {
         SystemMonitor.OperationError("Failed to deserialize stub integration adapter", ex);
     }
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public LiveDemoSource()
 {
     _dataStub = new DataSourceStub(Name, false);
     _sessionInformation = new RuntimeDataSessionInformation(new DataSessionInfo(Guid.NewGuid(), "DEMO150", new Symbol("Unknown", "DEMO10D15"), 10000, 4), _period);
     Construct();
 }
        /// <summary>
        /// 
        /// </summary>
        public bool SetInitialParameters(DataSourceStub dataSourceStub, OrderExecutionSourceStub orderExecutionStub)
        {
            if (_dataSourceStub != null || _orderExecutionStub != null)
            {
                return false;
            }

            _dataSourceStub = dataSourceStub;
            _orderExecutionStub = orderExecutionStub;

            return true;
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 public YahooFinanceAdapter()
 {
     DataSourceStub stub = new DataSourceStub("Yahoo Finance Data Source", false);
     stub.Initialize(this);
     base.SetStub(stub);
 }
Esempio n. 17
0
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public IntegrationAdapter(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _dataSourceStub     = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
     _orderExecutionStub = (OrderExecutionSourceStub)info.GetValue("orderSourceStub", typeof(OrderExecutionSourceStub));
 }
        /// <summary>
        /// 
        /// </summary>
        public bool Initialize(DataSourceStub.IImplementation implementation)
        {
            _implementation = implementation;

            StatusSynchronizationSource = implementation;

            return true;
        }
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public IntegrationAdapter(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _dataSourceStub = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
     _orderExecutionStub = (OrderExecutionSourceStub)info.GetValue("orderSourceStub", typeof(OrderExecutionSourceStub));
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        public MBTradingAdapter()
            : base()
        {
            DataSourceStub dataSourceStub = new DataSourceStub("MBTrading Adapter Data", true);
            OrderExecutionSourceStub orderExecutionSourceStub = new OrderExecutionSourceStub("MBTrading Adapter Execution", false);

            base.SetStub(dataSourceStub);
            base.SetStub(orderExecutionSourceStub);

            Construct();
        }
Esempio n. 21
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public LiveDemoSource()
 {
     _dataStub           = new DataSourceStub(Name, false);
     _sessionInformation = new RuntimeDataSessionInformation(new DataSessionInfo(Guid.NewGuid(), "DEMO150", new Symbol("Unknown", "DEMO10D15"), 10000, 4), _period);
     Construct();
 }
 /// <summary>
 /// 
 /// </summary>
 public YahooStockDataSource()
 {
     _dataSourceStub = new DataSourceStub(this.Name, false);
     _dataSourceStub.Initialize(this);
 }
        /// <summary>
        /// 
        /// </summary>
        public bool SetStub(DataSourceStub dataSourceStub)
        {
            if (_dataSourceStub != null)
            {
                return false;
            }

            _dataSourceStub = dataSourceStub;

            return true;
        }
Esempio n. 24
0
 /// <summary>
 ///
 /// </summary>
 public YahooStockDataSource()
 {
     _dataSourceStub = new DataSourceStub(this.Name, false);
     _dataSourceStub.Initialize(this);
 }