OPEN-SOURCE SCRIPT

Pivot Points

Pivot points are technical indicators used in financial markets (such as stocks, forex, or commodities) to identify potential turning points in price movement. They provide reference levels based on the previous day’s price action.

How to use the Pivot Points indicator
Traders use pivot points to identify significant price levels where the market may reverse or consolidate.

PP, S1, and R1 are considered primary levels, while S2 and R2 are secondary levels.
R3, R4, R5, S3, S4 and S5 are considered more extreme levels and we normally don't see price action trade near these levels on a typical day. This indicator calculates those extreme levels to help on days with extreme price action.

Pivot points can be calculated for different timeframes (daily, weekly, monthly, quarterly, 6-months and yearly).

Pivot points calculated using the daily timeframe is a popular chose among day traders traders who trade intraday timeframes.

Trading Strategies
Bounce Strategy:
  • Buy near support (S1 or S2) if the price bounces off these levels.
  • Sell near resistance (R1 or R2) if the price reverses from these levels.


Breakout Strategy:
  • If the price breaks above R1, consider a long position.
  • If the price breaks below S1, consider a short position.


Profit targets:
  • If in a long trade and price hits R1, you take some profit.
  • If in a short trade and price hits S1, you take some profit.


Combine pivot points with other technical indicators (e.g., moving averages, candlestick patterns) for confirmation. Remember that pivot points are just one tool among many, and their effectiveness varies across different markets and timeframes. Always practice risk management and consider the overall market context when using pivot points in your trading decisions.
Pivot PointsPivot points and levels

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer