/// <summary>
        ///     Sets the trvIndicators nodes
        /// </summary>
        private void SetTreeViewIndicators()
        {
            var trnAll = new TreeNode {
                Name = "trnAll", Text = Language.T("All"), Tag = false
            };

            var trnIndicators = new TreeNode {
                Name = "trnIndicators", Text = Language.T("Indicators"), Tag = false
            };

            var trnAdditional = new TreeNode {
                Name = "trnAdditional", Text = Language.T("Additional"), Tag = false
            };

            var trnOscillatorOfIndicators = new TreeNode
            {
                Name = "trnOscillatorOfIndicators",
                Text = Language.T("Oscillator of Indicators"),
                Tag  = false
            };

            var trnIndicatorsMaOscillator = new TreeNode
            {
                Name = "trnIndicatorMA",
                Text = Language.T("Indicator's MA Oscillator"),
                Tag  = false
            };

            var trnDateTime = new TreeNode {
                Name = "trnDateTime", Text = Language.T("Date/Time Functions"), Tag = false
            };

            var trnCustomIndicators = new TreeNode
            {
                Name = "trnCustomIndicators",
                Text = Language.T("Custom Indicators"),
                Tag  = false
            };

            TrvIndicators.Nodes.AddRange(new[]
            {
                trnAll, trnIndicators, trnAdditional, trnOscillatorOfIndicators,
                trnIndicatorsMaOscillator, trnDateTime, trnCustomIndicators
            });

            foreach (string name in IndicatorManager.GetIndicatorNames(SlotType))
            {
                // Checks the indicator name in the list of forbidden indicators.
                bool toContinue = false;
                foreach (string forbiden in Data.IndicatorsForBacktestOnly)
                {
                    if (name == forbiden)
                    {
                        toContinue = true;
                        break;
                    }
                }
                if (toContinue)
                {
                    continue;
                }

                Indicator indicator = IndicatorManager.ConstructIndicator(name);
                indicator.Initialize(SlotType);
                TypeOfIndicator type = indicator.IndParam.IndicatorType;

                Color nodeColor = LayoutColors.ColorControlText;
                if (indicator.OverrideMainIndicator)
                {
                    nodeColor = Color.Brown;
                }

                var trn = new TreeNode {
                    Tag = true, Name = name, Text = name, ForeColor = nodeColor
                };
                trnAll.Nodes.Add(trn);

                if (indicator.CustomIndicator)
                {
                    var trnCustom = new TreeNode {
                        Tag = true, Name = name, Text = name, ForeColor = nodeColor
                    };
                    trnCustomIndicators.Nodes.Add(trnCustom);
                }

                var trnGroups = new TreeNode {
                    Tag = true, Name = name, Text = name, ForeColor = nodeColor
                };

                if (type == TypeOfIndicator.Indicator)
                {
                    trnIndicators.Nodes.Add(trnGroups);
                }
                else if (type == TypeOfIndicator.Additional)
                {
                    trnAdditional.Nodes.Add(trnGroups);
                }
                else if (type == TypeOfIndicator.OscillatorOfIndicators)
                {
                    trnOscillatorOfIndicators.Nodes.Add(trnGroups);
                }
                else if (type == TypeOfIndicator.IndicatorsMA)
                {
                    trnIndicatorsMaOscillator.Nodes.Add(trnGroups);
                }
                else if (type == TypeOfIndicator.DateTime)
                {
                    trnDateTime.Nodes.Add(trnGroups);
                }
            }
        }
        /// <summary>
        ///     Sets the trvIndicators nodes
        /// </summary>
        private void SetTreeViewIndicators()
        {
            var trnAll = new TreeNode {
                Name = "trnAll", Text = Language.T("All"), Tag = false
            };
            var trnIndicators = new TreeNode {
                Name = "trnIndicators", Text = Language.T("Indicators"), Tag = false
            };
            var trnAdditional = new TreeNode {
                Name = "trnAdditional", Text = Language.T("Additional"), Tag = false
            };

            var trnOscillatorOfIndicators = new TreeNode
            {
                Name = "trnOscillatorOfIndicators",
                Text = Language.T("Oscillator of Indicators"),
                Tag  = false
            };

            var trnIndicatorsMaOscillator = new TreeNode
            {
                Name = "trnIndicatorMA",
                Text = Language.T("Indicator's MA Oscillator"),
                Tag  = false
            };

            var trnDateTime = new TreeNode {
                Name = "trnDateTime", Text = Language.T("Date/Time Functions"), Tag = false
            };

            var trnCustomIndicators = new TreeNode
            {
                Name = "trnCustomIndicators",
                Text = Language.T("Custom Indicators"),
                Tag  = false
            };

            TrvIndicators.Nodes.AddRange(new[]
            {
                trnAll, trnIndicators, trnAdditional, trnOscillatorOfIndicators,
                trnIndicatorsMaOscillator, trnDateTime, trnCustomIndicators
            });

            foreach (string name in IndicatorManager.GetIndicatorNames(slotType))
            {
                Indicator indicator = IndicatorManager.ConstructIndicator(name);
                indicator.Initialize(slotType);
                TypeOfIndicator type = indicator.IndParam.IndicatorType;

                Color nodeColor = LayoutColors.ColorControlText;
                if (indicator.OverrideMainIndicator)
                {
                    nodeColor = Color.Brown;
                }

                var trn = new TreeNode {
                    Tag = true, Name = name, Text = name, ForeColor = nodeColor
                };
                trnAll.Nodes.Add(trn);

                if (indicator.CustomIndicator)
                {
                    var trnCustom = new TreeNode {
                        Tag = true, Name = name, Text = name, ForeColor = nodeColor
                    };
                    trnCustomIndicators.Nodes.Add(trnCustom);
                }

                var trnGroups = new TreeNode {
                    Tag = true, Name = name, Text = name, ForeColor = nodeColor
                };

                switch (type)
                {
                case TypeOfIndicator.Indicator:
                    trnIndicators.Nodes.Add(trnGroups);
                    break;

                case TypeOfIndicator.Additional:
                    trnAdditional.Nodes.Add(trnGroups);
                    break;

                case TypeOfIndicator.OscillatorOfIndicators:
                    trnOscillatorOfIndicators.Nodes.Add(trnGroups);
                    break;

                case TypeOfIndicator.IndicatorsMA:
                    trnIndicatorsMaOscillator.Nodes.Add(trnGroups);
                    break;

                case TypeOfIndicator.DateTime:
                    trnDateTime.Nodes.Add(trnGroups);
                    break;
                }
            }
        }