Announcement

Collapse
No announcement yet.

Quote price = to 0 sometimes...

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

  • Quote price = to 0 sometimes...

    Hi,


    Using the active X or even DDE from my application, I sometimes get a price of 0. It's very annoying, is there any way to make the data collection fault proof?? Do you have the same issue?

    Thanks,
    Nick

  • #2
    This is caused by requesting a new quote and then immediately looking to GetBasicQuote. The call to GetBasicQuote is asynchronous for some reason, so there's no guarantee you get your data. If there's no data (or if you call for an invalid symbol, etc.) you get zeroes.

    The solution proposed is to wait for the OnQuoteChanged event before calling GetBasicQuote, but if you're not interested or able to implement that way of doing things, there doesn't appear to be anything you can do.

    I think there should be some way of blocking on the call besides waiting for an out-of-method event.

    Does this describe your problem?

    Comment

    Working...
    X