Esempio n. 1
0
        public override void Init()
        {
            instrument1 = InstrumentsManager.Current;

            if (instrument2 == null || instrument1 == null)
            {
                return;
            }

            var timeRequest = HistoryDataSeries.HistoricalRequest as TimeHistoricalRequest;

            if (timeRequest == null)
            {
                return;
            }

            var dataType = timeRequest.DataType;

            InstrumentsManager.Subscribe(instrument1, dataType == DataType.Trade ? QuoteTypes.Trade : QuoteTypes.Quote);
            InstrumentsManager.Subscribe(instrument2, dataType == DataType.Trade ? QuoteTypes.Trade : QuoteTypes.Quote);

            InstrumentsManager.OnBBO       += InstrumentsManager_OnBBO;
            InstrumentsManager.OnTrades    += InstrumentsManager_OnTrades;
            HistoricalDataManager.OnLoaded += HistoricalDataManager_OnLoaded;
        }
Esempio n. 2
0
 private void InitializeAviationControls()
 {
     instrumentsManager = new InstrumentsManager(droneControl);
     //instrumentsManager.addInstrument(this.attitudeControl);
     //instrumentsManager.addInstrument(this.altimeterControl);
     //instrumentsManager.addInstrument(this.headingControl);
     instrumentsManager.startManage();
 }
Esempio n. 3
0
        public void GetForexPairs__get_major_pairs()
        {
            InstrumentsManager im = new InstrumentsManager();

            IEnumerable <string> majorList = im.GetForexPairs(ForexTypes.major);

            Assert.AreEqual(7, majorList.Count());
        }
        public void ObtenerControlador()
        {
            InstrumentsManager c1 = InstrumentsManager.Instance;
            InstrumentsManager c2 = InstrumentsManager.Instance;
            InstrumentsManager c3 = InstrumentsManager.Instance;

            Assert.AreSame(c1, c2);
            Assert.AreSame(c2, c3);
        }
Esempio n. 5
0
    void Awake()
    {
        if (!mInstance)
        {
            mInstance = this;
        }

        lanesManager       = GetComponent <LanesManager> ();
        instrumentsManager = GetComponent <InstrumentsManager> ();

        lanesManager.Init();
    }
Esempio n. 6
0
        public override void Complete()
        {
            if (instrument2 == null || instrument1 == null)
            {
                return;
            }

            InstrumentsManager.OnBBO    -= InstrumentsManager_OnBBO;
            InstrumentsManager.OnTrades -= InstrumentsManager_OnTrades;

            var dataType = HistoryDataSeries.HistoricalRequest.DataType;

            InstrumentsManager.UnSubscribe(instrument1, dataType == DataType.Trade ? QuoteTypes.Trade : QuoteTypes.Quote);
            InstrumentsManager.UnSubscribe(instrument2, dataType == DataType.Trade ? QuoteTypes.Trade : QuoteTypes.Quote);

            HistoricalDataManager.OnLoaded -= HistoricalDataManager_OnLoaded;
        }
Esempio n. 7
0
        public NewChartDialog()
        {
            InitializeComponent();

            comboBox_timeFrame.Items.AddRange(Enum.GetNames(typeof(TimeFrame)));
            comboBox_timeFrame.SelectedIndex = 5;

            var sm = new InstrumentsManager();

            comboBox_symbols.Items.Add("Major Pairs");
            comboBox_symbols.Items.AddRange(sm.GetForexPairs(ForexTypes.major).ToArray());
            comboBox_symbols.Items.Add("Minor Pairs");
            comboBox_symbols.Items.AddRange(sm.GetForexPairs(ForexTypes.minor).ToArray());
            comboBox_symbols.SelectedIndex = 1;

            dateTimePicker_from.Value = dateTimePicker_to.Value.Date.AddDays(-4);
        }
Esempio n. 8
0
 public InstrumentsController(InstrumentsManager instrumentManager)
 {
     this._instrumentManager = instrumentManager;
 }