/// <summary>
        ///     Edits the Strategy Slot
        /// </summary>
        /// <param name="iSlot">The slot number</param>
        private void EditSlot(int iSlot)
        {
            SlotTypes slotType   = Data.Strategy.Slot[iSlot].SlotType;
            bool      bIsDefined = Data.Strategy.Slot[iSlot].IsDefined;

            //We put the current Strategy into the stack only if this function is called from the
            //button SlotButton. If it is called from Add/Remove Filters the stack is already updated.
            if (bIsDefined)
            {
                Data.StackStrategy.Push(Data.Strategy.Clone());
            }

            var id = new IndicatorDialog(iSlot, slotType, bIsDefined);

            id.ShowDialog();

            if (id.DialogResult == DialogResult.OK)
            {
                OnStrategyChange();

                Data.IsStrategyChanged = true;

                RebuildStrategyLayout();
                SetSrategyOverview();
            }
            else
            {
                // Cancel was pressed
                UndoStrategy();
            }
        }
        /// <summary>
        ///     Edits the Strategy Slot
        /// </summary>
        private void EditSlot(int slot)
        {
            SlotTypes slotType = Data.Strategy.Slot[slot].SlotType;
            bool isSlotExist = Data.Strategy.Slot[slot].IsDefined;
            if (isSlotExist)
                Data.StackStrategy.Push(Data.Strategy.Clone());

            var indicatorDialog = new IndicatorDialog(slot, slotType, isSlotExist);
            indicatorDialog.ShowDialog();

            if (indicatorDialog.DialogResult == DialogResult.OK)
            {
                StatsBuffer.UpdateStatsBuffer();

                Text = Path.GetFileNameWithoutExtension(Data.StrategyName) + "* - " + Data.ProgramName;
                Data.IsStrategyChanged = true;
                IndicatorChart.InitChart();
                IndicatorChart.Invalidate();
                RebuildStrategyLayout();
                BalanceChart.SetChartData();
                BalanceChart.InitChart();
                BalanceChart.Invalidate();
                HistogramChart.SetChartData();
                HistogramChart.InitChart();
                HistogramChart.Invalidate();
                SetupJournal();
                InfoPanelAccountStatistics.Update(Backtester.AccountStatsParam, Backtester.AccountStatsValue,
                                                  Backtester.AccountStatsFlags, Language.T("Account Statistics"));
            }
            else
            {
                // Cancel was pressed
                UndoStrategy();
            }
        }
        /// <summary>
        ///     Edits the Strategy Slot
        /// </summary>
        /// <param name="iSlot">The slot number</param>
        private void EditSlot(int iSlot)
        {
            SlotTypes slotType = Data.Strategy.Slot[iSlot].SlotType;
            bool bIsDefined = Data.Strategy.Slot[iSlot].IsDefined;

            //We put the current Strategy into the stack only if this function is called from the
            //button SlotButton. If it is called from Add/Remove Filters the stack is already updated.
            if (bIsDefined)
            {
                Data.StackStrategy.Push(Data.Strategy.Clone());
            }

            var id = new IndicatorDialog(iSlot, slotType, bIsDefined);
            id.ShowDialog();

            if (id.DialogResult == DialogResult.OK)
            {
                OnStrategyChange();

                Data.IsStrategyChanged = true;

                RebuildStrategyLayout();
                SetSrategyOverview();
            }
            else
            {
                // Cancel was pressed
                UndoStrategy();
            }
        }