pradeeppharma2020
Pine Script Rookie
Pine Script Rookie
Posts: 2
Joined: November 17th, 2020

Function to fetch OHLC of the reference candle

Hello Scripters,

I am looking to find OHLC values of the particular candle which meets the requirement.

e.g. I am screening for hammer printed on 15-Aug-2020. I want my entry when its High / Low is breached. How can I find it's High or low of that candle.

Thanks
Pradeep

User avatar
Matthew
Site Admin
Site Admin
Posts: 92
Joined: July 1st, 2020
Location: Australia
Contact: Website Facebook Twitter TradingView Profile

Re: Function to fetch OHLC of the reference candle

Hi Pradeep! There are many methods to achieve this, one is to use the valuewhen() function.

I don't have time to write the code out today but here's a detailed article on that function: https://backtest-rookies.com/2018/04/06 ... -happened/

Return to “Pine Script Q&A”