Skip to content
StatePath
Tool Atlascondition.scenario_approves

Tool

Scenario Approves

condition.scenario_approves

ConditionScenario

Inputs

pattern_idScalar

The pattern to look up, as a number — usually the code emitted by a candlestick or chart-pattern detector for the current bar.

signal_directionScalar

The proposed trade direction to look up, as a number — typically a code for long versus short coming from upstream signal logic.

Outputs

Boolean

A boolean that is true on each bar where the (pattern_id, signal_direction) pair is approved by the table, and false when it is denied or absent.

Scenario Approves is a lookup gate: it takes a pattern and a trade direction and checks them against an approval table you supply, firing true only when that exact combination is allowed. It’s a clean way to encode rules like “bullish engulfing approves longs but not shorts.”

Scenario Approves overview diagramscalarapprobool

How it works

You wire a numeric `pattern_id` and a numeric `signal_direction` into the node and provide a `table` that maps (pattern, direction) pairs to allow or deny. On each bar the node looks up the incoming pair and outputs true if the table approves it, false if it’s missing or denied.

Configuration

tablescalar

The approval map. It defines which (pattern, direction) pairs are allowed; any pair not listed as approved is treated as denied. Edit it to add or remove the combinations your strategy accepts.

table diagramscalarlookubool

Connects to

Reads from
Feeds into

Examples

  • Pattern whitelist: wire a candlestick pattern code and a long/short code in, then approve only bullish patterns for longs so shorts on those patterns are blocked.
  • Direction filter: gate a signal so a continuation pattern approves trades only in the trend direction.

Common mistakes

  • Leaving the table empty or missing the pair you actually trade — anything not explicitly approved is denied, so the gate stays false.
  • Feeding direction and pattern codes that don’t match the numbering the table expects, so valid setups silently fail the lookup.

See also