This script calculates the VWAP's change rate against ATR in a number of k-lines. It controls the line's color based on the average change rate, and it changes its color in a time-weighted way.
1. Calculating vwapValue's
2. Controlling Line's color based on the average change rate against ATR
3. Calculating average change rate in the past k-lines
Good luck with your trading!
2. set default k_num equals 1
3. set default change_rate_threshold to 0.3, it works perfect fot Bitcoin in 15min chart!
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.