コード例 #1
0
ファイル: BackTestingForm.cs プロジェクト: erdincay/CoinTNet
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public BackTestingForm(bool isTestMode = true)
        {
            InitializeComponent();

            _isTestMode = isTestMode;
            pnlPlaceholder.Controls.Add(_settingsCtrl);
            PopulateStrategyDropdown();
            cbbStrategy.SelectedIndex = 0;
            chartSelector.LoadFromCSVClicked += chartSelector_LoadFromCSVClicked;
            chartSelector.RefreshClicked += chartSelector_RefreshClicked;

            _indicatorsForm = new IndicatorsForm();

            _indicatorsForm.IndicatorOptionsChanged += (s, options)
                =>
            {
                chartCtrl.NotifyIndicatorsChanged(options);
            };
            chartCtrl.NotifyIndicatorsChanged(_indicatorsForm.IndicatorOptions);
            chartSelector.OnPairChanged += (s, e) =>
                {
                    UpdateLabels(chartSelector.SelectedPair);
                };
            this.FormClosed += (s, e) => _indicatorsForm.Dispose();
        }
コード例 #2
0
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public BackTestingForm(bool isTestMode = true)
        {
            InitializeComponent();

            _isTestMode = isTestMode;
            pnlPlaceholder.Controls.Add(_settingsCtrl);
            PopulateStrategyDropdown();
            cbbStrategy.SelectedIndex         = 0;
            chartSelector.LoadFromCSVClicked += chartSelector_LoadFromCSVClicked;
            chartSelector.RefreshClicked     += chartSelector_RefreshClicked;

            _indicatorsForm = new IndicatorsForm();

            _indicatorsForm.IndicatorOptionsChanged += (s, options)
                                                       =>
            {
                chartCtrl.NotifyIndicatorsChanged(options);
            };
            chartCtrl.NotifyIndicatorsChanged(_indicatorsForm.IndicatorOptions);
            chartSelector.OnPairChanged += (s, e) =>
            {
                UpdateLabels(chartSelector.SelectedPair);
            };
            this.FormClosed += (s, e) => _indicatorsForm.Dispose();
        }
コード例 #3
0
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public MainForm()
        {
            InitializeComponent();
            this.Text = CoinTNet.Common.Constants.ApplicationConstants.ApplicationName;
            EventAggregator.Instance.Subscribe <StatusUpdateMessage>(m => UpdateStatus(m.Message));
            //   this.Shown += (s, e) => OnBtnRefreshClick();
            dataSelector.RefreshClicked += (s, e) => OnBtnRefreshClick();
            dataSelector.OnPairChanged  += (s, e) => OnPairChanged();
            dataSelector.UseLiveData     = true;
            _selectedPair   = dataSelector.SelectedPair;
            _indicatorsForm = new IndicatorsForm();

            _indicatorsForm.IndicatorOptionsChanged += (s, options)
                                                       =>
            {
                myChartControl.NotifyIndicatorsChanged(options);
            };
            myChartControl.NotifyIndicatorsChanged(_indicatorsForm.IndicatorOptions);

            this.Load += (s, e) => EventAggregator.Instance.Publish(new ApplicationStartMessage());
            this.Text  = string.Format("{0} - {1}a", ApplicationConstants.ApplicationName, ApplicationConstants.CurrentVersion);
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: erdincay/CoinTNet
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public MainForm()
        {
            InitializeComponent();
            this.Text = CoinTNet.Common.Constants.ApplicationConstants.ApplicationName;
            EventAggregator.Instance.Subscribe<StatusUpdateMessage>(m => UpdateStatus(m.Message));
            //   this.Shown += (s, e) => OnBtnRefreshClick();
            dataSelector.RefreshClicked += (s, e) => OnBtnRefreshClick();
            dataSelector.OnPairChanged += (s, e) => OnPairChanged();
            dataSelector.UseLiveData = true;
            _selectedPair = dataSelector.SelectedPair;
            _indicatorsForm = new IndicatorsForm();

            _indicatorsForm.IndicatorOptionsChanged += (s, options)
                =>
                {
                    myChartControl.NotifyIndicatorsChanged(options);
                };
            myChartControl.NotifyIndicatorsChanged(_indicatorsForm.IndicatorOptions);

            this.Load += (s, e) => EventAggregator.Instance.Publish(new ApplicationStartMessage());
            this.Text = string.Format("{0} - {1}a", ApplicationConstants.ApplicationName, ApplicationConstants.CurrentVersion);
        }