PROTECTED SOURCE SCRIPT
已更新

3 Drives Strategy Nunes

106
The 3 Drives Strategy Nunes is a technical indicator built for TradingView that identifies the Three Drives Harmonic Pattern, a powerful reversal structure consisting of five distinct legs and three consecutive price "drives". This script is developed in Pine Script v6 (2026) to ensure maximum execution stability and to resolve common compilation errors found in older versions, such as "shadowing variables" or "undeclared identifiers".

1. Core Pattern Logic: The Harmonic Geometry
The Three Drives pattern is a mathematical sequence based on specific Fibonacci ratios:

- Structure: The pattern is made of 5 legs, where each drive represents a significant peak (Bearish) or valley (Bullish).

- Retracements (A & B): Points A and B should ideally hit the $61.8\%$ retracement of the preceding drive.

- Drive Extensions (2 & 3): Drives 2 and 3 should reach the $127.2\% - 161.8\%$ extension of the prior retracement.

Targeting: This script specifically monitors for the $1.272$ Fibonacci extension to mark high-probability reversal zones.

2. The "Green Light": RSI Momentum Divergence
A harmonic pattern alone can be risky during high-momentum trends. To filter for high-probability setups, this strategy integrates an RSI Momentum

Filter: Divergence Requirement: As seen in the RSI pane of the provided BTC 4h chart, the script identifies "Bull" or "Bear" momentum divergences.

The Signal: A Buy (B) signal triggers only if the price hits the 3rd drive target while the RSI is making a higher low (Bullish Divergence).The Goal: This confirms that while the price is making a new extreme, the market's underlying strength is exhausting, signaling an imminent trend change.

3. Advanced Filtering: Preventing "Falling Knives"One of the most common issues with reversal indicators is that they trigger during impulsive, vertical moves (momentum spikes).

This script implements an Absorption Filter to avoid these traps:Absorption Logic: The script calculates the average volume and the ATR (Average True Range).Wick Requirement: Signals only appear if the candle shows "struggle"—high volume but a candle body that is small relative to its total range.Impact: This prevents the script from signaling during large Marubozu candles (impulsive breakouts) and waits for the "wicking" that indicates institutional absorption.

4. Case Study: BTC/USDC 4h Chart Analysis
Looking at the provided example for BTC PERP (4h) in January 2026:Jan 21st Buy Signal: The price chart shows a green "B" label appearing after a deep third drive.Confirmation: Simultaneously, the RSI pane displays a green "Bull" divergence label, confirming the "Green Light" entry.Sell Signals: Multiple red "S" labels correctly identified the exhaustion peaks during the upward trend in early January by detecting the Bearish Divergences at the 1.272 extension zones.

5. Technical Architecture (Pine Script v6)To ensure this script passes the rigorous TradingView House Rules, the code has been engineered for stability:

Global Series Execution: Functions like ta.atr() and ta.pivotlow() are placed in the global scope to ensure they execute on every bar, providing accurate historical calculations and avoiding conditional execution warnings.Scope & Shadowing Fixes: All variables are initialized using var float at the top level to resolve "undeclared identifier" errors. Updates within if blocks use the proper := operator to prevent variable shadowing.

Clean Interface: Minimalist labels (B and S) ensure the chart remains readable across various timeframes, from 15m intraday scalps to 4h swing trades.Usage SettingsPivot Sensitivity: Control how the script detects market swings (Lower = more signals, Higher = more conservative).Fibonacci Target: Default is $1.272$, the gold standard for Three Drives reversals.RSI Period: Standard $14$-period RSI for reliable momentum tracking.
發行說明
The 3 Drives Strategy Nunes Pro is a high-precision reversal indicator optimized for Pine Script v6. It identifies the classic 3 Drives Harmonic Pattern, a 5-leg structure characterized by three consecutive market drives.

Key Features
Momentum Confirmation (The Green Light): Signals are validated by RSI Divergence. A Buy signal (B) requires a price lower-low paired with an RSI higher-low, confirming seller exhaustion.

Institutional Interest Filter: To reduce market noise, the script filters for Volume Spikes. Signals appearing with high relative volume are marked with darker labels, indicating a higher probability of institutional involvement.

Automatic Breakeven: Designed for risk management, the strategy automatically moves your Stop Loss to the Entry Price once TP1 is reached, ensuring a risk-free trade for the remaining position.

Multi-Stage Take Profit: The logic draws three distinct TP levels (38.2%, 61.8%, and 100%) and clears previous levels when a new trade is triggered to maintain chart cleanliness.

Technical Stability (v6 Fixes)
This script resolves several common v6 compilation issues found in earlier versions:

Variable Shadowing: Uses the := operator correctly to update variables within conditional scopes.

Undeclared Identifiers: All pivot and RSI data points are initialized globally to prevent calculation errors.

Series Calculation Warnings: Core series functions like ta.atr and ta.pivotlow are placed in the global scope to ensure consistent history across all bars.
發行說明
This indicator automates the identification of the Three Drives Harmonic Pattern, optimized for real-time trading with dynamic alerts. It is built on Pine Script v6 to ensure zero compilation errors and stable performance across all timeframes.

Key Technical Features:

Balanced Signal Engine: This version is calibrated to detect high-probability reversals without over-filtering. It uses a $1.3x$ Volume Multiplier to confirm institutional interest and RSI Divergence to validate momentum exhaustion.

Dynamic Alerts (Telegram Ready): The script includes an automated messaging system. When a signal triggers, it generates a formatted message containing the Ticker Symbol, Signal Type, 3 Take Profit levels, and the Stop Loss.

Visual Risk Management: Only the levels for the most recent trade are displayed (TP1, TP2, TP3, and SL) to maintain a clean workspace on charts like 15m or 1h.

Trend Filtering (Optional): Includes an EMA 200 toggle to allow users to choose between trend-following or mean-reversal setups.
發行說明
Update visual of TPs and SL
發行說明
Clean up TPs and SL invalid trades
發行說明
Visual corrections
發行說明
Alerts corrections
發行說明
Updates, remove TPs and SL and activate alerts on TradingView
發行說明
Refactor and add some pivots updates.

Use 4-5 pivot sensitivity for 4h; 3-4 for 30m/1h
發行說明
Change colors
發行說明
Change name
發行說明
RSI filter added

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。