# Psychological Line

Psychological Line is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

The Psychological Line counts the bars that closed higher over a 12-bar window and plots the count as a percentage, coloring the line and its gradient fill by which side of the 50% balance line it holds. Dashed 75/25 overbought and oversold levels, an optional smoothed overlay, and six alerts on threshold and balance-line events serve traders who read persistence rather than magnitude.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Mar 23, 2026.
- Access: free.
- Concepts: [Psychological Line](https://www.luxalgo.com/library/concept/psychological-line/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=anqhwb063q5zviqnav5en0y1
- Page: https://www.luxalgo.com/library/indicator/psychological-line/

**Psychological Line** plots the share of up closes in a rolling window: with the default 12-bar Length, every bar finishing above the prior close adds one twelfth, so the line steps between 0% and 100% and reads as the market's recent win rate. This is the definitive clean build of the [Psychological Line](https://www.luxalgo.com/library/concept/psychological-line/): the line and its gradient fill turn bullish above the 50% balance line and bearish below it, dashed levels sit at 75 and 25, and the discrete one-step movement on the default window is the design, not a rendering artifact.

## How to Trade the Psychological Line?

- **Above 75%**: ten or more of the last twelve bars rose (nine sits exactly on the level), a one-sidedly optimistic tape. Strong trends can pin the reading, so the classical trigger is the step back below the level, not the touch.
- **Below 25%**: the pessimistic mirror; the actionable event is the recovery back up through it.
- **Balance-line crosses**: a move through 50% marks up closes taking or losing the majority, a simple persistence bias filter.

Optional circles mark the threshold exits, and six alerts cover both threshold entries, both exits, and both balance-line crosses.

## Psychological Line Settings

- **Length** (default 12): bars in the counting window; 13 is a common fast alternative, windows near 25 flag only sustained one-sidedness.
- **Source** (default close): series whose bar-to-bar direction is counted. Only the sign of each change matters.
- **Overbought** (default 75) and **Oversold** (default 25): the one-sidedness thresholds.
- **Smoothed PSY** (default disabled) with **Type** (default SMA) and **Length** (default 6): a moving-average overlay (fewer whipsaws, later turns).
- **Gradient Fill** (default enabled), **Threshold Exit Markers** (default disabled), and the color inputs handle presentation.

## Frequently Asked Questions

### How does the Psychological Line differ from RSI?

The [Relative Strength Index](https://www.luxalgo.com/library/indicator/relative-strength-index/) weights each bar by the size of its gain or loss, while the Psychological Line counts every bar equally: twelve small up closes score higher than eleven large ones. It is a pure persistence gauge: how often the market rises, never how far.

### Why does the line move in visible steps?

Every bar casts one whole vote, so the value changes only in increments of 100 divided by the Length, one twelfth on the default. The Smoothed PSY overlay tames the steps at the cost of responsiveness.

### Do the 75/25 thresholds work on every timeframe?

They are the convention for the 12-bar window and travel across timeframes, since the reading is a bounded percentage. Longer windows compress readings toward 50%, so slower settings may justify gentler thresholds.

## Related indicators

- [LTF Momentum Projection](https://www.luxalgo.com/library/indicator/ltf-momentum-projection/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/ltf-momentum-projection.md
- [Rubber Band Liquidity Signals](https://www.luxalgo.com/library/indicator/rubber-band-liquidity-signals/) (Disparity Index): markdown at https://www.luxalgo.com/library/indicator/rubber-band-liquidity-signals.md
- [Moving Averages Proximity Oscillator](https://www.luxalgo.com/library/indicator/moving-averages-proximity-oscillator/) (Disparity Index): markdown at https://www.luxalgo.com/library/indicator/moving-averages-proximity-oscillator.md
- [Candle Breakout Oscillator](https://www.luxalgo.com/library/indicator/candle-breakout-oscillator/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/candle-breakout-oscillator.md
- [Adaptive Momentum Oscillator](https://www.luxalgo.com/library/indicator/adaptive-momentum-oscillator/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/adaptive-momentum-oscillator.md
- [Momentum Cycle Sentry](https://www.luxalgo.com/library/indicator/momentum-cycle-sentry/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/momentum-cycle-sentry.md
- [Momentum Terrain 3D](https://www.luxalgo.com/library/indicator/momentum-terrain-3d/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/momentum-terrain-3d.md
- [Triangular Momentum Oscillator & Real Time Divergences](https://www.luxalgo.com/library/indicator/triangular-momentum-oscillator-real-time-divergences/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/triangular-momentum-oscillator-real-time-divergences.md

---

Source: https://www.luxalgo.com/library/indicator/psychological-line/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
