Give every strategy a structural context.
The Macro Channel detects the higher-timeframe channel a market is trading in — by linear regression or by pivots — and attaches it to your strategies. It aligns research dates with the current structure and, when enforcement is on, acts as a runtime guard inside backtests and exported bots.
Detect Compute the channel on D1, W1 or MN1 with configurable window, band width and validation parameters, and see it drawn over the chart before accepting it.
Attach Carry the channel inside the strategy definition from the miners and the Labs — the same channel travels with the candidate wherever it goes.
Enforce On channel break, stop new entries or close and stop — either permanently or only while price stays outside the channel.
Where you use it
The Macro Channel… button appears in the mining configurations and in the Labs. The modal computes the channel for the selected symbol and shows its direction, window and quality; changing any parameter recomputes it. Attaching the channel:
- Suggests the in-sample dates from the channel window, so mining studies the same structure the market is currently in.
- Stores the channel — anchors, width, confirmation bars and break behavior — inside each generated candidate.
- Recomputes per symbol when a multi-symbol workflow runs with “recompute at run” enabled, so each symbol gets its own current channel.
Changing the symbol or resetting the configuration detaches the channel rather than silently keeping a stale one.
Timeframe and window
The channel is computed on its own timeframe (D1 by default; any timeframe the vault holds, also
through the MCP tool compute_macro_channel with tf) and projected on the chart in whatever
timeframe you are looking at. Only closed candles count: the bar still forming is never part of the
window, so a channel computed at 09:00 and at 17:00 of the same day is built from the same candles.
The window that built it is shown next to the channel ([2025-09-22 00:00 -> 2026-09-22 00:00]),
with the year when it crosses years, and the number of closed bars used.
In Pattern Scanner and Marketing the pivot channel (ajustado-h6) is drawn as a
parallel band: a central line and two borders at the same distance, and its default number of bars
follows the channel timeframe so the window keeps a sensible length in hours. A channel whose window
is far larger than the chart is drawn attenuated so it does not hide the candles, and none of the
channel lines stretches the price scale.
Break behavior
Two decisions define the guard:
- Action on break — stop opening new entries, or close open positions and stop.
- Mode — latch (stop for good once broken) or pause while outside (re-arm when price returns inside the channel).
A break is confirmed only after the configured number of closes outside the band, on the channel’s own timeframe, to avoid reacting to a single wick.
In backtests and exported bots
When enforcement is enabled, the engine applies the guard during Run Backtest with the same behavior the exported bot will have. Exports for MetaTrader 5, NinjaTrader, cTrader and LEAN carry the guard: the bot draws the channel projection on the broker chart, logs channel events in the strategy log and applies the configured break behavior at runtime.
The channel is a regime instrument, not an entry signal. Its value is in refusing trades when the structure that justified the strategy is gone — treat a broken channel as “this bot’s context ended”, not as a reversal signal.