Forex_Strategy_Builder.Indicator_Dialog.SetIndicatorNotification C# (CSharp) Method

SetIndicatorNotification() private method

Sets the indicator overview.
private SetIndicatorNotification ( Indicator indicator ) : void
indicator Indicator
return void
        private void SetIndicatorNotification(Indicator indicator)
        {
            // Warning message.
            warningMessage = indicator.WarningMessage;
            lblIndicatorWarning.Visible = !string.IsNullOrEmpty(warningMessage);

            // Set description.
            indicator.SetDescription(slotType);
            description = "Long position:" + Environment.NewLine;
            if (slotType == SlotTypes.Open)
            {
                description += "   Open a long position " + indicator.EntryPointLongDescription + "." + Environment.NewLine + Environment.NewLine;
                description += "Short position:" + Environment.NewLine;
                description += "   Open a short position " + indicator.EntryPointShortDescription + ".";
            }
            else if (slotType == SlotTypes.OpenFilter)
            {
                description += "   Open a long position when " + indicator.EntryFilterLongDescription + "." + Environment.NewLine + Environment.NewLine;
                description += "Short position:" + Environment.NewLine;
                description += "   Open a short position when " + indicator.EntryFilterShortDescription + ".";
            }
            else if (slotType == SlotTypes.Close)
            {
                description += "   Close a long position " + indicator.ExitPointLongDescription + "." + Environment.NewLine + Environment.NewLine;
                description += "Short position:" + Environment.NewLine;
                description += "   Close a short position " + indicator.ExitPointShortDescription + ".";
            }
            else
            {
                description += "   Close a long position when " + indicator.ExitFilterLongDescription + "." + Environment.NewLine + Environment.NewLine;
                description += "Short position:" + Environment.NewLine;
                description += "   Close a short position when " + indicator.ExitFilterShortDescription + ".";
            }

            for (int i = 0; i < 2; i++)
                if (indicator.IndParam.CheckParam[i].Caption == "Use previous bar value")
                    description += Environment.NewLine + "-------------" + Environment.NewLine + "* Use the value of " + indicator.IndicatorName + " from the previous bar.";

            toolTip.SetToolTip(lblIndicatorInfo, description);
        }