Skip to main content

Strategy Pipeline

This page explains the runtime execution order of components inside a Pattern. Each component is described in detail on its own page — see See Also below.

Execution Flow

On every bar update (or tick, depending on SignalCalculate), the pattern evaluates its components in this order:

OnBarUpdate()
└── Pattern.Evaluate()
├── [1] Decision Tree → Long | Short | None
│ ├── Signal (condition)
│ ├── Action : Signal → side effect anywhere in tree
│ ├── LogicalNode (AND/OR)
│ └── Filter (gate)
├── [2] Entry → submit order + set stop
└── [3] Exit / Trail → manage open position

└── Risk Management → session-level guard (max loss, max trades)

Component Responsibilities

ComponentClass(es)Responsibility
Signal / Decision TreeSignal, LogicalNode, RangeNodeDetermine trade direction from market data
FilterValueInRangeFilterGate signal by an external condition (value in range)
ActionAction : Signal, RollingProfileActionDecision Tree node; executes a side effect at any position in the tree. Execution order is determined by tree structure
EntryEntry, BarStopLossEntry, SignalStopLossEntry, FiboRetracementEntryOrder submission and initial stop placement
ExitBarCloseTargetFixed profit target
TrailTrail, BarHiLoTrailDynamic stop management after activation
Risk ManagementRiskManagementMax loss, max drawdown, max profit, and max trades per session

Key Rules

The decision tree is evaluated first. If it returns None, the remaining components are not invoked — the pattern short-circuits and waits for the next bar or tick.

Action inherits from Signal and is a Decision Tree node — it can appear at any position in the tree. Execution order is determined by tree structure, not by a fixed pipeline sequence.

Risk Management is the last barrier. It blocks Entry independently of the signal result, enforcing session-level caps on loss, drawdown, profit, and trade count.

See Also

  • Action — side effect node in the decision tree
  • Entry — order submission (Market, Limit, StopLimit)
  • Exit — profit target and exit signals
  • Trail — trailing stop management
  • Filter — signal gating by external conditions
  • Decision Tree — AND/OR/CONJUNCTION signal combination
  • Risk Management — session-level trading limits