Page 1 of 1

price value of a specific bar in history

Posted: Tue Nov 02, 2021 8:45 pm
by pinecat
I would need to know the price of a bar in history.
Is there a specific function?
Thanks for any hint.

Re: price value of a specific bar in history

Posted: Thu Nov 04, 2021 9:34 pm
by Deep-Wave
Hi pinecat,

you can access the different prices (open, high, low, close) of historical bars with the following operators - []:
This code for example references the close of the previous bar

Code: Select all

close[1]
Maybe the free basic pine course of Matt would be a good staring point for you to learn pine.

https://courses.theartoftrading.com/cou ... ics-course


Best of luck :cool: