Working with Rules

Rules are the fundamental building blocks of every Arconomy strategy. Each rule encapsulates a specific piece of trading logic -- from evaluating whether RSI is oversold, to placing a market order, to sizing a position based on account equity. This page explains how rules work, the different types available, and how they fit together to form a complete strategy.

Anatomy of a Rule

Every rule in Arconomy follows a consistent structure with three parts: inputs, configuration, and outputs.

Single rule node showing inputs, configuration summary, and outputs

Inputs

Inputs are the data and signals a rule receives from other rules or from the market data feed. Each rule has one or more input ports on its left side. Common input types include:

  • Signal input -- A boolean signal from an upstream rule indicating that a condition has been met (e.g., "RSI crossed below 30")
  • Price data -- Automatically provided from the market data feed based on the strategy's symbol and timeframe
  • Value input -- A numeric value from another rule, such as an indicator reading or a calculated position size

Most rules receive price data automatically -- you do not need to explicitly connect a price feed. Signal and value inputs, however, must be connected from other rule outputs.

Configuration

Configuration is the set of parameters that control how a rule behaves. For example, an RSI rule has parameters like the lookback period, overbought threshold, and oversold threshold. Configuration is set via the rule's configuration panel, which opens when you double-click a node or select it and press Enter.

A summary of the current configuration is displayed directly on the node card, so you can read each rule's settings at a glance without opening the panel.

Outputs

Outputs are the signals and values a rule produces after evaluating its logic against the current market state. Output ports appear on the right side of the node. Common output types include:

  • Signal output -- A boolean indicating whether the rule's condition is currently true (e.g., "MACD histogram is positive")
  • Value output -- A numeric value such as an indicator level, calculated stop price, or position size
  • Order output -- An instruction to place, modify, or cancel an order

Rule Types

Arconomy organises rules into four categories. Understanding the purpose of each category helps you design clear, well-structured strategies.

Entry Rules

Entry rules define the conditions under which a new position should be opened. They evaluate market data -- price action, technical indicators, volume patterns, or alternative data -- and produce a signal when conditions are met. Examples include:

  • Moving average crossover (e.g., 20 EMA crosses above 50 EMA)
  • RSI crossing below a threshold (e.g., RSI drops below 30)
  • Breakout above a price level (e.g., price exceeds the 20-day high)
  • Candlestick pattern detection (e.g., bullish engulfing pattern)

A strategy must have at least one entry rule. You can combine multiple entry rules to require that all conditions are met simultaneously (AND logic) or that any one condition is sufficient (OR logic).

Exit Rules

Exit rules define when an open position should be closed. They work similarly to entry rules but evaluate conditions against existing positions. Examples include:

  • Take profit at a fixed percentage gain
  • Exit when an indicator reverses (e.g., RSI crosses above 70)
  • Time-based exit (e.g., close after 10 bars)
  • Trailing stop triggered

Every strategy should have at least one exit rule. Without an exit mechanism, the backtester will hold positions indefinitely, which rarely reflects realistic trading.

Filter Rules

Filter rules act as gates that allow or block entry and exit signals based on broader market conditions. They do not generate trade signals themselves; instead, they modify the flow of signals from other rules. Examples include:

  • Only allow entries when the broader market trend is bullish (e.g., S&P 500 is above its 200-day MA)
  • Block entries during high-volatility events (e.g., VIX above 30)
  • Restrict trading to specific sessions or days of the week
  • Require minimum volume before allowing entries

Filters are optional but highly recommended. They help reduce false signals and improve strategy robustness by adding context-awareness to your entry and exit logic.

Risk Management Rules

Risk management rules control position sizing, stop losses, take profits, and overall portfolio exposure. They sit between your entry signals and the actual order execution, ensuring that every trade adheres to your risk parameters. Examples include:

  • Fixed percentage risk per trade (e.g., risk 1% of account equity)
  • Maximum number of concurrent positions
  • Stop loss at a fixed distance or ATR multiple
  • Trailing stop that follows price as it moves in your favour

Every strategy deployed for live trading must include risk management rules. Strategies without proper risk controls can result in excessive losses.

Browsing and Adding from the Library

The rules library contains all available rules organised by category. To browse it:

  1. Click + Add Rule in the canvas toolbar or press A to open the library panel.
  2. Use the category tabs at the top to filter by Entry, Exit, Filter, or Risk rules.
  3. Use the search bar to find rules by name or keyword (e.g., typing "RSI" will show all rules that use the Relative Strength Index).
  4. Hover over any rule in the library to see a brief description and parameter summary.
  5. Drag the rule onto the canvas to add it, or click it to add it at the default position.
Rules library panel showing category tabs, search bar, and rule cards

Each rule in the library displays an icon, name, short description, and a tag indicating its category. Rules you have used recently appear in a Recently Used section at the top for quick access.

Not sure which rule to use? Start with a simple entry rule like "Moving Average Crossover" and a basic exit rule like "Fixed Take Profit." You can always add complexity later.

Execution Sequence

Understanding the order in which rules execute is important for designing strategies that behave as you expect. Arconomy evaluates rules in a specific sequence on each new bar (or tick, depending on your data resolution):

  1. Market data update -- The latest price, volume, and indicator values are computed.
  2. Exit rules evaluate -- All exit rules are checked first. If any exit condition is met for an open position, the position is closed before new entries are considered. This prevents conflicting signals where an entry and exit trigger on the same bar.
  3. Filter rules evaluate -- All filter rules are checked. If any filter blocks trading, no new entries will be generated on this bar.
  4. Entry rules evaluate -- All entry rules are checked. If entry conditions are met and no filters are blocking, an entry signal is produced.
  5. Risk rules evaluate -- Risk management rules size the position and set stop/take-profit levels based on the entry signal.
  6. Order execution -- The final order (if any) is submitted with the calculated size, direction, and risk parameters.
Execution Flow
New Bar Arrives
    |
    v
[Exit Rules] ---> Close positions if exit conditions met
    |
    v
[Filter Rules] --> Block or allow new entries
    |
    v
[Entry Rules] ---> Generate entry signal if conditions met
    |
    v
[Risk Rules] ----> Size position, set stops/TPs
    |
    v
[Order Execution] -> Submit order to broker

This sequence ensures that exits are always processed before entries, preventing scenarios where a strategy opens and closes a position on the same bar in an unpredictable order. It also means that filter rules can only block entries, not exits -- exit logic is always evaluated independently.

Combining Rules with Logic

When multiple rules of the same type are connected, you need to specify how their signals combine. Arconomy supports two logic modes:

  • AND logic -- All connected rules must produce a true signal for the combined output to be true. Use this when you want multiple confirmations before entering a trade.
  • OR logic -- Any one of the connected rules producing a true signal is sufficient. Use this when you want flexibility in your entry conditions.

You set the logic mode on the receiving node's input port. Click the input port and choose AND or OR from the dropdown. The default is AND.

Was this helpful? Let us know