This ProBuilder code snippet is designed to calculate the maximum range (difference between high and low prices) over the last 19 bars in a trading chart. The range is a useful indicator for volatility.
bigrange = high = low
for a = 1 to 19
bigrange = max(bigrange, high[a] - low[a])
next
Explanation of the Code:
This code is particularly useful for traders or analysts looking to understand market volatility over a specific period directly from their ProRealTime charts.
Check out this related content for more information:
https://www.prorealcode.com/topic/widest-range-from-high-to-low-last-20-days/#post-114900
Visit Link