Purpose: Automatically displays Daily, Weekly, or Monthly pivot levels based on your chart’s current timeframe.
Auto-Switch Logic:
Shows Daily pivots when the chart timeframe is 15 minutes or lower
Shows Weekly pivots when the chart timeframe is 16 to 75 minutes
Shows Monthly pivots when the chart timeframe is 76 minutes up to 1 day
Pivot Calculations:
Uses the classic pivot formula: (High+Low+Close)/3
Plots Central Pivot Range (Pivot, BC, TC) and Support/Resistance levels (R1–R4, S1–S4)
Based on the previous bar for each timeframe (D, W, M)
Additional Feature:
Plots previous Day’s High/Low, previous Week’s High/Low, and previous Month’s High/Low depending on which pivots are displayed
Usage Steps:
Add the script to your TradingView chart.
Switch your chart timeframe.
Observe the pivots and previous high/low lines automatically changing for Daily, Weekly, or Monthly based on the timeframe you select.
This setup streamlines your workflow by removing the need to manually toggle between separate pivot scripts for different timeframes. Just change your chart timeframe, and the indicator automatically adapts.