Forex_Strategy_Builder.Dialogs.Generator.Generator.CalculateIndicator C# (CSharp) Method

CalculateIndicator() private method

Calculates an indicator and returns OK status.
private CalculateIndicator ( SlotTypes slotType, Indicator indicator ) : bool
slotType SlotTypes
indicator Indicator
return bool
        bool CalculateIndicator(SlotTypes slotType, Indicator indicator)
        {
            bool okStatus;
            try
            {
                indicator.Calculate(slotType);
                okStatus = true;
            }
            catch (Exception excaption)
            {
                string message = "Please report this error in the support forum!";
                if (indicator.CustomIndicator)
                    message = "Please report this error to the author of the indicator!<br />" +
                        "You may remove this indicator from the Custom Indicators folder.";

                string text =
                    "<h1>Error: " + excaption.Message + "</h1>" +
                    "<p>" +
                        "Slot type: <strong>" + slotType.ToString()  + "</strong><br />" +
                        "Indicator: <strong>" + indicator.ToString() + "</strong>" +
                    "</p>" +
                    "<p>" +
                        message +
                    "</p>";

                string caption = "Indicator Calculation Error";
                ReportIndicatorError(text, caption);
                indicatorBlackList.Add(indicator.IndicatorName);
                okStatus = false;
            }
            return okStatus;
        }