Lab Devices
Lab Devices

Reputation: 43

How to check if the candle is the largest one in Pine-Script?

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

Upvotes: 0

Views: 1001

Answers (1)

alexgrover
alexgrover

Reputation: 1043

You could use:

r = high - low
barcolor(rising(r,50) ? color.yellow : na)

Upvotes: 1

Related Questions