0

I wanna to get data of old candles such as high, low , close , open

Can i get the data of candle 1 and 2 ?

click to see the image

Note : the code in this link that i use to select those candles

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

Lab Devices
  • 43
  • 1
  • 6

1 Answers1

1

Use the valuewhen function, if you want the high price you can use:

valuewhen(rising(r,50),high,0)

for "candle 2" in your image, for candle 1 use

valuewhen(rising(r,50),high,2)
alexgrover
  • 1,023
  • 1
  • 4
  • 6