API Support Forum
OEC API > API Support > bar closed
Author Topic: bar closed
(5 messages, Page 1 of 1)
Moderators: VPfau
RCrawford65
Posts: 6
Joined: Dec 03, 2012


Posted: Mar 25, 2013 @ 06:25 PM             Msg. 1 of 5
Tried searching for answer but didnt find it - must be simple...

How to determine that a bar from bar subscription is actually closed and not just an update?

That is, can I tell from the bar object itself that the bar is still open or do I have to play around with timestamps, etc to figure it out?

Thanks

Richard Crawford
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 26, 2013 @ 08:27 AM             Msg. 2 of 5
Hello,

please try function BarStatus(0) - it returns 0 for opening, 1 for update and 2 for closing.

Victor Vins
Lead Software Developer
RCrawford65
Posts: 6
Joined: Dec 03, 2012


Posted: Mar 28, 2013 @ 06:38 PM             Msg. 3 of 5
I cannot find which object provides this method?

Richard Crawford
RCrawford65
Posts: 6
Joined: Dec 03, 2012


Posted: Mar 28, 2013 @ 06:42 PM             Msg. 4 of 5
btw I am using the API and not EasyLangauge... Sorry for not mentioning that in original post.

Richard Crawford
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Apr 01, 2013 @ 02:33 PM             Msg. 5 of 5
Unfortunately, there is no any flag that can tell that the current update is "closing" update for this bar.

Victor Vins
Lead Software Developer