This is my code for something Trading View already gives us -- Pivot Points.
It's not really an indicator in itself, although when weekly highs or lows are broken it seems to be a big deal. I wrote this so I'd have something to play with.
Here’s one way to access previous values:
valuewhen(change(high_series) != 0, high_series, 1)
This is my code for something Trading View already gives us -- Pivot Points.
It's not really an indicator in itself, although when weekly highs or lows are broken it seems to be a big deal. I wrote this so I'd have something to play with.
Here’s one way to access previous values:
valuewhen(change(high_series) != 0, high_series, 1)