OPEN-SOURCE SCRIPT
업데이트됨 Pro Trading Machine

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.
💎 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.
릴리즈 노트
- 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.
릴리즈 노트
- 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.
릴리즈 노트
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).
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.