Golgistain

Combined Pivot Points (High and Low in One Line)

212 1 14
For Gab
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title="Combined Pivot Points (High and Low Line)", shorttitle="Pivots", overlay=true)
len = input(7, minval=1, title="Length")

pivot(x) => fixnan(dev((x=='l' ? lowest(len) : highest(len)), len) ? na : (x=='l' ? lowest(len) : highest(len)))

finalPlotLine = barssince(change(pivot("l")) != 0) > barssince(change(pivot("h")) != 0) ? pivot("h") : pivot("l")

plot(finalPlotLine, offset=-len+1)
picowico
3 months ago
Hi Golgstain, Just wondering if you can please modify this so that it works for Daily charting. The end of the chart has a new high but it doesn't plot it for some reason.. Kindest regards, Shaun
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out