Reputation: 43
I wanna to get data of old candles such as high, low , close , open
Can i get the data of candle 1 and 2 ?
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?
Upvotes: 0
Views: 736
Reputation: 1043
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)
Upvotes: 1