Condition Logic (AND/OR Groups)

How Conditions Work

Every strategy has entry conditions and exit conditions. These are evaluated using logical operators.

AND Logic

All conditions in an AND group must be true simultaneously:

AND Group:
  ├── RSI(14) < 30          ← Must be true
  ├── Price > SMA(200)      ← Must be true
  └── MACD > Signal Line    ← Must be true

All three must be true → Entry triggered

Use AND when you want confirmation from multiple indicators.

OR Logic

Any condition in an OR group can trigger the action:

OR Group:
  ├── RSI(14) < 20          ← If true → Entry triggered
  ├── Price < Lower BB      ← If true → Entry triggered
  └── Stoch %K < 15         ← If true → Entry triggered

Any one being true → Entry triggered

Use OR when you want multiple ways to enter a trade.

Nested Groups

You can nest AND and OR groups for complex logic:

Translation: "Enter long if price is above the 200 SMA (uptrend), AND EITHER RSI is oversold OR (stochastic is oversold AND MACD momentum is turning up)."

Building Conditions in the UI

Adding a Condition

  1. Click Add Condition in the entry or exit section

  2. Select the indicator (RSI, MACD, etc.)

  3. Configure indicator parameters (period, etc.)

  4. Choose the comparison operator:

    • Greater Than (>)

    • Less Than (<)

    • Crosses Above (value was below, now above)

    • Crosses Below (value was above, now below)

    • Equal To (=)

  5. Set the comparison value

Creating Groups

  1. Click Add Group to create a nested group

  2. Select the group type: AND or OR

  3. Add conditions inside the group

  4. Groups can be nested up to 3 levels deep

Example: RSI Mean Reversion with Trend Filter

Entry conditions (AND):

#
Indicator
Operator
Value

1

SMA(200)

Price Greater Than

(dynamic)

2

RSI(14)

Less Than

30

Exit conditions (OR):

#
Type
Value

1

RSI(14) > 70

Dynamic

2

Take Profit

5%

3

Stop Loss

2%

Operator Reference

Operator
Symbol
Meaning

Greater Than

>

Current value is above threshold

Less Than

<

Current value is below threshold

Greater Than or Equal

>=

Current value is at or above threshold

Less Than or Equal

<=

Current value is at or below threshold

Crosses Above

Value just moved from below to above threshold

Crosses Below

Value just moved from above to below threshold

Tips

  • Keep it simple: 2-4 conditions usually work better than 10

  • Use AND for entries: Require confirmation to avoid false signals

  • Use OR for exits: Multiple exit paths protect your capital

  • Always include stop loss: Never rely solely on indicator-based exits

  • Backtest variations: Try different parameter values to find what works

Last updated