OPEN-SOURCE SCRIPT

ARO Pro — Adaptive Regime Oscillator

120
ARO Pro — Adaptive Regime Oscillator (v6)

ARO Pro turns your chart into a context-aware decision system. It classifies every bar as Trending (up or down) or Ranging in real time, then switches its math to match the regime: trend strength is measured with an ATR-normalized EMA spread, while range behavior is tracked with a center-based RSI oscillator. The result is cleaner entries, fewer false signals, and faster reads on regime shifts—without repainting.



How it works (under the hood)

1. Regime Detection (Kaufman ER):
ARO computes Kaufman’s Efficiency Ratio (ER) over a user-defined length.
- ER > threshold → Trending (direction from EMA fast vs. EMA slow)
- ER ≤ threshold → Ranging

2. Adaptive Oscillator Core:
- Trend mode: (EMA(fast) − EMA(slow)) / ATR * 100 → momentum normalized by volatility.
- Range mode: RSI(length) − 50 → mean-reversion pressure around zero.

3. Volatility Filter (optional):
Blocks signals if ATR as % of price is below a floor you set. This reduces noise in thin or quiet markets.

4. MTF Trend Filter (optional & non-repainting):
Confirms signals only if a higher timeframe EMA(fast) > EMA(slow) for longs (or < for shorts). Implemented with lookahead_off and gaps_on.

5. Confirmation & Alerts:
Signals are locked only on bar close (barstate.isconfirmed) and offered via three alert types: ARO Long, ARO Short, ARO Regime Shift.



What you see on the chart
• Background heat:
• Green = Trending Up, Red = Trending Down, Gray = Range.
• ARO line (panel): Adaptive oscillator (trend/value colors).
• Signal markers: ▲ Long / ▼ Short on confirmed bars.
• Guide lines: Upper/Lower thresholds (±K) and zero line.
• Info Panel (table): Regime, ER, ATR %, ARO, HTF status (OK/BLOCK/OFF), and a Confidence light.
• Debug Overlay (optional): Quick view of thresholds and raw conditions for tuning.



Inputs (quick reference)
• Signals: Fast/Slow EMA, RSI length, ER length & threshold, oscillator smoothing, signal threshold.
• Filters: ATR length, minimum ATR% (volatility floor), toggle for volatility filter.
• Visuals: Background on/off, Info Panel on/off, Debug overlay on/off.
• MTF (safe): Toggle + HTF timeframe (e.g., 240, D, W).



Interpreting signals
• Long: Trend regime AND fast EMA > slow EMA AND ARO ≥ +threshold (confirmed bar, filters passing).
• Short: Trend regime AND fast EMA < slow EMA AND ARO ≤ −threshold (confirmed bar, filters passing).
• Regime Shift: Alert when ER moves the market from Range → Trend or flips trend direction.



Practical use cases & examples

1) Intraday momentum alignment (scalps to day trades)
• Timeframes: 5–15m with HTF filter = 4H.
• Flow:
1. Wait for Trend Up background + HTF OK.
2. Enter on ▲ Long when ARO crosses above +threshold.
3. Stops: 1–1.5× ATR(14) below trigger bar or below last micro swing.
4. Exits: Partial at 1× ATR, trail remainder with an ATR stop or when ARO reverts to zero/Regime Shift.
• Why it works: You’re trading with the dominant higher-timeframe structure while avoiding low-volatility fakeouts.

2) Swing trend following (cleaner trend legs)
• Timeframes: 1H–4H with HTF filter = 1D.
• Flow:
1. Only act in Trend background aligned with HTF.
2. Add on subsequent ▲ signals as ARO maintains positive (or negative) territory.
3. Reduce or exit on Regime Shift (Trend → Range or direction flip) or when ARO crosses back through zero.
• Stops/targets: Initial 1.5–2× ATR; move to breakeven once the trade gains 1× ATR; trail with a multiple-ATR or structure lows/highs.

3) Range tactics (fade the extremes)
• Timeframes: 15m–1H or 1D on mean-reverting names.
• Flow:
1. Act only when background = Range.
2. Fade moves when ARO swings from ±extremes back toward zero near well-defined S/R.
3. Exit at the opposite band or zero line; abort if a Regime Shift to Trend occurs.
• Tip: Increase ER threshold (e.g., 0.35–0.40) to label more bars as Range on choppy instruments.

4) Event days & macro filters
• Approach: Raise the volatility floor (Min ATR%) on macro days (FOMC, CPI).
• Effect: You’ll ignore “fake” micro swings in the minutes leading up to releases and catch only post-event confirmed momentum.



Parameter tuning guide
• ER Threshold:
• Lower (0.20–0.30) = more Trend bars, more signals, higher noise.
• Higher (0.35–0.45) = stricter trend confirmation, fewer but cleaner signals.
• Signal Threshold (±K):
• Raise to reduce whipsaws; lower for earlier but noisier triggers.
• Volatility Floor (ATR%):
• Thin/quiet assets benefit from a higher floor (e.g., 0.3–0.6).
• Highly liquid futures/forex can work with lower floors.
• HTF Filter:
• Keep it ON when you want higher win consistency; turn OFF for tactical counter-trend plays.



Alerts (recommended setup)
• “ARO Long” / “ARO Short”: Entry-style alerts on confirmed signals.
• “ARO Regime Shift”: Context alert to scale in/out or switch playbooks (trend vs. range).

All alerts are non-repainting and fire only when the bar closes.



Best practices & combinations
• Price action & S/R: Use ARO to define when to engage, and price structure to define where (breakout levels, pullback zones).
• VWAP/Session tools: In intraday trends, ▲ signals above VWAP tend to carry; avoid shorts below session VWAP in strong downtrends.
• Risk first: Size by ATR; never let a single ARO event override your max risk per trade.
• Portfolio filter: On indices/ETFs, enable HTF filter and a stricter ER threshold to ride regime legs.



Non-repaint and implementation notes
• The script does not repaint:
• Signals are computed and locked on bar close (barstate.isconfirmed).
• All higher-timeframe data uses request.security(..., lookahead_off, gaps_on).
• No future indexing or negative offsets are used.
• The Info Panel and Debug overlay are purely visual aids and do not change signal logic.



Limitations & tips
• Chop sensitivity: In hyper-choppy symbols, consider raising ER threshold and the signal threshold, and enable HTF filter.
• Instrument personality: EMAs/RSI lengths and volatility floor often need a quick 2–3 minute tune per asset class (FX vs. crypto vs. equities).
• No guarantees: ARO improves context and timing, but it is not a promise of profitability—always combine with risk management.



Quick start (TL;DR)
1. Timeframes: 5–15m intraday (HTF = 4H); 1H–4H swing (HTF = 1D).
2. Use defaults, then tune ER threshold (0.25–0.40) and Signal threshold (±20).
3. Enable Volatility Floor (e.g., 0.2–0.5 ATR%) on quiet assets.
4. Trade ▲ / ▼ only in matching Trend background; fade extremes only in Range background.
5. Set alerts for Long, Short, and Regime Shift; manage risk with ATR stops.



Author’s note: ARO Pro is designed to be clear, adaptive, and operational out of the box. If you publish variants (e.g., different ER logic, alternative trend cores), please credit the original and document any changes so users can compare behavior reliably.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.