Forex_Strategy_Builder.Bar_Closing.Bar_Closing C# (CSharp) Method

Bar_Closing() public method

Sets the default indicator parameters for the designated slot type
public Bar_Closing ( SlotTypes slotType )
slotType SlotTypes
        public Bar_Closing(SlotTypes slotType)
        {
            // General properties
            IndicatorName = "Bar Closing";
            PossibleSlots = SlotTypes.Open | SlotTypes.Close;
            AllowClosingFilters = true;

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

            // The ComboBox parameters
            IndParam.ListParam[0].Caption = "Logic";
            if (slotType == SlotTypes.Open)
            {
                IndParam.ListParam[0].ItemList = new string [] { "Enter the market at the end of the bar" };
                IndParam.ListParam[1].ToolTip  = "The execution price of all entry orders.";
            }
            else
            {
                IndParam.ListParam[0].ItemList = new string[] { "Exit the market at the end of the bar" };
                IndParam.ListParam[1].ToolTip  = "The execution price of all exit orders.";
            }
            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[] { "Close" };
            IndParam.ListParam[1].Index    = 0;
            IndParam.ListParam[1].Text     = IndParam.ListParam[1].ItemList[IndParam.ListParam[1].Index];
            IndParam.ListParam[1].Enabled  = true;

            return;
        }