Forex_Strategy_Builder.Day_of_Week.Day_of_Week C# (CSharp) Method

Day_of_Week() public method

Sets the default indicator parameters for the designated slot type
public Day_of_Week ( SlotTypes slotType ) : System
slotType SlotTypes
return System
        public Day_of_Week(SlotTypes slotType)
        {
            // General properties
            PossibleSlots = SlotTypes.OpenFilter;
            IndicatorName = "Day of Week";

            // Setting up the indicator parameters
            IndParam = new IndicatorParam();
            IndParam.IndicatorName = IndicatorName;
            IndParam.SlotType      = slotType;
            IndParam.IndicatorType = TypeOfIndicator.DateTime;

            // The ComboBox parameters
            IndParam.ListParam[0].Caption = "Logic";
            IndParam.ListParam[0].ItemList = new string[]
            {
                "Enter the market between the specified days"
            };
            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 = "Indicators' logic.";

            IndParam.ListParam[1].Caption  = "From (incl.)";
            IndParam.ListParam[1].ItemList = Enum.GetNames(typeof(DayOfWeek));
            IndParam.ListParam[1].Index    = (int)DayOfWeek.Monday;
            IndParam.ListParam[1].Text     = IndParam.ListParam[1].ItemList[IndParam.ListParam[1].Index];
            IndParam.ListParam[1].Enabled  = true;
            IndParam.ListParam[1].ToolTip  = "Day of beginning for the entry period.";

            IndParam.ListParam[2].Caption  = "To (excl.)";
            IndParam.ListParam[2].ItemList = Enum.GetNames(typeof(DayOfWeek));
            IndParam.ListParam[2].Index    = (int)DayOfWeek.Saturday;
            IndParam.ListParam[2].Text     = IndParam.ListParam[2].ItemList[IndParam.ListParam[2].Index];
            IndParam.ListParam[2].Enabled  = true;
            IndParam.ListParam[2].ToolTip  = "End day for the entry period.";

            return;
        }