OPEN-SOURCE SCRIPT
Atualizado

Pro Trading Machine

853
Pro Trading Machine (PTM) v3 is an advanced analytical framework designed for deep market structure decoding. Unlike standard indicators that provide lagging "Buy/Sell" signals, PTM v3 acts as a trader’s flight deck, aggregating 7 critical metrics into a single, unified workspace.

💎 Core Philosophy
Markets constantly shift between trending and sideways phases. PTM v3 automatically detects these regimes and applies Adaptive Weighting, re-calculating the importance of each component to ensure accuracy whether the market is explosive or flat.

🚀 Key Features & v3 Innovations:
Confluence Meter (Synergy Scoring):
The engine analyzes 7 independent components (VZO, Composite, Z-Score, DMI, and others) to calculate their alignment. A score of 6/7 or 7/7 signals an abnormally high probability of trend continuation, highlighted by automated background signals.
Adaptive Regime Detection:
The system distinguishes between TREND (▶) and FLAT (〓) regimes. In a trend, strength metrics (DMI) take priority; in a flat market, the weight shifts toward mean-reversion oscillators.
ATR Normalization & Volatility Scaling:
Every component is scaled relative to the Average True Range (ATR). This ensures that a signal on a 5-minute chart carries the same visual precision and mathematical weight as one on a Daily chart, adapted to the current market "heartbeat."
Divergence Detection Engine:
A built-in algorithm scans for price-to-oscillator divergences (VZO/Z-Score). This is your primary tool for identifying exhaustion zones and potential reversals before the price action actually turns.
📊 How to Read the Market with PTM v3:
Spotting Reversal Zones:
Monitor the Z-Score and VZO. When the Z-Score hits extreme statistical deviation levels and VZO forms a divergence with price, the market is overextended. This is an "Exhaustion Zone" where institutional players often take profits.
Confirming Trend Strength:
A stable green Composite histogram (above 50) combined with a high VZO line indicates a healthy trend. In this state, any price pullback is mathematically a high-probability entry opportunity.
Statistical Deviations:
The Z-Score allows you to see how far price has deviated from its mean. If the price pushes too far (Z-Score > 2.5), expect a Mean Reversion event.
🛠 Professional Customization:
Conservative Mode: Toggle this to filter out market noise on lower timeframes for smoother, more reliable signals.
Multi-Timeframe Analysis: Customize each component to pull data from higher timeframes, allowing you to see the "Big Picture" context on a local chart.
⚠️ Pro Disclaimer:
PTM v3 is a professional diagnostic instrument, not a "magic button." It does not draw arrows; it provides Context. It is designed to empower traders to make data-driven decisions based on confluence and statistical probability.
Notas de Lançamento
- Added proportional Z-Score based on returns for more accurate statistical normalization.
- Adaptive Weights: component weights now auto-adjust between TREND and FLAT regimes.
- Confluence Meter: introduced a 0–7 alignment score to quickly gauge component synergy.
- ATR Normalization: all indicators scaled by ATR for consistency across timeframes.
- Expanded Divergence Detection: VZO and Z-Score divergence checks for better reversal zone identification.
- Conservative Mode: new option to reduce noise on lower timeframes.
- Visual Improvements: layered display (VZO, Z-Score, Composite) and background highlighting for confluence.
- User Parameters: extended MTF and tuning options for flexible customization without changing core logic.
Notas de Lançamento
- Proportional Z‑Score based on returns for more accurate normalization.
- Adaptive Weights: component weights now smoothly adjust between TREND and FLAT regimes.
- Confluence Meter: introduced a 0–7 alignment score for quick assessment of component synergy.
- ATR Normalization: all indicators scaled by ATR for consistency across timeframes.
- Expanded Divergence Detection: VZO and Z‑Score divergence checks for improved reversal-zone identification.
- Conservative Mode: added extra EMA smoothing to reduce noise on lower timeframes.
- Layered Visuals: VZO (OB/OS zones), multi-color Z‑Score, Composite histogram, and inverted DMI displayed in layers.
- Extended MTF & Inputs: more multi-timeframe options and tuning parameters without altering core logic.
Notas de Lançamento
Summary of improvements
- Proportional Z‑Score: Z‑Score length is scaled (len × 5) instead of a fixed hardcode, improving responsiveness across settings.
- Adaptive weights: Component weights adjust depending on detected market regime (TREND vs FLAT) to favor trend components in trending markets and oscillators in range.
- Confluence meter: New aggregate meter that quantifies alignment of components on a −7…+7 scale.
- Conservative mode: Global "conservative" option increases EMA/smoothing across components to reduce noise.
- ATR normalization: VZO and DMI are normalized by ATR so those measures become volatility-aware and comparable across instruments/periods.
- MTF confirmation: Optional multi-timeframe confirmation for VZO/Composite/Z‑Score before contributing to confluence.
- Layered visualization: Foreground VZO line with zones, multi‑colored Z‑Score line, and background DMI histograms; clear front→back layering and conditional colors.
- Divergence detection & alerts: Bull/bear divergence detection added with alertconditions and optional custom alert triggers.
- Performance & safety: MTF requests use lookahead_off and nz guards to avoid future leakage and na propagation.

Default parameter changes
- max_bars_back reduced / set to 1000 by default to limit history and improve performance.
- Conservative smoothing default increased: when conserv=true, composite smoothing minimum raised (e.g., to 7).
- MTF confirmation OFF by default (mtfOn = false); default higher TF typically "60".
- Symbol scaling disabled by default (symOn = false); rolling window default ~200.
- Z‑Score window uses proportional default (len×5) rather than a fixed small window.
- Typical defaults: PhiSmoother (if used), ph ≈ 3.0; sp and layer counts tuned for balanced smoothing vs CPU (lenLayers moderate).

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.