Logic Count

The Logic Count rule evaluates a set of conditions and proceeds only when a specific number of them are met. Unlike the standard Logic rule that requires all conditions to pass, Logic Count lets you define a threshold — for example, proceed if at least three out of five indicators are positive — enabling more flexible and resilient decision-making in your strategy.

How It Works

The Logic Count rule acts as a sophisticated decision-maker that counts how many of its configured statements evaluate to true. It is configured with a list of statements, where each statement is a condition that can be either true or false.

The rule checks each statement individually and tallies how many evaluate to true. It then compares this count to a target count using the specified operator (greater than, equal to, less than, and so on). The rule only succeeds and allows the strategy to continue if this comparison is true.

For example, a trading strategy might use five different indicators that suggest a good time to buy. Rather than requiring all five to be positive, you could configure the Logic Count rule to proceed if at least three of the five are positive. This makes the strategy more resilient, as it does not have to wait for a perfect but rare setup where every single indicator aligns.

The rule outputs the total count of successful statements and a boolean indicating whether the overall condition was met. It also provides a detailed breakdown of which specific statements were true and which were false, giving you full transparency into the decision-making process.

Inputs

Parameter Description Required Default
Statements A list of conditions to be evaluated. Each statement is a logical expression that will result in either true or false. You can add as many statements as needed, each representing a separate condition or indicator check. Yes
Operator The comparison operator used to evaluate the count of true statements against the target count. Options: Greater Than, Greater Than or Equal To, Less Than, Less Than or Equal To, Equal To, Not Equal To. Yes
Target Count The number to which the count of true statements is compared. For example, if you want at least 3 out of 5 conditions to be true, set the Operator to "Greater Than or Equal To" and the Target Count to 3. Yes

Outputs

Output Description
Result A boolean value indicating whether the logic count condition was met (true if the comparison between the count of true statements and the target count passes, false otherwise).
Logic Count The total number of statements that evaluated to true. This numeric value can be passed to other rules for further calculations or conditional logic.
Logic Results A detailed list showing the individual result (true or false) for each statement that was evaluated. Use this to understand exactly which conditions passed and which did not.

Tips

Logic Count is ideal for building confluence-based entry strategies. Add statements for each of your indicators (such as moving average direction, RSI level, volume threshold, and trend filter), then set the target count to require a majority. This "best of N" approach produces more frequent signals than requiring all conditions while still maintaining a high degree of confirmation. Review the Logic Results output during backtesting to identify which conditions contribute most to winning trades.

Was this helpful? Let us know