I wanna to make pine script code to check is that candle the largest one of the previous 50 candles and color it yellow i tried hard ,but i can't
You could use:
r = high - low barcolor(rising(r,50) ? color.yellow : na)