Forex_Strategy_Builder.Trailing_Stop.Trailing_Stop C# (CSharp) Method

Trailing_Stop() public method

Sets the default indicator parameters for the designated slot type
public Trailing_Stop ( SlotTypes slotType )
slotType SlotTypes
        public Trailing_Stop(SlotTypes slotType)
        {
            // General properties
            IndicatorName  = "Trailing Stop";
            PossibleSlots  = SlotTypes.Close;
            WarningMessage = "The Trailing Stop indicator trails once per bar." +
                " It means that the indicator doesn't move the position's SL at every new top / bottom, as in the real trade, but only when a new bar begins." +
                " The Stop Loss remains constant during the whole bar.";

            // 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[]
            {
                "Exit at the Trailing Stop level",
            };
            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  = "Trailing mode";
            IndParam.ListParam[1].ItemList = new string[]
            {
                "Trails once a bar",
            };
            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 = "Mode of operation of Trailing Stop.";

            // The NumericUpDown parameters
            IndParam.NumParam[0].Caption = "Trailing Stop";
            IndParam.NumParam[0].Value   = 200;
            IndParam.NumParam[0].Min     = 5;
            IndParam.NumParam[0].Max     = 5000;
            IndParam.NumParam[0].Enabled = true;
            IndParam.NumParam[0].ToolTip = "The Trailing Stop value (in pips).";

            return;
        }