Announcement

Collapse
No announcement yet.

Time & Sales Problem

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

  • #16
    We apologize for the inconvenience you have run into this particular coding sample and hopefully the information provided below would help.

    It is my understanding that you were trying to obtain the last tick information via the time&sales data. Is this correct?

    If you are interested in obtaining time&sales updates from the time you requested the data, you should look at the DESKTOP_VB_SAMPLE instead.

    http://share.esignal.com/download.js..._VB_Sample.zip

    You can particularly look at esignal_OnTimeSalesChanged in frmTickData.frm in terms how to process the last tick information.

    See code snippet below:

    Private Sub esignal_OnTimeSalesChanged(ByVal tsHandle As Long)
    If requestHandle = tsHandle Then

    'lHandle is the handle to the time sales request that requested
    'this data
    Dim lNumBars, lNumRtBars, lBar, lDiff As Long
    Dim item As IESignal.TimeSalesData

    lNumRtBars = esignal.GetNumTimeSalesRtBars(tsHandle) 'Gets number of
    'real-time bars

    'Determine the number of new bars since the last event
    lDiff = (lNumRtBars - lLastTsRtCount) * -1

    For lBar = lDiff + 1 To 0
    item = esignal.GetTimeSalesBar(tsHandle, lBar) 'Gets a TimeSalesData structure.

    If item.DataType = tsdBID Then
    'Extract fields from TimeSalesData structure.
    List1.AddItem sBar, 0
    Next lBar

    'Remember the number of real-time bars so you can track how many
    'new real-time bars occur the next time.
    lLastTsRtCount = lNumRtBars

    End If

    End Sub

    P.S. We are currently looking into the Time And Sales in VB.zip coding sample for potential problems. We will update you when we have more findings.

    In terms of obtaining support for the Desktop API, you can actually email us by visiting the following form.

    http://developer.esignal.com/email/sendMail.asp

    Comment


    • #17
      I'm trying to get all the T&S data of an entire day.

      Watch this link (from you repository):

      http://share.esignal.com/download.js...%20in%20VB.zip

      When I try that application with different version of ESignal I receive different output data.
      In particular version 10 works fine, version 10.1 works in a strange way.

      With version 10 I obtain all the T&S history. With version 10.1 I obtain few data.
      Please read this words I took from "schell" post, he surely speaks an english better than mine:

      "Yeap, afastexit, you are right. I was wrong in my previous comments. No matter what the setting of filter.lNumDays, eSignal appears to be returning T&S starting with whatever realtime is when esignal.RequestTimeSales(filter) is launched."

      Hope those words are clear.

      I get T&S but is it totaly incomplete. Application seem to work, but if you watch the "First tick" data after history complete event, you can see that it's not filled as it should be.

      I repeat: I don't have any problem with version 10. All the application I've developed during the years works fine with version 10.
      My apps have problem with version 10.1 and the problem is exactly the same I see when I test your official demo app.

      On the contrary, I don't have any problem with last tick data whatever ESignal version I use.

      Comment


      • #18
        Thank you for your feedback and patience. I understand that you are trying to retrieve a full day's worth of T&S data via the Deskop API T&S functionality using the T&S in VB sample.

        We have discovered an issue with retrieving historical T&S data via the desktop API under 10.1. As you have indicated, it only returns T&S ticks from the point you requested the data. The backfill is essentially missing.

        Please be advised that we are looking into this issue. We will inform when a fix becomes available.

        Note that this is only an issue with the 10.1 edition. eSignal 10.0 in conjunction with the the Desktop API is not affected. We recommend you to stay with eSignal 10.0 should you need to download historical T&S data using the eSignal Desktop API T&S functionality at the moment.

        Comment


        • #19
          Glad you understood what I was try to tell.

          I guess the grab of my desktop screen have no purpose right now, so I won't send any movie and won't send my complaints, because there are high probabilities that my bad english have made the comprehension a very hard job.

          Hope you can fix the problem.

          I'll test next version from a "Borland (Codegear, Embarcadero..and only god knows what will be the next name) Delphi" perspective and I'll give my feedback.

          Comment


          • #20
            The issue with downloading historical T&S data via the Desktop API has now been fixed in the latest eSignal 10.1 maintenance release. You may download it at:

            http://www.esignal.com/download

            We have tested this with the Time and Sales in VB coding sample and it works accordingly.

            Comment


            • #21
              No cigar! In fact, not even the butt.

              I'm running version 10.1.1291.910 (7/14/2008).

              When tsfilter.lNumDays=1 (or 2 or....), an application of mine still is starting at realtime when the call is made to oesignal.GetTimeAndSales tsFilter.

              I'd have to say the fix is a non-fix.

              Comment


              • #22
                BTW, eSignal.GetAppBuildNumber is returning 1291. This is not a complete build version indicator. Why doesn't it return 10.1.1291.910 (7/14/2008)?

                Comment


                • #23
                  Hi scheel,

                  Hmmm...our tests show this to be working. Which sample are you using? Or if this is in your own app, can you post the code you're using to process the event?

                  Comment


                  • #24
                    This is my own app (VBA code in Excel). I've run a variety of different symbols and different day counts with the same results...what is returned begins at realtime.

                    Is there a chance that I'm running an old dll? I don't think so. References indicates VBA is using c:\program files\esignal\winsig.exe. It's dated 7/14/2008 4:01 PM. Looks ok to me.

                    Here's the event code:


                    Private Sub eSignal_OnTimeSalesChanged(ByVal lHandle As Long)
                    Dim vC As Variant, sIdx$
                    Dim dtChange!, nEr&, k&, j&
                    Dim sM$, nNewBars&
                    Dim nElapsed!
                    Dim lNumBars, lNumRtBars, lBar, lDiff As Long
                    Dim item As IESignal.TimeSalesData, lLastTsCount&
                    Dim ws As Worksheet, r As Range, sV$
                    Dim nm As Name

                    #If WCS Then
                    'globals can get reset during debug, etc.
                    If dtLastChange <= 0! Then dtLastChange = Timer() - nThrottleDefault
                    If nThrottle <= 0# Then nThrottle = nThrottleDefault
                    dtChange = Timer()
                    nThrottle = nThrottle * (1 - nAlphaThrottle) + _
                    (dtChange - dtLastChange) * nAlphaThrottle
                    If nThrottle <= nThrottleDefault Then
                    dtLastChange = dtChange
                    Else
                    'hang up...force reset
                    dtLastChange = 0!
                    nThrottle = nThrottleDefault
                    End If
                    #End If

                    On Error Resume Next
                    sIdx = CStr(lHandle)
                    Err = 0
                    vC = colCookies.item(sIdx)
                    If Err <> 0 Then Exit Sub 'ignore

                    With eSignal
                    lNumBars = .GetNumTimeSalesBars(lHandle) 'total bars
                    If lNumBars <= 0 Then Exit Sub 'this can be 0!
                    lNumRtBars = .GetNumTimeSalesRtBars(lHandle) 'total new bars since last entry
                    End With

                    Set ws = vC(colSheet)
                    With ws
                    Set nm = .Names(BarCount)
                    sV = nm.RefersTo
                    lLastTsCount = CLng(Right$(sV, Len(sV) - 1)) 'strip off =
                    .Names.Add BarCount, lNumBars 'save state to sheet for later recall. Row count can get mashed when >64K.
                    End With

                    If True Then
                    'read items and save in worksheet
                    Application.ScreenUpdating = False
                    nNewBars = lNumBars - lLastTsCount
                    lDiff = nNewBars * -1
                    k = lLastTsCount
                    ReDim vBar(1 To 1, 1 To 6)
                    With ws
                    For lBar = lDiff + 1 To 0
                    item = eSignal.GetTimeSalesBar(lHandle, lBar)
                    With item
                    Select Case .DataType
                    Case 0
                    vBar(1, 1) = "NA"
                    Case 1
                    vBar(1, 1) = "Bid"
                    Case 2
                    vBar(1, 1) = "Ask"
                    Case 4
                    vBar(1, 1) = "Trade"
                    Case Else
                    vBar(1, 1) = "Undefined"
                    End Select
                    vBar(1, 2) = .dPrice
                    vBar(1, 3) = .dtTime

                    Dim nFlag&, sFlags$
                    nFlag = .lFlags
                    If nFlag And 64 Then
                    sFlags = "Qoute Ask"
                    ElseIf 1 And nFlag Then
                    sFlags = "Trade Ask"
                    ElseIf 2 And nFlag Then
                    sFlags = "Trade Bid"
                    ElseIf 4 And nFlag Then
                    sFlags = "Trade Above Ask"
                    ElseIf 8 And nFlag Then
                    sFlags = "Trade Below Bid"
                    ElseIf 16 And nFlag Then
                    sFlags = "Trade Inside"
                    ElseIf 32 And nFlag Then
                    sFlags = "Quote Bid"
                    ElseIf 128 And nFlag Then
                    sFlags = "Form UpTick"
                    ElseIf 256 And nFlag Then
                    sFlags = "Form DownTick"
                    ElseIf 512 And nFlag Then
                    sFlags = "Form T"
                    Else
                    sFlags = "Undefined"
                    End If
                    vBar(1, 4) = sFlags
                    'vBar(1, 4) = .lFlags
                    vBar(1, 5) = .lSize
                    vBar(1, 6) = .sExchange
                    End With
                    k = k + 1
                    If k <= .Rows.Count Then .Cells(k, 1).Resize(1, 6).Value = vBar 'overflow not handled here!
                    Next lBar
                    End With
                    End If

                    nElapsed = Timer() - CSng(vC(colBegTime))
                    sM = "Bars = " & CStr(lNumBars) & vbCrLf & "Elapsed VBA time = " & Format(nElapsed, "#,###.##0") & " secs"
                    frmUpdate.StatusMsg sM, False, False
                    Application.ScreenUpdating = False
                    End Sub

                    Comment


                    • #25
                      Can you send me the worksheet? I'd like to test it here.

                      Send to: activex at mail.esignal.com

                      Comment


                      • #26
                        Egg on my face...big time. T&S is working fine in the latest 10.1 release fix.

                        My apologies to anyone who may have spun their gears trying to figure out what I did wrong.

                        I wrote bad code. eSignal is sending T&S from realtime back through history, and my code wasn't picking up the older history. I thought I was just receiving (by in effect rereading) the current history.

                        Ugh!

                        Comment

                        Working...
                        X