PROTECTED SOURCE SCRIPT

OB/OS Environment MTF

27
This indicator identifies overbought and oversold price environments — not reversal signals — using a multi-timeframe regime filter combined with volatility-adjusted stretch and confluence logic.

The goal is to highlight when price is objectively extended relative to trend, so traders can:

reduce chasing,

size appropriately,

manage risk,

or look for mean-reversion / pause scenarios without assuming a top or bottom.

How it works

1. Higher-Timeframe Regime (Stable)

Intraday charts → Daily regime

Daily charts → Weekly regime

Weekly charts → Monthly regime

Monthly charts → Monthly regime

Regime is determined using HTF close vs HTF EMA (optionally slope-filtered).
This keeps environments stable and avoids intrabar regime flipping.

2. Volatility-Adjusted Stretch
Price extension is measured as:

distance from EMA

normalized by ATR (z = (price − EMA) / ATR)

This allows the same logic to work across:

5m / 30m / 1h

Daily / Weekly / Monthly

3. Confluence Scoring (N-of-M)
An OB/OS environment only triggers when stretch and a minimum number of confirmations are present:

RSI extreme

Bollinger %B excursion

Stretch percentile vs its own history

Large candle relative to ATR

User-configurable confirmation count helps reduce noise.

4. Environment State (Sticky)
Once an overbought or oversold environment is detected:

the state persists until price decompresses or regime breaks

optional background shading visualizes the environment

arrows mark entry into the environment (not exits)

What this is / is not

This is:

an environment/context tool

multi-timeframe aware

volatility-normalized

designed to work across assets and timeframes

This is NOT:

a buy/sell signal

a reversal system

predictive of timing tops or bottoms

Strong trends can remain overbought/oversold for extended periods — by design.

Best use cases:

Risk management in strong trends

Avoiding late entries

Scaling decisions

Mean-reversion setups with confirmation

Context for options traders (IV, spreads, diagonals)

Feedback welcome

This is an early public release.
I’m specifically interested in feedback on:

confluence logic

regime behavior

parameter defaults by timeframe

false positives vs missed environments

If you have ideas or improvements, please comment — especially if you test across multiple markets or higher timeframes.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.