I am working on a script that I am having trouble figuring out.
In short, I am trying to keep a running variable that updates when a value is greater than it. For example, candle 1's volume = 100... lets say candle 2 through 10 is < 100 (we want to ignore these values), lets now say candle 11 is 200... then we want to update our variable so that candle 11's values are stored in the variable. Going forward since that condition is met would restart the count until in the future there is a candle that is higher than that initial value stored in the variable.
Attached is a picture of the script I am trying make:

Please notice that the first red vertical line shows it was the highest volume node at the time. I would like to plot the high and low of that candle it happened. Not until the second red vertical line, that volume node is greater than the initial red vertical line so we update the plot so it plots that candle's high and low. Now at the open of today the same process repeats until there is a volume node greater than the last plotted volume node.