Forex_Strategy_Builder.Long_or_Short.Long_or_Short C# (CSharp) Method

Long_or_Short() public method

Sets the default indicator parameters for the designated slot type
public Long_or_Short ( SlotTypes slotType )
slotType SlotTypes
        public Long_or_Short(SlotTypes slotType)
        {
            // General properties
            IndicatorName = "Long or Short";
            PossibleSlots = SlotTypes.OpenFilter;

            // 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";
            IndParam.ListParam[0].ItemList = new string[]
            {
                "Open long positions only",
                "Open short positions only",
            };
            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.";

            return;
        }