Forex_Strategy_Builder.Ichimoku_Kinko_Hyo.Ichimoku_Kinko_Hyo C# (CSharp) Method

Ichimoku_Kinko_Hyo() public method

Sets the default indicator parameters for the designated slot type
public Ichimoku_Kinko_Hyo ( SlotTypes slotType ) : System
slotType SlotTypes
return System
        public Ichimoku_Kinko_Hyo(SlotTypes slotType)
        {
            // General properties
            IndicatorName = "Ichimoku Kinko Hyo";
            PossibleSlots = SlotTypes.Open | SlotTypes.OpenFilter | SlotTypes.Close;

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

            // The ComboBox parameters
            IndParam.ListParam[0].Caption = "Logic";
            if (slotType == SlotTypes.Open)
                IndParam.ListParam[0].ItemList = new string[] {
                    "Enter the market at the Tenkan Sen",
                    "Enter the market at the Kijun Sen",
                };
            else if (slotType == SlotTypes.OpenFilter)
                IndParam.ListParam[0].ItemList = new string[] {
                    "The Tenkan Sen rises",
                    "The Kijun Sen rises",
                    "The Tenkan Sen is higher than the Kijun Sen",
                    "The Tenkan Sen crosses the Kijun Sen upward",
                    "The bar opens above the Tenkan Sen",
                    "The bar opens above the Kijun Sen",
                    "The Chikou Span is above the closing price",
                    "The position opens above the Kumo",
                    "The position opens inside or above the Kumo",
                    "The Tenkan Sen is above the Kumo",
                    "The Tenkan Sen is inside or above the Kumo",
                    "The Kijun Sen is above the Kumo",
                    "The Kijun Sen is inside or above the Kumo",
                    "The Senkou Span A is higher than the Senkou Span B",
                    "The Senkou Span A crosses the Senkou Span B upward",
                };
            else if (slotType == SlotTypes.Close)
                IndParam.ListParam[0].ItemList = new string[] {
                    "Exit the market at the Tenkan Sen",
                    "Exit the market at the Kijun Sen",
                };
            else
                IndParam.ListParam[0].ItemList = new string[]
                {
                    "Not Defined"
                };
            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 = "Application of Ichimoku Kinko Hyo.";

            // The NumericUpDown parameters
            IndParam.NumParam[0].Caption = "Tenkan";
            IndParam.NumParam[0].Value   = 9;
            IndParam.NumParam[0].Min     = 6;
            IndParam.NumParam[0].Max     = 12;
            IndParam.NumParam[0].Point   = 0;
            IndParam.NumParam[0].Enabled = true;
            IndParam.NumParam[0].ToolTip = "The Tenkan Sen period.";

            IndParam.NumParam[2].Caption = "Kijun";
            IndParam.NumParam[2].Value   = 26;
            IndParam.NumParam[2].Min     = 18;
            IndParam.NumParam[2].Max     = 34;
            IndParam.NumParam[2].Point   = 0;
            IndParam.NumParam[2].Enabled = true;
            IndParam.NumParam[2].ToolTip = "The Kijun Sen period, Chikou Span period and Senkou Span shift.";

            IndParam.NumParam[4].Caption = "Senkou Span B";
            IndParam.NumParam[4].Value   = 52;
            IndParam.NumParam[4].Min     = 36;
            IndParam.NumParam[4].Max     = 84;
            IndParam.NumParam[4].Point   = 0;
            IndParam.NumParam[4].Enabled = true;
            IndParam.NumParam[4].ToolTip = "The Senkou Span B period.";

            // The CheckBox parameters
            IndParam.CheckParam[0].Caption = "Use previous bar value";
            IndParam.CheckParam[0].Checked = PrepareUsePrevBarValueCheckBox(slotType);
            IndParam.CheckParam[0].Enabled = true;
            IndParam.CheckParam[0].ToolTip = "Use the indicator value from the previous bar.";

            return;
        }