public Alligator(SlotTypes slotType)
{
// General properties
IndicatorName = "Alligator";
PossibleSlots = SlotTypes.OpenFilter | SlotTypes.CloseFilter;
// Setting up the indicator parameters
IndParam = new IndicatorParam();
IndParam.IndicatorName = IndicatorName;
IndParam.SlotType = slotType;
// The ComboBox parameters
IndParam.ListParam[0].Caption = "Logic";
IndParam.ListParam[0].ItemList = new string[]
{
"The Lips rises",
"The Lips falls",
"The Teeth rises",
"The Teeth falls",
"The Jaws rises",
"The Jaws falls",
"The Lips crosses the Teeth upward",
"The Lips crosses the Teeth downward",
"The Lips crosses the Jaws upward",
"The Lips crosses the Jaws downward",
"The Teeth crosses the Jaws upward",
"The Teeth crosses the Jaws downward"
};
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 = "Smoothing method";
IndParam.ListParam[1].ItemList = Enum.GetNames(typeof(MAMethod));
IndParam.ListParam[1].Index = (int)MAMethod.Smoothed;
IndParam.ListParam[1].Text = IndParam.ListParam[1].ItemList[IndParam.ListParam[1].Index];
IndParam.ListParam[1].Enabled = true;
IndParam.ListParam[1].ToolTip = "The method of Moving Average used for the calculations.";
IndParam.ListParam[2].Caption = "Base price";
IndParam.ListParam[2].ItemList = Enum.GetNames(typeof(BasePrice));
IndParam.ListParam[2].Index = (int)BasePrice.Median;
IndParam.ListParam[2].Text = IndParam.ListParam[2].ItemList[IndParam.ListParam[2].Index];
IndParam.ListParam[2].Enabled = true;
IndParam.ListParam[2].ToolTip = "The price the indicator is based on.";
// The NumericUpDown parameters
IndParam.NumParam[0].Caption = "Jaws period";
IndParam.NumParam[0].Value = 13;
IndParam.NumParam[0].Min = 1;
IndParam.NumParam[0].Max = 200;
IndParam.NumParam[0].Enabled = true;
IndParam.NumParam[0].ToolTip = "The Moving Average period.";
IndParam.NumParam[1].Caption = "Jaws shift";
IndParam.NumParam[1].Value = 8;
IndParam.NumParam[1].Min = 0;
IndParam.NumParam[1].Max = 200;
IndParam.NumParam[1].Enabled = true;
IndParam.NumParam[1].ToolTip = "How many bars to shift with.";
IndParam.NumParam[2].Caption = "Teeth period";
IndParam.NumParam[2].Value = 8;
IndParam.NumParam[2].Min = 1;
IndParam.NumParam[2].Max = 200;
IndParam.NumParam[2].Enabled = true;
IndParam.NumParam[2].ToolTip = "The Moving Average period.";
IndParam.NumParam[3].Caption = "Teeth shift";
IndParam.NumParam[3].Value = 5;
IndParam.NumParam[3].Min = 0;
IndParam.NumParam[3].Max = 200;
IndParam.NumParam[3].Enabled = true;
IndParam.NumParam[3].ToolTip = "How many bars to shift with.";
IndParam.NumParam[4].Caption = "Lips period";
IndParam.NumParam[4].Value = 5;
IndParam.NumParam[4].Min = 1;
IndParam.NumParam[4].Max = 200;
IndParam.NumParam[4].Enabled = true;
IndParam.NumParam[4].ToolTip = "The Moving Average period.";
IndParam.NumParam[5].Caption = "Lips shift";
IndParam.NumParam[5].Value = 3;
IndParam.NumParam[5].Min = 0;
IndParam.NumParam[5].Max = 200;
IndParam.NumParam[5].Enabled = true;
IndParam.NumParam[5].ToolTip = "How many bars to shift with.";
// 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;
}