Problem reading D1 bars in H4 chart (always late to update)
Problem reading D1 bars in H4 chart (always late to update)
20 Oct 2023, 09:19
Hi All
I try to read D1 bars data from H4 chart with the following code
But the result (Daily bar) is always late:
I can't figure out what I am not missing.
Any help is greatly appreciated.
Replies
MMII
21 Oct 2023, 13:40
( Updated at: 22 Oct 2023, 06:31 )
RE: Problem reading D1 bars in H4 chart (always late to update)
PanagiotisChar said:
Hi there,
I don't see anything wrong. The code reads the value of the last closed bar, not the current bar. If you are looking for the current bar use Last(0)
Hi, thanks for the response
What confuses me is that when the current date (left side) is 18/09/2023, the last daily bar (Daily(1)) is14/09/2023 instead of 17/09/2023?
@MMII
PanagiotisChar
21 Oct 2023, 07:12
Hi there,
I don't see anything wrong. The code reads the value of the last closed bar, not the current bar. If you are looking for the current bar use Last(0)
@PanagiotisChar