Forex_Strategy_Builder.Account_Percent_Stop.Account_Percent_Stop C# (CSharp) Method

Account_Percent_Stop() public method

Sets the default indicator parameters for the designated slot type.
public Account_Percent_Stop ( SlotTypes slotType )
slotType SlotTypes
        public Account_Percent_Stop(SlotTypes slotType)
        {
            // General properties
            IndicatorName  = "Account Percent Stop";
            PossibleSlots  = SlotTypes.Close;
            SeparatedChart = false;

            // 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[]
            {
                "Limit the risk to percent of the account"
            };
            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.";

            // The NumericUpDown parameters
            IndParam.NumParam[0].Caption = "Account percent";
            IndParam.NumParam[0].Value   = 2;
            IndParam.NumParam[0].Min     = 1;
            IndParam.NumParam[0].Max     = 20;
            IndParam.NumParam[0].Enabled = true;
            IndParam.NumParam[0].ToolTip = "Maximum account to risk.";

            return;
        }