Forex_Strategy_Builder.Indicator_Dialog.CalculateIndicator C# (CSharp) Метод

CalculateIndicator() приватный Метод

Calculates an indicator and returns OK status.
private CalculateIndicator ( SlotTypes slotType, Indicator indicator ) : bool
slotType SlotTypes
indicator Indicator
Результат bool
        bool CalculateIndicator(SlotTypes slotType, Indicator indicator)
        {
            bool okStatus;

            try
            {
                indicator.Calculate(slotType);

                okStatus = true;
            }
            catch (Exception excaption)
            {
                string request = "Please report this error in the support forum!";
                if (indicator.CustomIndicator)
                    request = "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>" + request + "</p>";

                string caption = "Indicator Calculation Error";

                Fancy_Message_Box msgBox = new Fancy_Message_Box(text, caption);
                msgBox.BoxWidth  = 450;
                msgBox.BoxHeight = 250;
                msgBox.Show();

                okStatus = false;
            }

            return okStatus;
        }

Same methods

Indicator_Dialog::CalculateIndicator ( bool bCalculateStrategy ) : void