public Exit_Hour(SlotTypes slotType)
{
// General properties
IndicatorName = "Exit Hour";
PossibleSlots = SlotTypes.Close;
// Setting up the indicator parameters
IndParam = new IndicatorParam();
IndParam.IndicatorName = IndicatorName;
IndParam.SlotType = slotType;
IndParam.ExecutionTime = ExecutionTime.AtBarClosing;
IndParam.IndicatorType = TypeOfIndicator.DateTime;
// The ComboBox parameters
IndParam.ListParam[0].Caption = "Logic";
IndParam.ListParam[0].ItemList = new string[]
{
"Exit the market before the specified hour"
};
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 = "Indicator's logic.";
IndParam.ListParam[1].Caption = "Base price";
IndParam.ListParam[1].ItemList = new string[] { "Close" };
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 = "Exit price of the position.";
// The NumericUpDown parameters.
IndParam.NumParam[0].Caption = "Exit hour";
IndParam.NumParam[0].Value = 0;
IndParam.NumParam[0].Min = 0;
IndParam.NumParam[0].Max = 24;
IndParam.NumParam[0].Enabled = true;
IndParam.NumParam[0].ToolTip = "The position's closing hour.";
return;
}