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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.