public override void SetDescription(SlotTypes slotType)
{
int iShift = (int)IndParam.NumParam[4].Value;
int iFromHour = (int)IndParam.NumParam[0].Value;
int iFromMin = (int)IndParam.NumParam[1].Value;
int iUntilHour = (int)IndParam.NumParam[2].Value;
int iUntilMin = (int)IndParam.NumParam[3].Value;
string sFromTime = iFromHour.ToString("00") + ":" + iFromMin.ToString("00");
string sUntilTime = iUntilHour.ToString("00") + ":" + iUntilMin.ToString("00");
string sInterval = "(" + sFromTime + " - " + sUntilTime + ")";
string sUpperTrade;
string sLowerTrade;
if (iShift > 0)
{
sUpperTrade = iShift + " pips above the ";
sLowerTrade = iShift + " pips below the ";
}
else if (iShift == 0)
{
if (IndParam.ListParam[0].Text == "Enter long at the hourly high" ||
IndParam.ListParam[0].Text == "Enter long at the hourly low" ||
IndParam.ListParam[0].Text == "Exit long at the hourly high" ||
IndParam.ListParam[0].Text == "Exit long at the hourly low")
{
sUpperTrade = "at the ";
sLowerTrade = "at the ";
}
else
{
sUpperTrade = "the ";
sLowerTrade = "the ";
}
}
else
{
sUpperTrade = -iShift + " pips below the ";
sLowerTrade = -iShift + " pips above the ";
}
switch (IndParam.ListParam[0].Text)
{
case "Enter long at the hourly high":
EntryPointLongDescription = sUpperTrade + "hourly high " + sInterval;
EntryPointShortDescription = sLowerTrade + "hourly low " + sInterval;
break;
case "Enter long at the hourly low":
EntryPointLongDescription = sLowerTrade + "hourly low " + sInterval;
EntryPointShortDescription = sUpperTrade + "hourly high " + sInterval;
break;
case "Exit long at the hourly high":
ExitPointLongDescription = sUpperTrade + "hourly high " + sInterval;
ExitPointShortDescription = sLowerTrade + "hourly low " + sInterval;
break;
case "Exit long at the hourly low":
ExitPointLongDescription = sLowerTrade + "hourly low " + sInterval;
ExitPointShortDescription = sUpperTrade + "hourly high " + sInterval;
break;
case "The position opens below the hourly high":
EntryFilterLongDescription = "the position opens lower than " + sUpperTrade + "hourly high " + sInterval;
EntryFilterShortDescription = "the position opens higher than " + sLowerTrade + "hourly low " + sInterval;
break;
case "The position opens above the hourly high":
EntryFilterLongDescription = "the position opens higher than " + sUpperTrade + "hourly high " + sInterval;
EntryFilterShortDescription = "the position opens lower than " + sLowerTrade + "hourly low " + sInterval;
break;
case "The position opens below the hourly low":
EntryFilterLongDescription = "the position opens lower than " + sLowerTrade + "hourly low " + sInterval;
EntryFilterShortDescription = "the position opens higher than " + sUpperTrade + "hourly high " + sInterval;
break;
case "The position opens above the hourly low":
EntryFilterLongDescription = "the position opens higher than " + sLowerTrade + "hourly low " + sInterval;
EntryFilterShortDescription = "the position opens lower than " + sUpperTrade + "hourly high " + sInterval;
break;
case "The bar closes below the hourly high":
ExitFilterLongDescription = "the bar closes lower than " + sUpperTrade + "hourly high " + sInterval;
ExitFilterShortDescription = "the bar closes higher than " + sLowerTrade + "hourly low " + sInterval;
break;
case "The bar closes above the hourly high":
ExitFilterLongDescription = "the bar closes higher than " + sUpperTrade + "hourly high " + sInterval;
ExitFilterShortDescription = "the bar closes lower than " + sLowerTrade + "hourly low " + sInterval;
break;
case "The bar closes below the hourly low":
ExitFilterLongDescription = "the bar closes lower than " + sLowerTrade + "hourly low " + sInterval;
ExitFilterShortDescription = "the bar closes higher than " + sUpperTrade + "hourly high " + sInterval;
break;
case "The bar closes above the hourly low":
ExitFilterLongDescription = "the bar closes higher than " + sLowerTrade + "hourly low " + sInterval;
ExitFilterShortDescription = "the bar closes lower than " + sUpperTrade + "hourly high " + sInterval;
break;
default:
break;
}
return;
}