Forex_Strategy_Builder.Dialogs.Generator.Generator.CheckAvailableIndicators C# (CSharp) Method

CheckAvailableIndicators() private method

Checks if enough indicators are allowed
private CheckAvailableIndicators ( ) : bool
return bool
        bool CheckAvailableIndicators()
        {
            bool ok = true;

            if (!isEntryLocked && entryIndicators.Count == 0)
                ok = false;
            if (entryFilterIndicators.Count < maxOpeningLogicSlots - lockedEntryFilters)
                ok = false;
            if (!isExitLocked && exitIndicators.Count == 0)
                ok = false;
            if (!isExitLocked && exitIndicatorsWithFilters.Count == 0 && chbMaxClosingLogicSlots.Enabled && nudMaxClosingLogicSlots.Value > 0)
                ok = false;
            if (lockedExitFilters > 0 && exitIndicatorsWithFilters.Count == 0)
                ok = false;
            if (chbMaxClosingLogicSlots.Enabled && exitFilterIndicators.Count < nudMaxClosingLogicSlots.Value - lockedExitFilters)
                ok = false;
            if (!chbMaxClosingLogicSlots.Enabled && exitFilterIndicators.Count < maxClosingLogicSlots - lockedExitFilters)
                ok = false;

            return ok;
        }