OPEN-SOURCE SCRIPT

Trend MACD [JopAlgo]

91
Trend MACD [JopAlgo] — momentum made obvious (4-state histogram)

What it does (one line):
A clean MACD histogram using EMA(fast) − EMA(slow) with a signal line. The columns change color to show trend side and momentum change at a glance.

Green = above 0 and rising → positive trend, momentum building

White (upside) = above 0 but fading → still positive, momentum cooling

White (downside) = below 0 but improving → still negative, momentum recovering

Red = below 0 and falling → negative trend, momentum building down

Zero line = the bull/bear divider. Distance from zero = thrust. Color change = momentum shift.

What you’ll see

Dashed zero line for the trend divider

Column histogram with the 4-state color logic above

No clutter—just momentum and regime, clean

Read it in 3 seconds: Which side of 0? Are bars getting bigger or smaller? Did the color flip?

How to use it (simple playbook)

Direction filter

Look for longs while histogram is ≥ 0.

Look for shorts while histogram is ≤ 0.

Timing

Green sequence (above 0, growing): join pullbacks at real levels.

White above 0: positive but cooling—buy pullbacks only at levels, don’t chase.

White below 0: negative but improving—prepare for reclaim trades at levels.

Red sequence: trend down—sell pops at levels.

Location first (always)

Use Volume Profile v3.2 [JopAlgo] (VAH/VAL/POC/LVNs) and Anchored VWAP [JopAlgo] (session/weekly/event).

No level, no trade.

Quality check (optional, strong)

CVDv1 [JopAlgo]: execute when Alignment OK and no Absorption against your side.

RVOL (if you track it): prefer breakouts with RVOL above cutoff.

Entries, exits, risk (keep it tight)

Continuation long: price retests VAL / AVWAP / MA cluster in an up regime (≥ 0). Histogram stays ≥ 0 and turns green again → enter.
Stop: under structure. Targets: POC/HVNs or next swing.

Break + retest: breakout through a level while histogram flips from white→green above 0 (or white→red below 0 for shorts). Enter on the retest that holds.

Trim / avoid: when bars shrink toward 0 (white) into your target / HVN—momentum is cooling. Don’t chase fresh highs with white bars.

Settings that matter (how to tune)

Fast Length (default 25)
Shorter = quicker turns (more noise). Longer = steadier, slower.

Slow Length (default 200)
Big backbone. For intraday you might use 21/55 or 12/26; for swing the default 25/200 or 20/100 is solid.

Signal Smoothing (default 9)
Higher = smoother, fewer flips. Lower = more reactive.

Source
close is fine; if you use hlc3, expect slightly smoother behavior.

Suggested presets

Scalp (1–5m): 12 / 26 / 9

Intraday (15m–1H): 21 / 55 / 9

Swing (2H–4H): 25 / 100 or 25 / 200 / 9

Daily backdrop: 20 / 100 or 50 / 200 / 9 (execute on lower TF)

Pattern cheat sheet

Green staircase above 0 → trend leg; buy pullbacks to VP/AVWAP.

White above 0 → positive but tiring; avoid chasing; wait for retest.

Flip through 0 with expansion → regime change; use the first retest at a level.

Red staircase below 0 → trend down; sell pops at VP edges.

Diverging price vs shrinking bars → momentum thinning; tighten risk.

Best combos (kept simple)

Volume Profile v3.2: entries at VAH/VAL/LVNs, targets at POC/HVNs.

Anchored VWAP: reclaim/reject with matching histogram side is high-quality timing.

CVDv1: take MACD-aligned setups with flow (ALIGN OK, no Absorption).

RVOL: confirmation that the push has participation.

Common mistakes this helps you avoid

Longs with red momentum or shorts with green momentum.

Chasing new highs on white (cooling) bars.

Trading mid-range when histogram keeps whipsawing around 0 (do less; wait for level).

Disclaimer:

This indicator is an educational tool, not financial advice. Markets are risky; you can lose money. Always test your settings, trade at defined levels, and use risk management. Data/feeds vary across venues; outcomes may differ. No guarantees or warranties are provided.

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。