I've modified the original script by WiscoDish to show candles as green while they are smaller than the median of the past 10 candles. Once they become larger than the median they'll change to gray.
I've also added a horizontal median line
so you can see how close the candle is to the median candle size.
This is very useful if you're stalking a trade and waiting for the candle to close small.