已更新

Respected MA Detector

3 114
RESPECTED MA DETECTOR

Most traders run a stack of moving averages and eyeball which one price is "respecting". This indicator does that job for you. An idea spawned from Qullamaggie lore, It works out which MA the current trend is actually riding, shows only that line, and walks the trail up or down the ladder as the trend strengthens or weakens.

HOW IT WORKS

You set up to four moving averages, fast to slow. Each can be EMA or SMA and can be switched off. The defaults are EMA 10 / 15 / 20 / 43. Separate to Qullamaggie who lists the 10 / 20 DEMA and the 50 DMA, I have added the 15 ema (which can be toggled off) and the 43 ema ( which I believe works better than the 50sma

An MA counts as "held" when both of these are true:
- Price closes at or above it, allowing a small dip below measured in ATR (Hold tolerance based on volatility of the stock).
- The MA itself is rising, meaning it is above its value from X bars ago (Slope lookback).

The trail then follows a simple ladder:
- Start: when no ride is active, the trail attaches to the fastest MA that is currently held.
- Tighten: if a faster MA has been held for a set number of consecutive bars (Bars to tighten), the trail steps up to it.
- Step down: if price closes below the current MA by more than the Break threshold (in ATR), the trail drops to the next slower MA that is still held.
- Out of play: if the break happens on the slowest enabled MA (the cut-off), or no slower MA is holding, the ride ends. The line stops, and a new ride begins as soon as any MA is held again.

Because the hold and break rules are scaled by ATR, the logic adapts to each instrument's volatility. It doesn't rely on fixed percentages.

WHAT YOU SEE

- Only the MA currently being ridden is plotted, coloured by which rung of the ladder it is on.
- A short connecting segment marks each step between MAs.
- There is a gap after an exit, so each new ride starts fresh.
- A label on the last bar shows the active MA, for example "EMA 20", or "Out of play".

HOW TO USE IT

- Trend health at a glance: riding the fastest MA means strong momentum. A step down to slower MAs means the trend is losing pace.
- Trailing stop reference: the plotted line is a ready-made, adaptive trail for managing open positions.
- Watchlist filter: "Out of play" quickly tells you a name has lost its trend structure.
- Untick any MA to remove it from the ladder. The slowest ticked MA automatically becomes the cut-off.
*Note: This is not financial advice and is merely a suggestion on how to use. Please do your research and find the solution that best fits your trading strategy.

ALERTS

- Stepped down: the trail moved to a slower MA.
- On the cut-off: the trail is on the slowest enabled MA, the last line of defence.
- Out of play: price closed below the cut-off by the ATR threshold.

NOTES

- All logic uses closing prices. Signals on the live bar can change until that bar closes.
- Works on any timeframe and market. Tune the MA lengths and ATR settings to match your holding period.

This script is a tool for reading trend structure, not a standalone trading system or financial advice. Always backtest and manage your risk.
發行說明
UPDATE

New
- Regime gate: the bull RMA only runs while the 10 EMA is above the 43 EMA; the bear ladder only while the 10 EMA is below it. Lengths are adjustable and either ladder can be switched off.
- Bear ladder: an exact mirror of the bull logic for downtrends. Price holding below a falling MA = resistance. Shown as a single neon pink trail; the label reads e.g. "Bear EMA 10".
- Bear alerts: Stepped up, On the cut-off, Out of play.
- A gray 10 EMA is always shown for reference (an optional 20 EMA can be switched on in settings).

Changed
- Default setup is now the 10 EMA only, so it works as a clean single-MA trail out of the box. Tick the 15 / 20 / 43 EMAs in settings to build the full ladder.
- Out of play now also triggers when the regime gate flips.

Correction
- Qullamaggie's MAs are the 10 and 20-day EMAs and the 50-day SMA (not DEMA, as stated in the original description).

Existing users: click the refresh icon next to the indicator name on your chart to load the new version.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。