OPEN-SOURCE SCRIPT
Equity Train Euphoria- Momentum Oscillator Enhanced

Equity Train Euphoria — Momentum Oscillator Enhanced
is a sentiment-driven momentum oscillator designed to help identify elevated market fear, euphoria, momentum shifts, and potential exhaustion points. It builds on publicly available open-source oscillator concepts with custom enhancements to sentiment readings, velocity metrics, extreme-zone detection, and visual warning stages.
How it works
The oscillator measures how far price is stretched from its smoothed average, normalized by recent volatility, then smoothed into a single momentum line. The line changes color with direction (lime = rising, red = falling), giving an at-a-glance read on momentum. Gradient heat zones above the overbought level and below the oversold level intensify as the oscillator pushes deeper into extremes, visually representing escalating euphoria or fear.
Key features
Sentiment dashboard — A live table displays the current sentiment stage (Neutral → Greed → Very Greedy → Extreme Greed, and the mirrored fear stages), the oscillator value, and trend direction.
Signal confirmations — Buy signals fire on oscillator/signal crossovers in oversold territory; sell signals fire on crossunders in overbought territory. Optional "Strict Extreme Confirm" requires both the oscillator and signal line to be beyond the threshold.
Pinpoint Mode (divergence confirm) — When enabled, buy/sell confirmations additionally require a regular bullish or bearish divergence between price pivots and oscillator pivots near the extremes, filtering out weaker signals.
Yellow Euphoria Entry — Marks the moment the oscillator first crosses into overbought territory, highlighting early-stage euphoria before a potential exhaustion signal forms.
Adaptive Extremes — Optionally auto-calibrates the overbought/oversold thresholds using rolling percentiles of the oscillator itself, so levels adjust to each symbol's and timeframe's behavior instead of using fixed values.
Turn signals in extremes — Green/red dots and background highlights mark direction flips that occur while the oscillator is in fear or greed zones — often areas of interest for reversals.
Amplification factor — Scales the oscillator and all levels together for visual tuning without changing signal logic.
Bar coloring & alerts — Optional bar painting on key events, plus built-in alert conditions for buy, sell, direction change, and euphoria entry.
Settings overview
Channel Length and Signal Smoothing control responsiveness; Direction Sensitivity sets how quickly trend flips register; Overbought/Oversold levels can be fixed or adaptive; divergence pivot lengths tune Pinpoint Mode strictness.
How to use
Watch for the oscillator entering the heat zones as a warning of stretched conditions. Yellow entries flag early euphoria; red/green turn dots and confirmed crossover signals suggest potential exhaustion or reversal areas. Signals are generally stronger when Pinpoint Mode divergence confirmation is enabled. Works across timeframes and asset classes; best used alongside price structure, volume, and higher-timeframe context rather than in isolation.
Disclaimer: Not financial advice. Past performance is not indicative of future results. Indicators are imperfect and should be used only as an educational and informational guide.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Bitcoin algorithmic trading bot for swing traders and long term investors.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Bitcoin algorithmic trading bot for swing traders and long term investors.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.