Announcement

Collapse
No announcement yet.

Is the Market Closed?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is the Market Closed?

    Hi there

    Can anyone help me - I am trying to get the end of day bars for the us stocks when the market has closed.

    Does anyone know of a way to determine if the market has closed or simulate the getbarstate() function from within Esignal.

    Many Thanks

  • #2
    I am assuming that you are using the RequestHistory function.
    By setting start_time and end_time to 0, you will be getting bars in a 24 hour period. This way, you can determine which bar is last prior to closing. You can also take a look at how onBarsChanged and onBarsReceived events are processed in the documentation.

    Comment


    • #3
      Thanks for the comments - The problem is I am trying to determine if the market has closed, I know which is the last bar - but I do not know whether it is completed or still being updated.

      Other than the time of request - is there any other way to determine this - and at what time are the bars fixed and all amendments etc completed for US Stocks.

      Comment


      • #4
        Unfortunately, there isn't a way to determine this. The bar itself does not have this property in the Desktop API.

        Comment

        Working...
        X