0

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

vitruvius
  • 15,740
  • 3
  • 16
  • 26
Lab Devices
  • 43
  • 1
  • 6
  • What have you tried? Shwo us your attempt. What do you mean by largest candle? Largest in terms of solid body, or in terms of the difference between high and low? – vitruvius Jun 25 '20 at 18:43
  • i delated all sorry , i mean the differance between high and low (high-low) not the solid body – Lab Devices Jun 25 '20 at 18:54

1 Answers1

1

You could use:

r = high - low
barcolor(rising(r,50) ? color.yellow : na)
alexgrover
  • 1,023
  • 1
  • 4
  • 6