/// <summary>
/// Sets the indicator overview.
/// </summary>
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);
}