public Previous_Bar_Opening(SlotTypes slotType)
{
// General properties
IndicatorName = "Previous Bar Opening";
PossibleSlots = SlotTypes.Open | SlotTypes.OpenFilter | SlotTypes.Close | SlotTypes.CloseFilter;
// Setting up the indicator parameters
IndParam = new IndicatorParam();
IndParam.IndicatorName = IndicatorName;
IndParam.SlotType = slotType;
IndParam.IndicatorType = TypeOfIndicator.Additional;
// The ComboBox parameters
IndParam.ListParam[0].Caption = "Logic";
if (slotType == SlotTypes.Open)
IndParam.ListParam[0].ItemList = new string[]
{
"Enter the market at the previous Bar Opening"
};
else if (slotType == SlotTypes.OpenFilter)
IndParam.ListParam[0].ItemList = new string[]
{
"The bar opens above the previous Bar Opening",
"The bar opens below the previous Bar Opening",
"The position opens above the previous Bar Opening",
"The position opens below the previous Bar Opening"
};
else if (slotType == SlotTypes.Close)
IndParam.ListParam[0].ItemList = new string[]
{
"Exit the market at the previous Bar Opening"
};
else if (slotType == SlotTypes.CloseFilter)
IndParam.ListParam[0].ItemList = new string[]
{
"The bar closes above the previous Bar Opening",
"The bar closes below the previous Bar Opening"
};
else
IndParam.ListParam[0].ItemList = new string[]
{
"Not Defined"
};
IndParam.ListParam[0].Index = 0;
IndParam.ListParam[0].Text = IndParam.ListParam[0].ItemList[IndParam.ListParam[0].Index];
IndParam.ListParam[0].Enabled = true;
IndParam.ListParam[0].ToolTip = "Logic of application of the indicator.";
IndParam.ListParam[1].Caption = "Base price";
IndParam.ListParam[1].ItemList = new string[] { "Previous Bar Opening" };
IndParam.ListParam[1].Index = 0;
IndParam.ListParam[1].Text = IndParam.ListParam[1].ItemList[IndParam.ListParam[1].Index];
IndParam.ListParam[1].Enabled = true;
IndParam.ListParam[1].ToolTip = "Used price from the indicator.";
return;
}