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.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.