indicator · on price · open source
Multiple TF Pivots
Running…
Loading chart…
About
Multi-timeframe pivots — daily swing pivots (swing=5) drawn together with weekly swing pivots (swing=20) so higher-timeframe structure stays visible while you trade a lower-TF chart.
- Yellow / orange = daily S/R; green / red = weekly S/R.
- Daily breaks inside a weekly level often fail; weekly breaks inside daily structure are the high-conviction trades.
Source code
//@version=5
indicator("Multiple TF Pivots", overlay=true)
ph_d = ta.pivothigh(high, 5, 5)
pl_d = ta.pivotlow(low, 5, 5)
ph_w = ta.pivothigh(high, 20, 20)
pl_w = ta.pivotlow(low, 20, 20)
lastPh_d = ta.valuewhen(not na(ph_d), ph_d, 0)
lastPl_d = ta.valuewhen(not na(pl_d), pl_d, 0)
lastPh_w = ta.valuewhen(not na(ph_w), ph_w, 0)
lastPl_w = ta.valuewhen(not na(pl_w), pl_w, 0)
p_Daily_R = plot(lastPh_d, "Daily R", color=color.orange, style=plot.style_linebr)
p_Daily_S = plot(lastPl_d, "Daily S", color=color.yellow, style=plot.style_linebr)
p_Weekly_R = plot(lastPh_w, "Weekly R", color=color.green, style=plot.style_linebr, linewidth=2)
p_Weekly_S = plot(lastPl_w, "Weekly S", color=color.red, style=plot.style_linebr, linewidth=2)
No comments yet.
Sign in to comment.