Returns Stochastic [NovaLens]

1 328
Returns Stochastic is a bounded 0-100 momentum oscillator that ranks each bar's return, not price, and dims its extremes in low-efficiency tape. The line burns vivid at overbought/oversold extremes on a directional tape; the same extreme reads dim when the tape is chop.

Many oscillators show overbought and oversold extremes the same way on clean directional moves, noisy ranges, and dead chop. Returns Stochastic separates the return extreme from the tape quality behind it: a bounded 0-100 read built on percent-change (unitless and normalized within each asset's own recent return range), plus a second, independent measurement of how directional versus choppy the recent tape is, using the Kaufman Efficiency Ratio (KER). The working hypothesis behind the lens: an extreme on a directional tape and the same extreme in chop may carry different information, so the two are shown as separate channels rather than folded into one number. A vivid extreme is not a buy or sell signal.

════════════════════════════════════════════

◉ HOW IT WORKS

1. Percent change per bar. pct = (Close - Close(1)) / Close(1).

2. Rank that return in its recent range. Rescale each return in its last 10 bars to 0-100; average 4 readings by default. When returns differ within the window, the highest scores 100 before smoothing; the lowest scores 0. The plotted average need not be near either end.

Pine Script®

Simplified; the shipped code adds na-guards. Result: rstoch is the smoothed 0-100 position of recent returns in their rolling ranges.

3. Measure tape efficiency separately. The tool ranks smoothed KER against its recent history (30-100 bars in the preset profiles). Preset colour emphasis turns on at a higher rank and off at a lower one, reducing rapid switches near the middle. Efficiency never alters the value.

Kaufman Efficiency Ratio - net directional travel over a window divided by the total path length; near 1 means a clean directional move, near 0 means the tape covered ground going nowhere.

Why it is original. Feeding returns through a stochastic rank is uncommon in published work, but the contribution is the composition: the returns-based value remains visible while an independent Kaufman-efficiency lens controls its visual emphasis, zone fills, event markers, and alerts.

════════════════════════════════════════════

◈ HOW TO READ IT

Efficiency gates the rendering, not the value. The level shows where the return sits; the efficiency lens shows whether that extreme occurred in a directional or choppy tape. Check the color at an extreme before the level:

  • Vivid green at or below the Oversold level: an oversold return extreme while the recent price path is relatively directional rather than choppy.
  • Vivid amber at or above the Overbought level: an overbought return extreme while the recent price path is relatively directional rather than choppy.
  • Dim green or amber at either extreme: the same overbought or oversold zone, but on a choppy tape, so it is dimmed, not hidden.


Supporting layers:

  • Glow and fill: past a level on a directional tape the line glows and fills back to the level; in chop neither shows. Inside the levels the line is slate.
  • Event marks: a pane dot plus green OS below price or amber OB above it. Both require a confirmed cross with Trust Efficient and a down-close (OS) or up-close (OB). No event prints in Chop; the line stays visible.
  • Level bands: a faint channel between the levels and, in the default Bold look, soft strips beyond them.


The panel names the zone in plain English even when the line is dim (zone, Trust as Efficient or Chop, bars since the last signal, all with hover), so a dimmed extreme is never mistaken for "no signal".

════════════════════════════════════════════

✦ HOW WE USE IT: BTCUSDT DAILY, SUMMER 2026

Default settings on BINANCE:BTCUSDT 1D (Balanced, Auto resolves to Daily), read on closed bars from May to October 2026. Three oversold readings at similar levels, read three ways:

  • 3 June: during the early-June selloff the line drops to about 23. The panel reads Oversold with Trust Efficient (trust rank 100 in the hover), and a green OS tag prints under the confirmed bar.
  • 25 July: inside the July range the line reaches about 20, deeper than the 3 June reading. The panel reads Oversold with Trust Chop (trust rank 8); the line is a dim green and no mark or alert fires.
  • 25 August: after the August run-up even a small down-day sits low in the recent return range, pulling the line to about 19 while efficiency ranks 96th; the line turns vivid green and a new OS tag prints.


The level alone would treat the three alike. The lens separates the two that formed on directional tape from the one that formed in chop, and the July reading stays visible as a dim line rather than disappearing.

What it does not do: it does not say where a move ends. After the 3 June mark price kept falling, closing below 60,000 in late June, and the line printed further oversold readings on the way. The lens describes the tape an extreme formed in; it does not forecast the next bar.

════════════════════════════════════════════

❖ OTHER APPLICATIONS

  • Second opinion on a classic oscillator: swing traders who watch a 70/30 stochastic or RSI can see which of its extremes formed on directional tape and which in chop.
  • Chop mapping for range traders: long stretches where the panel reads Chop and no tag prints, like July 2026 on BTC daily, mark tape the lens reads as inefficient.
  • Timeframe comparison: Auto resolves a profile per chart, so the same symbol can read efficient on 4H and choppy on 1D.
  • Alert-driven workflow: subscribe to Efficient Oversold Cross Down and Efficient Overbought Cross Up; check the chart only when an efficient extreme forms.


════════════════════════════════════════════

❂ GETTING STARTED

Add to chart. Default Balanced responsiveness plus the Auto trust profile need no changes; Auto picks a bar-count profile from your chart timeframe and applies it to the current bars (it only looks at the chart you're already on). The panel shows the last closed bar, not the bar under the cursor. It starts top right in the pane and can cover the line on small charts. Panel and Panel on move or hide it.

Settings that matter:

  • Responsiveness: Balanced (default, Rank length 10 / Smoothing 4). Start here. Longer smooths but delays: Reactive (6 / 3) fires more often with more noise, Smooth (16 / 6) gives fewer, cleaner extremes.
  • Trust profile: Auto (default), or lock Weekly, Daily, 8H, 4H or 30m. Auto matches the chart to the nearest anchor by bar-count boundaries: below 90 minutes (plus tick and range) uses 30m; 90 min through about 5h 40m uses 4H.
  • Overbought / Oversold level (70 / 30): the level bar itself counts as in-zone.


Groups, as in the script:

  • Profile: Responsiveness, Trust profile.
  • Core: Rank length and Smoothing under Custom; Overbought (70) / Oversold (30) level.
  • Advanced: Trust length, smoothing, window and stability under Custom (stability = total hysteresis band width around 50).
  • Marks: price tags, pane dots. Display: Look (Clean / Glow / Bold), Theme, glow, Panel, Panel on.
  • Colours: Line (slate), Overbought (amber), Oversold (green).


════════════════════════════════════════════

△ LIMITATIONS

This is a state read, not a prediction, and not a buy/sell system.

  • A single large return compresses the scale. One outlier can pin later bars toward the opposite end of the 0-100 range until it ages out of the window.
  • Choppy tapes are dimmed on purpose. Dim is a relative state, not a quality score.
  • Efficiency is relative. Ranked against its own recent window: efficient for this symbol and timeframe lately, not a universal threshold.
  • Thin symbols can sit in Flat or Settling. On illiquid or halted tapes the guard holds the read closed after each flat stretch and the panel names it, so a long flat line at the middle is the guard working, not a fault.
  • Auto reads only this chart. It requests no other timeframe's data.
  • Warm-up. No line until the longer of Rank length + Smoothing or Trust window + Trust length passes (Daily defaults: 60 bars).
  • Hover detail is desktop. On mobile, read the info panel.


Repaint: Confirmed-bar. The line updates live on the forming bar and finalizes on close; the panel latches to the last closed bar; markers and alerts fire only on confirmed bar close.

════════════════════════════════════════════

◭ ALERTS

  • Efficient Oversold Cross Down - fires when Returns Stochastic crosses below the Oversold level while the efficiency state is open and the crossing bar's own return is negative. Confirmed bar close (set to Once Per Bar Close).
  • Efficient Overbought Cross Up - fires when Returns Stochastic crosses above the Overbought level while the efficiency state is open and the crossing bar's own return is positive. Confirmed bar close (set to Once Per Bar Close).


Both messages are observational plain text naming the event, symbol, timeframe, close and bar time (the bar's open time), confirmed on bar close. No events fire during Flat or Settling windows.

════════════════════════════════════════════

⌁ NOTES

  • The C% returns-stochastic concept is credited to Ali Casey / StatOasis. NovaLens adds the percentile-ranked, hysteresis-gated Kaufman lens, the glow, confirmed-bar markers and the flat-tape safeguards.
  • Efficiency Ratio: Perry J. Kaufman, Smarter Trading (1995).
  • Repaint: Confirmed-bar.
  • Open-source under the Mozilla Public License 2.0 - read the code and verify the math.

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.