Price Action Top/Bottom
Jul 19, 2022

The Price Action Top/Bottom indicator identifies and marks significant structural peaks and troughs on the chart to assist traders in analyzing market structure and price action developments.
Usage
The tool is primarily used to visualize market structure by connecting significant highs (Tops) and lows (Bottoms) with dashed lines. Traders can use these marks to identify trend reversals, support and resistance levels, or as a foundation for further price action analysis such as Fibonacci retracements.
By adjusting the sensitivity parameters, users can filter out minor price fluctuations to focus on major structural shifts or tighten the settings to capture more frequent short-term pivots.
Details
The script functions by scanning for price pivots within a specific lookback window (Depth). It calculates the deviation between potential new pivots and the previous confirmed point using a multiplier based on the Average True Range (ATR).
If a new high is found that exceeds the previous high while in an upward leg, the indicator updates the current point. If the price moves significantly in the opposite direction (surpassing the deviation threshold), a new structural leg is formed, and a "Top" or "Bottom" label is plotted.
Settings
- Deviation: A multiplier that scales the ATR-based threshold. Higher values require larger price moves to confirm a new structural top or bottom.
- Depth: The minimum number of bars required to validate a pivot point. Larger values result in more significant, long-term structural markings.
- Line Color: Adjusts the color of the dashed lines connecting the pivots.
- Show Lines: A toggle to enable or disable the drawing of the connecting lines between tops and bottoms.
- Plot marks: A toggle to enable or disable the "Top" and "Bottom" labels on the chart.
FAQ
How do I use the Price Action Top/Bottom indicator?
This indicator helps identify key structural levels; you can use the marked tops and bottoms to determine trend direction or set areas for potential stop-loss and take-profit targets.
What is the "Depth" setting for?
The Depth setting determines the minimum candle window used to find a pivot. A higher depth ensures that only more prominent price swings are captured, reducing market noise.
How can I access this tool?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
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.