BTC Price TrendThe crypto market is reacting very quickly based on BTC price, thus monitoring the BTC price is very helpful.
This script will color the candles based on the BTC price trend. Set the timeframe and down/up percentage to monitor the BTC price trend, and the script should not repaint.
The indicator will monitor the BTC price in a high frame, for example, for 4 hours, if the price goes down the set percentage during one candle, will change the candle color. Thereafter, if the price goes up within a small timeframe (as you set) then the candle color will be changed.
So, in case the bar color is red, then it is recommended to avoid trading since the BTC price is down trending.
The indicator is requesting the BTC price as of now, and the previous closed price, then it will calculate the price difference, if it result is minus, then the price is in a downtrend, else it is in an uptrend.