OPEN-SOURCE SCRIPT
Breakouts + MACD-V Signals by SBF

Breakouts + MACD-V Signals by SBF
What This Script Does
📌 1) Breakout Zone Visualization
Stores the last N bars’ highs and lows (showLast).
Draws horizontal lines for each past high/low.
Optionally filters levels based on current price (e.g., only highs above current price).
Fills the zone between highest high and lowest low (support/resistance area).
This is similar to the FoxLogica breakout zone concept.
This helps you visually identify breakout support/resistance based on recent bar structure.
📊 2) MACD‑V Volatility‑Normalized Momentum
Computes MACD‑V:
MACD‑V
=
(
EMA
𝑓
𝑎
𝑠
𝑡
−
EMA
𝑠
𝑙
𝑜
𝑤
ATR
)
×
100
MACD‑V=(
ATR
EMA
fast
−EMA
slow
)×100
This gives momentum normalized by volatility, so readings are more consistent across markets/timeframes.
It also plots:
MACD‑V line
Signal line
Histogram
📈 Basic momentum thresholds (+70/−70) signal entries.
📈 3) Entry / Exit Logic
You asked for specific levels:
🐂 LONG ENTRY: MACD‑V crosses above +70
🐻 SHORT ENTRY: MACD‑V crosses below −70
💎 EXIT PT1: MACD‑V hits ±120
💎 EXIT PT2: MACD‑V hits ±150
The script:
Shows arrows/markers on the chart for these entry/exit conditions,
Has alert conditions ready to use inside TradingView.
🔔 4) Alerts
You can create alerts on these conditions:
MACD‑V Long Entry
MACD‑V Exit Points
etc.
This means you can link alerts to webhook bots, email, push—not limited to manual watching.
🧠 Key Notes on Pine Script v6
This script uses //version=6, TradingView’s latest version. Pine Script v6 requires:
Explicit types and more strict boolean logic
Specific parameter names for box.new() and other functions
No implicit casting of numeric to boolean (so conditions must be proper bool)
Timeframes must include multiplier format (“1D”, “1W”, etc.)
Converting versions or editing should be done using TradingView’s built‑in “Convert to v6” tool if you start from a v5 script.
What This Script Does
📌 1) Breakout Zone Visualization
Stores the last N bars’ highs and lows (showLast).
Draws horizontal lines for each past high/low.
Optionally filters levels based on current price (e.g., only highs above current price).
Fills the zone between highest high and lowest low (support/resistance area).
This is similar to the FoxLogica breakout zone concept.
This helps you visually identify breakout support/resistance based on recent bar structure.
📊 2) MACD‑V Volatility‑Normalized Momentum
Computes MACD‑V:
MACD‑V
=
(
EMA
𝑓
𝑎
𝑠
𝑡
−
EMA
𝑠
𝑙
𝑜
𝑤
ATR
)
×
100
MACD‑V=(
ATR
EMA
fast
−EMA
slow
)×100
This gives momentum normalized by volatility, so readings are more consistent across markets/timeframes.
It also plots:
MACD‑V line
Signal line
Histogram
📈 Basic momentum thresholds (+70/−70) signal entries.
📈 3) Entry / Exit Logic
You asked for specific levels:
🐂 LONG ENTRY: MACD‑V crosses above +70
🐻 SHORT ENTRY: MACD‑V crosses below −70
💎 EXIT PT1: MACD‑V hits ±120
💎 EXIT PT2: MACD‑V hits ±150
The script:
Shows arrows/markers on the chart for these entry/exit conditions,
Has alert conditions ready to use inside TradingView.
🔔 4) Alerts
You can create alerts on these conditions:
MACD‑V Long Entry
MACD‑V Exit Points
etc.
This means you can link alerts to webhook bots, email, push—not limited to manual watching.
🧠 Key Notes on Pine Script v6
This script uses //version=6, TradingView’s latest version. Pine Script v6 requires:
Explicit types and more strict boolean logic
Specific parameter names for box.new() and other functions
No implicit casting of numeric to boolean (so conditions must be proper bool)
Timeframes must include multiplier format (“1D”, “1W”, etc.)
Converting versions or editing should be done using TradingView’s built‑in “Convert to v6” tool if you start from a v5 script.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.