Nodes: ML & Execution
Complete reference for Classifier, Regressor, Strategy Reference, Entry, and Exit nodes — the final stages of your strategy DAG.
ML & Execution Overview
The nodes on this page form the final stage of your strategy DAG. They are split into two distinct categories based on how they interact with the rest of the graph:
ML / Reference Nodes (Sources)
Classifier, Regressor, and Strategy Reference nodes are self-contained signal sources. They have no input handles — they do not receive conditions, filters, or logic from other nodes. Instead they produce a signal that flows downstream via a single signal output handle.
Because these nodes are trained or referenced externally, they evaluate independently of the graph. Their output is consumed by Condition nodes (which pivot the categorical or continuous signal into a boolean), and ultimately by Entry and Exit nodes.
Execution Nodes (Terminals)
Entry and Exit nodes are the terminal nodes of the DAG. Every upstream path — condition chains, filters, logic gates, signal gates — eventually converges here. When an Entry or Exit node evaluates to true, the strategy opens or closes a position.
These nodes are the bridge between the abstract strategy graph and real trading activity. They translate boolean logic into actual order instructions that the backtester (and later, the live execution engine) act on.
The distinction between "sources" and "terminals" is critical when debugging. If a strategy produces no trades, check: (1) are your ML / reference nodes producing signals? (2) are your conditions configured correctly to consume those signals? (3) is your Entry node combination mode actually satisfiable?
Classifier Node
A Classifier node wraps a trained machine-learning classification model that predicts market direction. During backtesting, the node loads the serialized model, feeds it the current feature vector, and emits a categorical prediction — Short, Neutral, or Long — on every bar.
Inputs (self-contained)
This node has no input handles. It reads features from the market data pipeline internally.
Parameters
Model Info * required
Dropdown listing every trained classifier available from your ML pipeline. Each entry shows:
- Model name — the label you assigned during training
- Training symbol / timeframe — e.g.,
BTCUSDT / 1h - Accuracy — overall classification accuracy on the validation set
- Precision / Recall / F1 — per-class metrics where available
The model must have id != 0 (i.e., it must be a real persisted model, not a placeholder entry). If you delete a model that a strategy references, the strategy will fail validation and refuse to run until you reassign.
Alias * required
A unique, machine-friendly identifier used to reference this node elsewhere in the DAG (primarily by Condition nodes that consume its signal output). Must be unique across the entire strategy. Use lowercase snake_case: ml_classifier_btc, not ML Classifier BTC.
Display Name optional
A human-readable label shown on the node in the canvas. Defaults to the alias if left blank.
Has Probabilities display only
Read-only indicator. If the underlying model was trained with probability output (e.g., a RandomForest or XGBoost classifier with predict_proba support), this toggle is on and the node exposes confidence scores alongside each prediction. Models without probability support (like certain SVM configurations) show this as off.
Confidence Margin
- Type: float
- Range:
0.0–1.0 - Default:
0.5
The minimum prediction confidence required for the node to emit a directional signal. The model assigns a probability to each class (Short / Neutral / Long). Only if the winning class exceeds this threshold does the signal fire. Otherwise, the output is Neutral (no conviction).
Examples:
0.5— any above-even prediction fires (default, most permissive)0.7— the model must be at least 70% confident in its prediction. Filters out weak signals and reduces entries significantly.0.9— only the model's highest-conviction calls. Very few entries; use with a broad "or" entry combination mode.
A high confidence margin (> 0.8) on a model with mediocre out-of-sample accuracy can result in zero entries over weeks of data. Backtest the confidence distribution first — if the model rarely exceeds 75% confidence, setting the margin at 0.8 will silence it completely.
Direction Bias optional
Restricts which directional signals the node emits. Useful when a classifier is trained on both directions but you only want it to influence one side of your strategy.
- all (default) — emit Short, Neutral, and Long as predicted
- long_only — only emit Long and Neutral (Short predictions are suppressed to Neutral)
- short_only — only emit Short and Neutral (Long predictions suppressed)
- long_short — emit Long and Short, but suppress Neutral (forces a directional call on every bar)
Output Handle
| Handle | Position | Type | Connect To |
|---|---|---|---|
signal | right edge, center | handle-out (signal) | Condition node → left-hand "condition" slot. The Condition's operator dropdown shows categorical options: ==, !=. The value dropdown shows Short, Neutral, Long. |
Image Placeholder: Classifier node in the strategy canvas showing model info dropdown, confidence margin slider, and signal output handle
Regressor Node
A Regressor node wraps a trained ML regression model that predicts a continuous value — typically the expected percentage return over a forward window. Unlike the Classifier, which emits categories, the Regressor emits a numeric value that you can compare with percentage-based thresholds in a downstream Condition node.
Inputs (self-contained)
No input handles. The node reads features from the market data pipeline internally.
Parameters
Model Info * required
Dropdown of trained regressor models from your ML pipeline. Each entry shows:
- Model name — training label
- Training symbol / timeframe
- R-squared, MAE, RMSE — regression quality metrics
- Prediction horizon — how many bars forward the model was trained to predict (e.g., "next 4 bars")
The model must have id != 0. Selecting a model trained on a different symbol or timeframe than your strategy operates on will produce meaningless predictions — the system warns but does not block this.
Alias * required
Unique identifier for the node. Example: ml_regressor_eth.
Display Name optional
Human-readable label for the canvas node. Defaults to alias.
Output Handle
| Handle | Position | Type | Connect To |
|---|---|---|---|
signal | right edge, center | handle-out (signal) | Condition node → left-hand "condition" slot. The Condition's operator dropdown shows numeric + percentage operators: >, <, >=, <=, crosses_above, crosses_below. The value field accepts a number with an implicit % suffix. |
Typical Usage Patterns
"Regressor prediction > 1%" → enter long
The model predicts a +1% or greater return over its forecast horizon. A Condition node evaluates this threshold and feeds the result to the Entry node.
"Regressor prediction < -0.5%" → enter short
The model predicts a decline of at least 0.5%. Useful for symmetrical strategies where the same regressor feeds both long and short entry paths through separate Condition nodes.
"Regressor crosses_above 0%" → exit short
The model's outlook flipped from bearish to neutral/bullish. Use as a signal-based exit condition on the Exit node.
Percentage thresholds that are too high (> 3%) will rarely trigger because most models produce predictions clustered near zero. Examine the prediction distribution histogram in the ML pipeline before setting thresholds. A threshold of 0.5% to 1.5% is typical for hourly-bar models.
Image Placeholder: Regressor node showing model info dropdown with R-squared metrics, and signal output connecting to a Condition node
Strategy Reference Node
A Strategy Reference node lets one strategy consume the signals of another saved strategy. This enables strategy composition — building higher-level strategies from lower-level building blocks — without duplicating the underlying DAG.
Inputs (self-contained)
No input handles. The referenced strategy runs its own DAG internally; this node only surfaces its entry/exit signals as output.
Parameters
Strategy ID * required
Dropdown of all saved strategies in your account. Each entry displays:
- Strategy name
- Symbol — e.g., BTCUSDT, ETHUSDT
- Timeframe — e.g., 15m, 1h, 4h, 1d
- Status tag — Draft / Backtested / Live
The symbol and timeframe of the referenced strategy must match the referencing strategy. If they differ, validation fails with a clear error message. You cannot reference a strategy that references this strategy (circular dependency detection).
Alias * required
Unique identifier. Example: ref_trend_detection.
Display Name optional
Human-readable canvas label.
Direction Bias optional
Filters which signal types pass through from the referenced strategy. Same four options as the Classifier node:
- all — all signal types pass through
- long_only — only Long Entry and Long Exit signals
- short_only — only Short Entry and Short Exit signals
- long_short — all entry/exit signals; suppress any neutral output
Output Handle
| Handle | Position | Type | Connect To |
|---|---|---|---|
signal | right edge, center | handle-out (signal) | Condition node → left-hand "condition" slot. Signal values are categorical events: Long Entry, Short Entry, Long Exit, Short Exit. |
Use Case: Strategy Composition
A classic pattern is separating signal generation from trade management:
- Base strategy ("Trend Detection") — a DAG that detects trend direction using EMA crossovers, ADX, and volume confirmation. It emits Long Entry and Short Entry signals.
- Composite strategy ("Trend Following") — references the base strategy via a Strategy Reference node, then layers on additional filters (e.g., a Volatility Filter to avoid entry during high-VIX regimes) and risk management exits.
This means you can backtest and refine the "Trend Detection" core independently, then reuse it across multiple composite strategies without copy-pasting the DAG.
Strategy references are the DAG equivalent of function composition in code. They let you build a library of well-tested signal generators and mix them together, dramatically reducing the surface area for bugs when iterating on high-level trade logic.
Image Placeholder: Strategy Reference node with strategy dropdown showing saved strategies, connected to a Condition node that feeds an Entry node
Entry Node
The Entry node is the terminal node where your entire upstream signal chain converges into a trading decision. If the DAG is a circuit, the Entry node is the switch that closes and sends current to the order engine. Getting this node right is the difference between a strategy that trades and one that sits idle.
MOST IMPORTANT NODE
Every condition, filter, signal gate, and logic node in your DAG exists to serve the Entry and Exit nodes. Invest time understanding every combination mode and signal processing option below — small misconfigurations here produce large P&L differences.
Direction
* required — cannot be changed after creation
Each Entry node handles exactly one direction. To trade both long and short in the same strategy, create two Entry nodes — one Long, one Short. They are visually distinct on the canvas:
- Long (green node header) — enters a buy / long position. Executes a market buy order in the backtester.
- Short (red node header) — enters a sell / short position. Executes a market sell order in the backtester.
Direction is immutable after creation. If you need to switch directions, delete the node and create a new one.
Handle Layout
The Entry node has two sets of input handles on different edges:
Condition Inputs (LEFT edge)
Five handles labeled cond-0 through cond-4, stacked vertically between 20% and 78% of the node height. These accept:
- Condition node
resultoutput — a boolean true/false based on the condition's operator and threshold - Logic node
outoutput — the result of an AND/OR/NOT/XOR logic gate combining multiple upstream conditions - Signal Gate node
outoutput — a gated signal that only passes through when enabled
Connecting a wire to any condition slot auto-assigns it to the first available free slot. You can drag wires to a specific slot by dropping on the exact handle position.
Filter Inputs (TOP edge)
Five handles labeled filter-0 through filter-4, stacked horizontally between 10% and 90% of the node width. These accept:
- Filter node
gateoutput — a boolean that acts as a permission check
Critical rule: Unlike conditions (which combine according to the combination mode), ALL active filters must pass (true) for the entry to fire. Filters are AND-ed together unconditionally. A single active filter returning false blocks the entry regardless of conditions.
Use filters for hard constraints (e.g., "no trading during news events," "minimum volume threshold," "max positions already open") and conditions for directional signals. This separation keeps your DAG readable: conditions answer "should I enter?" and filters answer "am I allowed to?"
Combination Mode * required
Determines how the connected condition inputs are logically combined to produce a single entry decision. Each mode has its own configuration panel that appears when selected.
ALL connected conditions must evaluate to true for the entry to fire. If any connected condition is false, no entry occurs. Unconnected condition slots are ignored.
Example: Condition A (RSI < 30) AND Condition B (Volume > SMA) AND Condition C (Price above VWAP) — all three must be simultaneously true.
ANY connected condition evaluating to true triggers the entry. The entry fires on the first true condition (short-circuit evaluation).
Example: Condition A (MACD crossover) OR Condition B (RSI divergence) — either one alone is sufficient to enter.
or mode with many loosely-defined conditions can produce overtrading. Ensure each condition independently represents a valid entry reason.
Expects exactly one connected condition. The entry fires when that single condition is false. Connecting more than one condition in not mode triggers a validation error.
Example: Condition "RSI > 70" — enter when RSI is NOT overbought (i.e., RSI ≤ 70). Rarely used; consider inverting the condition operator instead.
Each connected condition is assigned a weight (slider, 0.0 – 1.0). On each bar, the weights of all true conditions are summed. If the sum exceeds a threshold (0.0 – 1.0), the entry fires.
Weighted Config Panel:
cond-0 weight: slider 0.0–1.0 (default 0.5)
cond-1 weight: slider 0.0–1.0 (default 0.5)
... (one slider per connected condition slot)
threshold: slider 0.0–1.0 (default 0.5)
Example: RSI oversold (weight 0.6) + Volume spike (weight 0.4). Threshold is 0.7. If only RSI triggers, sum = 0.6 < 0.7 — no entry. Both must trigger to exceed 0.7.
More than 50% of connected conditions must be true. If you connect 5 conditions, at least 3 must be true. If you connect 4, at least 3 must be true (strict majority).
Majority Config Panel:
min_votes: integer, default is ceil(N/2)+1. You can override to require more votes than a simple majority (e.g., set to 4 when 5 conditions are connected to require a supermajority).
total connected: read-only, shows the current count of wired condition slots.
Example: 5 conditions connected, min_votes = 3. At least 3 must be true. This is stricter than or (1-of-N) but looser than and (N-of-N).
Conditions must fire in a specific order within a configurable number of bars. The order is determined by the handle slot number — cond-0 must fire first, then cond-1, then cond-2, etc. This is the mode for pattern-based entries (e.g., "first a volume spike, then price breaks above resistance").
Sequential Config Panel:
max_bars_between: integer, max number of bars allowed between one condition firing and the next. If the next condition does not fire within this window, the sequence resets to the beginning.
order_enforcement: dropdown — strict or relaxed.
- strict: conditions must fire in exact handle order (0, 1, 2, ...) with no gaps. If cond-1 fires before cond-2, but cond-0 fires again, the sequence restarts at cond-0.
- relaxed: conditions can fire in any order as long as ALL required conditions fire within the window. The sequence completes when the last required condition fires, regardless of order.
Example (strict): Cond-0 "Volume spike" fires on bar 10. Cond-1 "Price crosses above SMA" fires on bar 12 (within max_bars_between=5). Sequence is valid; entry triggers on bar 12.
Sequential mode with strict enforcement and a narrow max_bars_between (e.g., 1–2) is extremely difficult to satisfy in practice. Start with 5–10 bars and tighten only if you see too many false sequences in backtest logs.
Signal Processing optional
Post-processing rules applied to the entry decision after the combination logic evaluates. These control how repeated or opposite signals are handled when a position is already open.
No post-processing. Every bar where conditions evaluate to true produces an entry signal, regardless of whether a position is already open. The backtester's position manager handles duplicate signals according to its own rules (typically: ignore entry signals while already in position).
Only the first entry signal after the position flattens is accepted. All subsequent signals are ignored until the position is closed and the strategy is flat again. This prevents re-entry on the same signal cluster.
Useful for trend-following strategies where you want one clean entry per trend, not multiple entries as the trend develops.
An entry signal in the opposite direction automatically closes the current position (via market order) before entering the new direction. This is always-on reversal — the strategy never goes flat; it flips from long to short and vice versa.
Classic use case: a mean-reversion strategy that is always in the market, flipping direction when the signal flips.
reverse_signal combined with a noisy ML classifier can produce whipsaw — rapid long/short flipping that bleeds the account through transaction costs and the bid-ask spread. Always pair with a minimum hold time or confidence margin.
Allows adding to an existing position on repeated entry signals. Each new signal opens an additional unit of the position size defined in the strategy settings. The backtester tracks the average entry price across all pyramid layers.
Pyramid without a max position cap can accumulate massive exposure during a strong trend. Always set a max pyramid layers limit in the strategy's position sizing settings.
Common Anti-Patterns
Too many conditions with "and" mode. Connecting 4–5 conditions all in and mode produces entries that are so rare the strategy effectively never trades. If your backtest shows < 5 trades over 6 months, relax the combination mode to majority or weighted.
No filters on the Entry node. Conditions answer "should I enter?" but filters answer "am I allowed to?" A strategy without a Volatility Filter or Time Filter on the Entry node will trade through high-VIX events, news spikes, and low-liquidity periods — moments when most strategies underperform.
Forgetting to wire both Long and Short Entry nodes. If your strategy uses a Classifier or Regressor that produces both long and short signals, but you only wire the Long Entry node, the short signals are silently ignored. The strategy will appear to have a directional bias that isn't in the model.
Image Placeholder: Entry node on the strategy canvas showing 5 condition handles on the left edge, 5 filter handles on the top edge, combination mode dropdown set to 'weighted', and the direction set to Long (green header)
Exit Node — Signal Exit
A Signal Exit node closes positions based on conditions evaluated on each bar — the DAG-driven counterpart to the risk-management exit. While the Risk Management Exit operates on price levels (stop loss, take profit), the Signal Exit operates on indicator values and model signals.
Role: exit
This is a signal-based exit node. It evaluates its connected conditions on every bar while a position is open and closes the position (via market order) when the conditions are met.
Applies To * required
- long — only closes long positions
- short — only closes short positions
- both — closes any open position regardless of direction
If you have separate exit logic for long and short positions, create two Signal Exit nodes — one for each direction.
Condition Inputs (LEFT edge)
Five handles labeled cond-0 through cond-4 on the left edge, identical layout to the Entry node's condition inputs. These accept Condition result, Logic out, and Signal Gate out outputs.
Combination Logic
Signal Exit nodes support a subset of combination modes (no not or sequential, as these patterns don't apply to exit logic):
- and — ALL connected exit conditions must be true to close the position
- or — ANY connected exit condition triggers the close (most common)
- weighted — weighted sum of true exit conditions exceeds threshold
- majority — majority of exit conditions are true
Common Exit Condition Examples
"RSI > 70" (overbought exit)
Close a long position when the asset becomes overbought. Classic mean-reversion exit.
"Price < SMA 20" (trend break exit)
Close a long position when price drops below the 20-period SMA, indicating the short-term trend has broken.
"MACD histogram crosses below 0" (momentum exhaustion exit)
Close when upward momentum exhausts and the MACD histogram turns negative.
"Classifier signal == Short" (model-driven exit)
Close a long position when your ML classifier flips from Long/Neutral to Short.
Signal exits and risk-management exits serve different purposes. Signal exits capture informational reasons to close (the thesis has changed). Risk-management exits capture protective reasons (price moved against you). A robust strategy has both types wired to the Exit node.
Image Placeholder: Signal Exit node with two condition inputs connected — one from an RSI condition and one from a MACD condition — and 'Applies To' set to 'long'
Exit Node — Risk Management
A Risk Management Exit node is self-contained — it has no input handles. It is automatically applied to every trade the strategy opens. Unlike the Signal Exit (which queries the DAG on each bar), the Risk Management Exit monitors price relative to entry and closes the position when predefined thresholds are breached.
Role: risk-management
Self-contained, no handles. Every trade opened by the strategy is automatically subject to these risk parameters. You cannot opt a trade out of risk management — if you attach this node to the strategy, it applies to all positions.
Applies To * required
- long — risk parameters apply only to long positions
- short — risk parameters apply only to short positions
- both — same risk parameters apply to all positions
If long and short positions need different risk profiles (e.g., wider stop for shorts in an uptrending market), create two Risk Management Exit nodes.
Stop Loss (SL)
Automatically closes the position when price moves against you by a specified amount. Always denominated from the entry price.
| Parameter | Type | Required | Description |
|---|---|---|---|
| sl_type | dropdown | <strong>percentage</strong> — distance as % of entry price (e.g., 2% below entry for long). <strong>price</strong> — absolute price level (e.g., close if BTC < $95,000). <strong>ATR multiple</strong> — distance as a multiple of the Average True Range (volatility-adjusted). | |
| sl_value | float | Numeric value interpreted according to sl_type. For percentage: 2.0 = 2%. For price: absolute price (94750.00). For ATR multiple: 1.5 = 1.5x ATR. | |
| sl_offset | float | Additional offset added to the calculated stop level. Positive values push the stop further from entry (wider, fewer exits). Negative values tighten it. Use 0.0 for no offset. |
Example: Long Stop Loss
Entry at $100,000. sl_type = percentage, sl_value = 2.0. Stop loss triggers when price drops to $98,000 (2% below entry).
Take Profit (TP)
Automatically closes the position when price moves in your favor by a specified amount. Locks in gains without relying on a signal-based exit.
| Parameter | Type | Required | Description |
|---|---|---|---|
| tp_type | dropdown | <strong>percentage</strong> — distance as % of entry price. <strong>price</strong> — absolute price level. <strong>ATR multiple</strong> — distance as a multiple of ATR. | |
| tp_value | float | Numeric value. For percentage: 5.0 = 5% gain triggers TP. | |
| tp_offset | float | Additional offset from the calculated level. Default: 0.0. |
Example: Long Take Profit
Entry at $100,000. tp_type = percentage, tp_value = 5.0. Take profit triggers when price reaches $105,000 (5% above entry).
Trailing Stop Loss (TSL)
A dynamic stop loss that moves with the price as it moves in your favor, but stays fixed when price reverses. This lets winners run while protecting accumulated gains.
| Parameter | Type | Required | Description |
|---|---|---|---|
| tsl_enabled | toggle | Enable or disable the trailing stop entirely. Default: off. | |
| tsl_activation | float | if enabled | How far price must move in your favor (as % from entry) before the trailing stop activates. Example: 1.0 means the stop starts trailing only after the position is +1% in profit. Prevents premature stop-outs during initial noise. |
| tsl_distance | float | if enabled | The distance the stop maintains behind the best price achieved. Can be expressed as a <strong>percentage</strong> (e.g., 2.0 = 2% behind the high for longs) or an <strong>ATR multiple</strong> (e.g., 1.5 = 1.5x ATR behind). Wider distance = fewer stop-outs, more drawdown given back. |
| tsl_step | float | Minimum price movement (in %) required before the stop updates to a new level. Prevents the stop from ratcheting up on every tick. Example: 0.5 means the stop only moves when price improves by at least 0.5% from the last stop-update level. Default: 0.0 (updates continuously). |
TSL Walkthrough (Long)
- Entry at $100,000. TSL activation = 1%, TSL distance = 2%.
- Price rises to $101,000 (+1%). Activation threshold met. Stop is set at $98,980 ($101,000 - 2%).
- Price rises to $103,000 (+3%). Stop trails up to $100,940 ($103,000 - 2%).
- Price peaks at $105,000 and reverses. Stop is locked at $102,900 ($105,000 - 2%).
- Price drops to $102,900. Stop triggers. Profit locked at +2.9% despite the reversal.
Time Stop
Closes the position after a fixed number of bars, regardless of P&L. Prevents capital from being tied up in stagnant positions and enforces a maximum trade duration.
| Parameter | Type | Required | Description |
|---|---|---|---|
| time_stop_enabled | toggle | Enable time-based exit. Default: off. | |
| time_stop_bars | integer | if enabled | Maximum number of bars a position can remain open. Count starts from the entry bar. Example: 50 on a 1h chart = max 50 hours in position. On bar 51, the position is closed at market regardless of P&L. |
Time Stop Example
A mean-reversion strategy on the 15m chart expects reversals within 2-3 hours. Set time_stop_bars = 20 (5 hours). If the price hasn't reverted by bar 20, the trade thesis is invalid — exit and free up capital.
Always include at least a hard stop loss on every strategy, even if you have robust signal exits. Signal exits depend on the DAG evaluating correctly on every bar — a data gap, a delayed indicator calculation, or a bug can leave you without an exit signal. A hard stop loss is the last line of defense. It doesn't ask the DAG — it just acts when price says so.
Setting the stop loss too tight. A stop loss below 0.5% on a volatile asset like crypto is death by a thousand cuts. Normal noise will trigger the stop repeatedly, and the cumulative loss from dozens of tiny stop-outs will exceed any single large loss you were trying to avoid. For BTC on 1h bars, stops below 1.5% are generally counterproductive. Use ATR-based stops to let market volatility determine the appropriate distance.
Take profit without a trailing stop. A fixed TP at +5% means you exit at exactly +5%, even if the asset goes to +20%. Pair TP with a TSL: set TP at a level where you're happy taking profits, but let the TSL capture additional upside if the trend continues past your TP target.
Image Placeholder: Risk Management Exit node showing Stop Loss panel (percentage type, 2%), Take Profit panel (percentage type, 5%), Trailing Stop panel (enabled, activation 1%, distance 2%), and Time Stop panel (enabled, 50 bars)