public Fractal(SlotTypes slotType)
{
// General properties
IndicatorName = "Fractal";
PossibleSlots = SlotTypes.Open | 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 long at an Up Fractal",
"Enter long at a Down Fractal"
};
}
else if (slotType == SlotTypes.Close)
{
IndParam.ListParam[0].ItemList = new string[]
{
"Exit long at an Up Fractal",
"Exit long at a Down Fractal"
};
}
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 = "Logic of application of the indicator.";
IndParam.ListParam[1].Caption = "Visibility";
IndParam.ListParam[1].ItemList = new string[]
{
"The fractal is visible",
"The fractal can be shadowed"
};
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 = "Is the fractal visible from the current market point.";
IndParam.NumParam[0].Caption = "Vertical shift";
IndParam.NumParam[0].Value = 0;
IndParam.NumParam[0].Min = -2000;
IndParam.NumParam[0].Max = +2000;
IndParam.NumParam[0].Enabled = true;
IndParam.NumParam[0].ToolTip = "A vertical shift above Up Fractal and below Down Fractal.";
return;
}