I woud like to introduce new script of obv indicator that resets on creation of new pivot high or low. Note that it resets when it's known that it is a pivot. On the reset candle adds accumulated value from previous candles defined by i_right input.
It has following settings:
pivot setting - here you can infulence pivot detection obv setting - here you can influence whether it should be multiplied by price or not, if it should show when the reset happen