OPEN-SOURCE SCRIPT

Breakouts + MACD-V Signals by SBF

69
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.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน