OPEN-SOURCE SCRIPT

Momentum Conviction [HermesCore]

5 685
WHAT THIS INDICATOR DOES

Momentum Conviction watches two things at the same moment: where price momentum turns, and how much agreement stands behind that turn. The turn is an EMA crossover — the fast EMA (Exponential Moving Average) crossing the slow one — but only when the MACD histogram (Moving Average Convergence Divergence, a standard momentum gauge) is leaning the same way. A LONG fires when the fast EMA crosses above the slow EMA while MACD momentum is positive; a SHORT is the exact mirror. A cross with no momentum behind it is ignored.

Every signal that does fire is then graded 0 to 5 by a conviction score, built from five independent checks the moment the signal prints. You decide how much conviction you require: show every signal, or raise the minimum and keep only the ones with weight behind them.

WHY IT IS DIFFERENT

Most moving-average tools print an arrow on every cross and leave you to separate the real ones from the noise by eye. My rules are:
  • A cross is not a signal on its own. It has to happen while MACD momentum agrees. A large share of the crosses that fail are crosses that fired into flat or opposing momentum; gating on the histogram removes them before they ever reach the chart.
  • The score is a filter, not decoration. It is not a confidence label added after the fact — it is five yes/no facts, known at signal time, summed. Set a minimum and the weak signals never appear.
  • The higher timeframe gets a vote, not the final word. One of the five points is HTF agreement, so you can weigh it without being ruled by it.
  • ADX is deliberately excluded. I tested it repeatedly on the charts this was built for and it did not earn a place.
  • Everything updates on confirmed bars only. No intrabar flicker, no repainting, and the higher-timeframe reads use no look-ahead.

HOW TO READ THE CHART
  • LONG bubble (green, below the bar) and SHORT bubble (red, above it) mark each qualifying signal. Bubble size is adjustable.
  • The gradient EMA cloud is aqua when the fast EMA sits above the slow one (uptrend lean) and magenta when below. The slow EMA carries a soft gold glow so the spine of the trend is always easy to find.
  • A faint background tint colours the whole pane in the trend colour — a peripheral regime cue, nothing to act on by itself.
  • A faint gold background band shows the previous day's and previous week's range, for context on where price sits inside the larger structure.

THE CONVICTION SCORE

Each check is worth one point, decided at signal time, and never changes afterwards:
  • Momentum strength — the MACD histogram is larger than its own 50-bar average: the push is bigger than this market's normal push. +1
  • Slope agreement — the fast EMA is itself moving in the signal's direction, not merely crossing. +1
  • Higher-timeframe trend — the chosen HTF (4H by default) is trending the same way; its price and 50/200 EMAs agree. +1
  • Not over-extended — price is within a set ATR (Average True Range, a volatility measure) distance of the slow EMA, so you are not entering after the move has already run. +1
  • RSI room — RSI (Relative Strength Index, 0–100) is not already at an extreme in the signal's direction; there is room left to travel. +1

Five of five is a cross with bigger-than-normal momentum, sloping the right way, aligned with the higher timeframe, entered near value, with room to run. Zero is a bare cross with nothing behind it. The minimum-score input is where you set your own bar.

HOW I USE IT

The defaults are deliberately fast (EMA 2/12) — a low-timeframe, many-signals setting. Slow the lengths down for swing work and you get fewer, heavier signals.
I treat a high-score signal that agrees with the higher timeframe as the one worth acting on, and a low-score signal as information about the tape rather than a trade. The honest part: this is trend and momentum logic. It earns its keep when the market trends and gives a good deal of it back in ranges. The regime tint and the HTF vote exist to keep you on the right side of that question, not to solve it — be honest with yourself about which regime you are actually in.

SETTINGS THAT MATTER
  • EMA fast/slow and MACD lengths — the engine. Defaults are fast; raise them for higher timeframes and fewer, heavier signals.
  • Minimum score (0) — your conviction bar. 0 shows everything; raise it to thin the chart to signals with agreement behind them.
  • Higher timeframe (4H) — the trend you check against. Match it to your horizon.
  • Max distance to slow EMA (2.0 ATR) — how far from value still counts as "not over-extended."
  • RSI overbought/oversold (72/28) — the "room left" thresholds.
  • Each score component can be switched off individually if you want to see what it contributes on its own.

ALERTS

Momentum Conviction LONG and Momentum Conviction SHORT, both firing on the confirmed close of the signal bar, with ticker and timeframe in the message.

CALCULATION DETAILS
  • All logic evaluates on confirmed bars. A signal cannot appear or disappear inside a forming candle.
  • The trigger is the fast/slow EMA cross; the gate is the sign of the MACD histogram on the same close.
  • The higher-timeframe trend uses that timeframe's prior-bar close and 50/200 EMAs, requested with no look-ahead, so it does not repaint.
  • The conviction score is computed once, at signal time, from the values listed above.

HONEST LIMITATIONS
  • This is trend-following momentum. In a range it will cross back and forth and hand gains back; no filter removes that, it only thins it.
  • The score is a hypothesis about signal quality, not a measured edge. This indicator does not keep score for you. If you want to know whether higher scores actually perform better on your symbol, run the matching strategy version in the Strategy Tester with realistic costs and read the result yourself.
  • The defaults trade often. On a live account, slippage and spread on frequent entries matter more than the chart suggests — cost everything before you believe anything.
  • Signals are evaluated at the close; real fills happen later and worse. Treat the chart as the ideal case.
  • It runs on any symbol and timeframe, but "runs" is not "has an edge" — whether it works on your market is yours to verify. Past behaviour is not the next signal.
  • Not financial advice. It manages no positions and places no orders.

ORIGINALITY

The ingredients — EMA crosses, MACD, RSI, ATR — are as old as charting. The momentum-gated trigger, the five-factor conviction score and its use as a hard filter, the regime-aware visual language and the non-repaint construction are my own work in Pine v6. Every value the script uses is recomputable from the rules above.

Questions and suggestions are welcome in the comments. Enjoy.

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

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