Pivot Support & Resistance
Nov 15, 2021

The Pivot Support & Resistance indicator tool identifies potential trend breakout and breakdown points by analyzing price action relative to pivot-based levels and volume. This script provides automated entry, trailing stop-loss, and profit targets to help traders navigate market transitions with objective data points.
Usage
The script is used to identify trend changes or continuations when price breaks through established pivot levels.
- Resistance Breakout (Buy): Occurs when the price closes above the previous pivot high with volume exceeding its moving average. This is marked by a "Buy" label below the bar.
- Support Breakdown (Sell): Occurs when the price closes below the previous pivot low with volume exceeding its moving average. This is marked by a "Sell" label above the bar.
- Trend Continuation: If additional breakout/breakdown conditions are met while a trade is already active, triangle shapes will appear to indicate momentum continuation.
- Trade Management: Upon a signal, the script plots an entry level (circles), a trailing stop-loss (stepline diamond), and a maximum profit line. The area between entry and stop-loss represents the risk zone, while the area between entry and the maximum profit point represents the reward zone.
It is highly recommended to wait for the candle to close before acting on a signal to avoid false breakouts or "traps."
Details
The indicator identifies pivot highs and lows using a lookback and lookforward window defined by the user. Once a pivot is confirmed, it acts as a dynamic support or resistance level.
A signal is generated when:
- Price closes across the pivot level.
- The current volume is higher than the 20-period simple moving average.
- The candle high (for support) or low (for resistance) interacted with the pivot level, ensuring the move is a direct response to that zone.
The trailing stop-loss is calculated based on either the pivot level itself or an ATR-based offset, whichever is more conservative, and adjusts dynamically as the trade reaches new profit extremes.
Settings
- No. of left bars to check: Sets the number of candles required to the left of a high or low to qualify it as a pivot.
- No. of right bars to check: Sets the number of candles required to the right of a high or low to confirm the pivot (this introduces a lag equal to the number of bars selected).
FAQ
How do I access the Pivot Support & Resistance?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What causes a signal to disappear?
Signals are calculated on bar closes. If you are looking at the current "real-time" bar, the signal may flicker until the candle finally closes. Always wait for the bar to close to confirm the signal.
Can I change the sensitivity of the support/resistance levels?
Yes, by adjusting the "left bars" and "right bars" settings. Increasing these values will result in fewer, but more significant, support and resistance levels. decreasing them will make the indicator more sensitive to minor price swings.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.