OPEN-SOURCE SCRIPT
Actualizado

MTF Trend Agreement Map [AGPro Series]

440
MTF Trend Agreement Map [AGPro Series]

🔹 **Overview**

MTF Trend Agreement Map is a multi-timeframe alignment engine that reads the trend across five timeframes at once and distills the result into a single transparent agreement score. Instead of forcing you to flip between charts, the map tells you, on every bar, how many timeframes agree, which side wins, and whether the market is in a locked regime, a forming trend, or a conflict phase. It is built for swing traders, HTF-bias scalpers, position traders, and anyone who uses top-down analysis as part of their process.

🔸 **What Makes It Different**

Most MTF indicators show a single method (usually a moving-average cross) repeated across timeframes, which means five rows that all agree with each other by construction. This map does something different: for each timeframe it runs three independent methods — an EMA regime filter, a pivot-based market-structure read (HH/HL vs LH/LL), and a normalized momentum slope — and blends their individual votes into the final score. You see not only the agreement across timeframes but also the agreement across methods, which exposes weak or borderline regimes that a single-method tool would quietly hide.

🔺 **Methodology**

• EMA Trend: a timeframe is bullish when EMA50 is above EMA200 and price is above EMA50; bearish on the mirror condition; neutral otherwise.
• Market Structure: confirmed pivots are tracked in real time. A timeframe is bullish while the last two confirmed swings form higher highs and higher lows, bearish on lower highs and lower lows.
• Momentum Slope: the change in linear regression across a configurable lookback, normalized by ATR so that fast and slow assets are comparable.
• Consensus per timeframe: each active method casts a vote; bulls minus bears determines the row's net direction and strength.
• Overall alignment: bull and bear votes are summed across all active timeframes; the dominant side's share defines the agreement percentage.

◆ **Three-State Regime Engine**

• **LOCKED** — agreement above the strong threshold (default 80%). High-conviction regime, continuation-friendly, background tint activates.
• **TRENDING** — agreement between 50% and the strong threshold. Directional bias forming but not yet fully aligned. Trade with reduced size or wait for confirmation.
• **SPLIT** — agreement below 50%. Timeframes are in conflict, no majority side. Classic chop phase, favors mean-reversion strategies or standing aside.

🔔 **Signals & Alerts**

• Regime Lock (Bull or Bear): fires the first bar agreement crosses above the strong threshold while one side dominates. Designed as a continuation trigger, not a reversal signal.
• Chop / Conflict: fires when no side holds the majority, a classic filter for mean-reversion systems or a stand-aside cue for trend traders.
• Both generic and directional alertcondition() hooks are exposed so you can wire the map into automations.

⚙️ **Key Inputs**

• Core Engine: toggle any of the three methods on or off, and tune the pivot length and momentum lookback independently.
• Timeframes: four user-selected timeframes plus an optional Current row that auto-adapts to the chart TF. If the chart TF matches any selected TF, the Current row is hidden automatically to avoid double-counting.
• Panel: six location presets, four text sizes (default Normal), dark or light theme, optional per-method breakdown row.
• Background Tint: enable or disable, set the strong-alignment threshold (50–95%) and control transparency (70–99) to keep the chart premium.

📖 **How to Use**

• Top-down confirmation: take trades on your execution timeframe only when the higher rows in the map agree with your thesis.
• Regime filter: enable Regime Lock alerts to catch moments when the full map snaps into alignment — these are typical continuation windows.
• Conflict filter: when the map prints SPLIT, widen stops, reduce size, or step aside; trend strategies historically underperform during these phases.
• Method debugging: turn on the per-method breakdown to see which methods are driving the score and which are fighting it.

⚠️ **Limitations & Transparency**

• All timeframe values are non-repainting at bar close (lookahead is disabled), but intrabar values can update until the parent bar closes — this is expected MTF behavior.
• Market Structure requires enough history on each timeframe to confirm two swings; on very young assets or short charts the structure vote may be neutral until pivots print.
• The map is a context tool, not a standalone entry system — combine it with your own execution logic, risk management, and bias.

📌 **Risk Disclosure**

This script is provided for educational and analytical purposes only. It does not constitute financial advice, a recommendation, or a solicitation to trade any instrument. Markets involve substantial risk and past behavior does not guarantee future results. Always do your own research and manage risk responsibly.
Notas de prensa
🔧 UPDATE NOTES - V1.5

This update focuses on readability, structure, visual clarity, and usability.

The core purpose of the script remains unchanged.
This release improves how the existing multi-timeframe trend agreement logic is presented, organized, and interpreted on the chart.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

• Rebuilt the source header and naming structure.
The public script title now follows the current AGPro Series format while the panel title keeps the AG Pro brand presentation.

• Added a price-mapped agreement ribbon.
The map now provides an on-chart visual layer instead of relying only on the panel and background tint.

• Refined the agreement state model.
The script now separates LOCKED, TRENDING, SPLIT, and WAIT states more clearly through panel text, color, and labels.

• Added controlled regime labels.
Labels appear only when the agreement state changes, with spacing and retention controls to avoid overcrowding.

• Rebuilt the panel lifecycle.
The panel uses the required single merged blue header row and avoids clearing the header row during normal updates.


------------------------
Visual Improvements
------------------------

• Improved chart readability by adding the agreement ribbon, ribbon fill, and clearer state colors.

• Reduced visual clutter by keeping regime labels spacing-controlled and bounded.

• Refined visual hierarchy so the alignment score, dominant side, and timeframe rows are easier to scan.

• Adjusted positioning of elements to avoid relying on background tint as the only visual signal.


------------------------
Interface & Usability
------------------------

• Optimized panel layout for clearer information flow.

• Added configurable label density, label font size, panel font size, panel position, and panel theme controls.

• Kept the summary panel enabled by default for immediate context.

• Enhanced overall user experience without changing the core multi-timeframe agreement logic.


------------------------
Behavior Notes
------------------------

This update does not change the core analytical purpose of the script.

The goal is to improve clarity and usability, not to introduce predictive behavior.

Users should interpret outputs the same way as before, but with improved visual structure.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, timeframe differences, and higher-timeframe confirmation delay may affect how agreement states appear.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.