private void DisplayBackTestResult(Strategy strategy)
        {
            var summaryDisplayer = new SummaryDisplayer(strategy, true, _inSampleStartTime, _inSampleEndTime);

            Invoke((Action)(() => summaryDisplayer.DisplayTable(uiSummary_dataGridViewBT)));

            if (uiStrategy_checkBoxXRunContinuesCheck.Checked == false)
            {
                if (strategy.Trades != null)
                {
                    _weekData = new WeeklyDataDisplayer(strategy, true, _inSampleStartTime, _inSampleEndTime);
                    uiWeeklyData_superGridControlTable.PrimaryGrid.DataSource = _weekData._weeklyData;

                    _calendarDisplayer = new CalendarDisplayer(_weekData);
                    Invoke((Action)InitCalendar);
                    Invoke((Action)(() => uiCalendar_buttonXSave.Enabled = true));
                }
            }
        }
        private void uiCalendarLoad_Click(object sender, EventArgs e)
        {
            int symbolId = 0;
            int dsetId = 0;

            if (_symbolList == null)
                _symbolList = DataManager.GetContracts();

            _calendarResult.Clear();
            _weeklist.Clear();

            foreach (var item in _symbolList)
            {
                if (uiCalendar_comboBoxXSymbol.Text == item.ContractName)
                    symbolId = item.CountractId;
            }

            _datasetList = DataManager.GetDatasets();

            foreach (var item in _datasetList)
            {
                if (uiCalendar_comboBoxXDSet.Text == item.DataSetName)
                    dsetId = item.Id;
            }

            uiCalendar_calendarViewResultView.CalendarModel.Appointments.Clear();
            var list = DataManager.GetResult(symbolId, dsetId);
            _calendarDisplayer = new CalendarDisplayer(list);

            if (_calendarDisplayer.Appointments.Count != 0)
            {ToastNotification.Show(this, "CALENDAR ITEMS ARE LOADED.");
              InitCalendar();

            }
            else
            {
                uiCalendar_calendarViewResultView.CalendarModel.Appointments.Clear();
                uiCalendar_calendarViewResultView.Refresh();
                uiCalendar_labelXWeek1.Text = "";
                uiCalendar_labelXWeek2.Text = "";
                uiCalendar_labelXWeek3.Text = "";
                uiCalendar_labelXWeek4.Text = "";
                uiCalendar_labelXWeek5.Text = "";
                uiCalendar_labelXMonthTotal.Text = "";
                uiCalendar_labelXMonth.Text = "";
                uiCalendar_labelXWeek6.Text = "";

            }
        }