OPEN-SOURCE SCRIPT
Multi-Timeframe Pivot Points: Support & Resistance Levels

Multi-Timeframe Pivot Points draws the classic pivot levels (PP, R1-R3, S1-S3) on your chart for up to five timeframes at the same time. Use it for weekly pivot points, daily, monthly, hourly or any custom timeframe such as 4h, 8h or 15m, and see the support and resistance levels of each one on a single chart.
How it works
Each slot in the settings has an on/off switch, a timeframe and a colour. The levels are calculated from the previous completed bar of the selected timeframe (for example, the previous week for W, or the previous 4-hour bar for 4h). The lines are drawn across the whole period from its first bar, so the levels are visible in advance.
Formulas
P = (H + L + C) / 3
R1 = 2P - L; R2 = P + (H - L); R3 = H + 2(P - L)
S1 = 2P - H; S2 = P - (H - L); S3 = L - 2(H - P)
Features
- Up to 5 timeframes at once, each with its own colour
- Any timeframe from the dropdown, including custom values
- Each of the 7 levels can be switched on or off
- Option to show only the current period or keep previous periods
- Optional price and timeframe in every label, with adjustable decimals
- Bold labels
Notes
The selected timeframe cannot be smaller than the chart timeframe. Such a slot is hidden and a warning appears in the bottom-right corner. TradingView limits a script to 500 lines, so the more timeframes you enable, the fewer previous periods are shown.
This script is for educational purposes and is not financial advice.
How it works
Each slot in the settings has an on/off switch, a timeframe and a colour. The levels are calculated from the previous completed bar of the selected timeframe (for example, the previous week for W, or the previous 4-hour bar for 4h). The lines are drawn across the whole period from its first bar, so the levels are visible in advance.
Formulas
P = (H + L + C) / 3
R1 = 2P - L; R2 = P + (H - L); R3 = H + 2(P - L)
S1 = 2P - H; S2 = P - (H - L); S3 = L - 2(H - P)
Features
- Up to 5 timeframes at once, each with its own colour
- Any timeframe from the dropdown, including custom values
- Each of the 7 levels can be switched on or off
- Option to show only the current period or keep previous periods
- Optional price and timeframe in every label, with adjustable decimals
- Bold labels
Notes
The selected timeframe cannot be smaller than the chart timeframe. Such a slot is hidden and a warning appears in the bottom-right corner. TradingView limits a script to 500 lines, so the more timeframes you enable, the fewer previous periods are shown.
This script is for educational purposes and is not financial advice.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。