OPEN-SOURCE SCRIPT
VWAP Breakout Strategy + EMAs + Clean Cycle/TP/SL Plots

Here’s a quick user-guide to get you up and running with your “VWAP Breakout Strategy + EMAs + Clean Cycle/TP/SL Plots” script in TradingView:
⸻
1. Installing the Script
1. Open TradingView, go to Pine Editor (bottom panel).
2. Paste in your full Pine-v6 code and hit Add to chart.
3. Save it (“Save as…”): give it a memorable name (e.g. “VWAP Breakout+EMAs”).
⸻
2. Configuring Your Inputs
Once it’s on the chart, click the ⚙️ Settings icon to tune:
Setting Default What it does
ATR Length 14 Period for average true range (volatility measure)
ATR Multiplier for Stop 1.5 How many ATRs away your stop-loss sits
TP1 / TP2 Multipliers (ATR) 1.0 / 2.0 Distance of TP1 and TP2 in ATR multiples
Show VWAP / EMAs On Toggles the blue VWAP line & EMAs (100/34/5)
Full Cycle Range Points 200 Height of the shaded “cycle zone”
Pivot Lookback 5 How many bars back to detect a pivot low
Round Number Step 500 Spacing of your dotted horizontal lines
Show TP/SL Labels On Toggles all the “ENTRY”, “TP1”, “TP2”, “STOP” tags
Feel free to adjust ATR multipliers and cycle-zone size based on the instrument’s typical range.
⸻
3. Reading the Signals
• Long Entry:
• Trigger: price crosses above VWAP
• You’ll see a green “Buy” tag at the low of the signal bar, plus an “ENTRY (Long)” label at the close.
• Stop is plotted as a red dashed line below (ATR × 1.5), and TP1/TP2 as teal and purple lines above.
• Short Entry:
• Trigger: price crosses below VWAP
• A red “Sell” tag appears at the high, with “ENTRY (Short)” at the close.
• Stop is the green line above; TP1/TP2 are dashed teal/purple lines below.
⸻
4. Full Cycle Zone
Whenever a new pivot low is detected (using your Pivot Lookback), the script deletes the old box and draws a shaded yellow rectangle from that low up by “Full Cycle Range Points.”
• Use this to visualize the “maximum expected swing” from your pivot.
• You can quickly see whether price is still traveling within a normal cycle or has overstretched.
⸻
5. Round-Number Levels
With Show Round Number Levels enabled, you’ll always get horizontal dotted lines at the nearest multiples of your “Round Number Step” (e.g. every 500 points).
• These often act as psychological support/resistance.
• Handy to see confluence with VWAP or cycle-zone edges.
⸻
6. Tips & Best-Practices
• Timeframes: Apply on any intraday chart (5 min, 15 min, H1…), but match your ATR length & cycle-points to the timeframe’s typical range.
• Backtest first: Use the Strategy Tester tab to review performance, tweak ATR multipliers or cycle size, then optimize.
• Combine with context: Don’t trade VWAP breakouts blindly—look for confluence (e.g. support/resistance zones, higher-timeframe trend).
• Label clutter: If too many labels build up, you can toggle Show TP/SL Labels off and rely just on the lines.
⸻
That’s it! Once you’ve added it to your chart and dialed in the inputs, your entries, exits, cycle ranges, and key levels will all be plotted automatically. Feel free to experiment with the ATR multipliers and cycle-zone size until it fits your instrument’s personality. Happy trading!
⸻
1. Installing the Script
1. Open TradingView, go to Pine Editor (bottom panel).
2. Paste in your full Pine-v6 code and hit Add to chart.
3. Save it (“Save as…”): give it a memorable name (e.g. “VWAP Breakout+EMAs”).
⸻
2. Configuring Your Inputs
Once it’s on the chart, click the ⚙️ Settings icon to tune:
Setting Default What it does
ATR Length 14 Period for average true range (volatility measure)
ATR Multiplier for Stop 1.5 How many ATRs away your stop-loss sits
TP1 / TP2 Multipliers (ATR) 1.0 / 2.0 Distance of TP1 and TP2 in ATR multiples
Show VWAP / EMAs On Toggles the blue VWAP line & EMAs (100/34/5)
Full Cycle Range Points 200 Height of the shaded “cycle zone”
Pivot Lookback 5 How many bars back to detect a pivot low
Round Number Step 500 Spacing of your dotted horizontal lines
Show TP/SL Labels On Toggles all the “ENTRY”, “TP1”, “TP2”, “STOP” tags
Feel free to adjust ATR multipliers and cycle-zone size based on the instrument’s typical range.
⸻
3. Reading the Signals
• Long Entry:
• Trigger: price crosses above VWAP
• You’ll see a green “Buy” tag at the low of the signal bar, plus an “ENTRY (Long)” label at the close.
• Stop is plotted as a red dashed line below (ATR × 1.5), and TP1/TP2 as teal and purple lines above.
• Short Entry:
• Trigger: price crosses below VWAP
• A red “Sell” tag appears at the high, with “ENTRY (Short)” at the close.
• Stop is the green line above; TP1/TP2 are dashed teal/purple lines below.
⸻
4. Full Cycle Zone
Whenever a new pivot low is detected (using your Pivot Lookback), the script deletes the old box and draws a shaded yellow rectangle from that low up by “Full Cycle Range Points.”
• Use this to visualize the “maximum expected swing” from your pivot.
• You can quickly see whether price is still traveling within a normal cycle or has overstretched.
⸻
5. Round-Number Levels
With Show Round Number Levels enabled, you’ll always get horizontal dotted lines at the nearest multiples of your “Round Number Step” (e.g. every 500 points).
• These often act as psychological support/resistance.
• Handy to see confluence with VWAP or cycle-zone edges.
⸻
6. Tips & Best-Practices
• Timeframes: Apply on any intraday chart (5 min, 15 min, H1…), but match your ATR length & cycle-points to the timeframe’s typical range.
• Backtest first: Use the Strategy Tester tab to review performance, tweak ATR multipliers or cycle size, then optimize.
• Combine with context: Don’t trade VWAP breakouts blindly—look for confluence (e.g. support/resistance zones, higher-timeframe trend).
• Label clutter: If too many labels build up, you can toggle Show TP/SL Labels off and rely just on the lines.
⸻
That’s it! Once you’ve added it to your chart and dialed in the inputs, your entries, exits, cycle ranges, and key levels will all be plotted automatically. Feel free to experiment with the ATR multipliers and cycle-zone size until it fits your instrument’s personality. Happy trading!
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.