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;
}