private void SetClosingLogicConditions()
{
bool isClosingFiltersAllowed = Indicator_Store.ClosingIndicatorsWithClosingFilters.Contains(indicatorName);
// Removes or recovers closing logic slots.
if (slotType == SlotTypes.Close && !isClosingFiltersAllowed && Data.Strategy.CloseFilters > 0)
{ // Removes all the closing logic conditions.
Data.Strategy.RemoveAllCloseFilters();
closingSlotsRemoved = true;
}
else if (slotType == SlotTypes.Close && isClosingFiltersAllowed && closingSlotsRemoved)
{
foreach (IndicatorSlot inslot in closingConditions)
{ // Recovers all the closing logic conditions.
Data.Strategy.AddCloseFilter();
Data.Strategy.Slot[Data.Strategy.Slots - 1] = inslot.Clone();
}
closingSlotsRemoved = false;
}
return;
}