Announcement

Collapse
No announcement yet.

No results with GetBasicQuote

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

  • No results with GetBasicQuote

    I seem to have no trouble getting return data when using XMLGetBasicQuote (see code fragment immediately below):
    -----------------------
    Function fXMLBasicQuote(strSymbol As String, sXML As String)
    eSignal.RequestSymbol strSymbol, False
    sXML = eSignal.XMLGetBasicQuote(strSymbol)
    End Function
    -----------------------

    Yet, I get no return data when I use GetBasicQuote, as show in the next code segment:

    -----------------------
    Function fGetBasicQuote(strSymbol As String, dblBid As Double, dblAsk As Double, dblLast As Double, lBidSize As Long, lAskSize As Long, lLastSize As Long)

    Dim quote As IESignal.BasicQuote

    eSignal.RequestSymbol strSymbol, False

    quote = eSignal.GetBasicQuote(strSymbol)
    dblAsk = quote.dAsk
    dblBid = quote.dBid
    dblLast = quote.DLast
    lAskSize = quote.lAskSize
    lBidSize = quote.lBidSize
    lLastSize = quote.lLastSize

    End Function
    -----------------------

    These were written as functions in VBA for Access, because VBA for Access requires that the
    Dim WithEvents eSignal As IESignal.Hooks
    statement be used only in a class module.

    My main line is in a separate non-class module, which calls the above functions in the following two statements:

    Call rtd.fXMLBasicQuote(strCurrentSymbol, strXMLBasicQuote)

    Call rtd.fGetBasicQuote(strCurrentSymbol, dblBid, dblAsk, dblLast, lBidSize, lAskSize, lLastSize)


    The name of my class module, BTW, is rtdClass

    rtd is dimensioned in the main line as:
    Dim rtd As New rtdClass

    Any ideas as to why the GetBasicQuote doesn't return any values would be appreciated...

    Sam

  • #2
    Well, you need to request the symbol and wait for the OnChanged event to get the BasicQuote response. You make a request and handle the response event. Look at pages 4-2 and 4-3 for a detailed explanation.

    Comment


    • #3
      How do you code the "wait" that you suggest?
      S.

      Comment


      • #4
        How do you code the "wait" that you suggest?
        S.

        Comment


        • #5
          You don't need to code a wait. The servers will send responses to your requests. It is a request-response mechanism.

          Comment

          Working...
          X