OPEN-SOURCE SCRIPT

Range Fuel Gauge

422
RANGE FUEL GAUGE — HOW MUCH OF TODAY'S RANGE IS LEFT, AS EXACT PRICES

Every instrument has a typical daily range. Once today's session has consumed most of it, breakout odds statistically fade and mean-reversion setups gain relevance. This indicator turns that idea into two things you can actually trade with: a live fuel gauge and two concrete price levels.

WHAT IT SHOWS

- Fuel panel — how much of the typical daily range today has already used (e.g. "79% used"), with a 10-segment bar that shifts green → amber → red, plus today's range, the typical range, and the points still left
- Upper room level — day low + typical range: the statistical ceiling for today if this session behaves like a typical recent session
- Lower room level — day high − typical range: the statistical floor on the same basis
- A side's room level automatically hides once that side of the range is fully consumed

HOW IT WORKS

1. The indicator stores the high-low range of the last N completed sessions (default 20)
2. Typical range = the Nth percentile of those ranges (default P80, adjustable 50-95)
3. Fuel used = today's developing range ÷ typical range
4. Room levels are simple arithmetic from today's day high / day low and the typical range — they tighten as the day's range expands

HOW TRADERS USE IT

- Fuel below 60% (green) — the day still has energy; breakout and continuation trades have statistical room
- Fuel 60-90% (amber) — range maturing; trail tighter, be selective with fresh breakouts
- Fuel above 90% (red) — the typical range is nearly spent; chasing moves is statistically poor, fade setups toward the day's value become relevant
- Room levels act as realistic intraday targets — for example, a long taken mid-session can use the upper room price as a statistically grounded objective

NOTES

- The room levels are statistical references built from this symbol's own recent history — they are not a forecast, and price can and does exceed them on trend days
- Historical ranges come only from completed sessions and never change after the fact; today's reading updates live as the session develops (by design)
- Alert included: fires when today's range crosses 100% of the typical range
- Panel position is selectable (8 positions); prices are shown as integers
- Works on any symbol; designed for intraday timeframes

This is an original implementation in Pine Script v6. The percentile logic and level arithmetic are fully described above.

Educational tool for market context — not financial advice.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.