Announcement

Collapse
No announcement yet.

API ticks

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

  • API ticks

    Hi,
    using the demo file (vbsample) for a spot of 'while it's quiet testing' I've been trying to collect info on ticks, one example using

    lHistoryHandle = esignal.RequestHistory(sSymbol, "10T", btDAYS, 2, -1, -1)

    I then use the supplied:-

    If esignal.IsHistoryReady(lHistoryHandle) = True Then
    FillHistory
    End If

    and have slightly modified the formatbardata function to add in

    sRet = sRet + ", " + Str$(item.dTickAsk)
    sRet = sRet + ", " + Str$(item.dTickBid)
    sRet = sRet + ", " + Str$(item.dTickTrade)

    (item being a bardata structure if you recall from the demo file)
    to the existing bar data info. I don't get any tick info at all, I can get 1 minute bars etc but none of the returned bars have anything except zeroes for tickask, tickbid or ticktrade. Testing the bardata.bfFlags doesn't return a value of bfBIDASK or bfTRADE for any of the data retrieved.

    I'm obviously doing something really simple and wrong, the original version of formatbardata includes a comment line of

    ' this is capapble of doing raw ticks, just not formatting the data out.

    - which would suggest there's some problem with this simple approach, but I can't see any alternative means of grabbing the data for ticks. Anybody spot my obvious mistake?

    Dave

  • #2
    I actually sort of wonder why dTickBid, dTickAsk, and dTickTrade are even in the bar data structure, as they seem more relevant to the Time and Sales stream than a series of bars (since each bar would most likely contain multiple changes of the bid/ask and last trade). What values would you write to those fields? The very last value for those three I suppose? The last trade price is in the dClose variable already, so no real need for dTickTrade IMHO.

    So I guess, if those member variables are intended to work, my quess is that they would only be filled in by an OnBarsChanged event (realtime bar update) as opposed to them containing values received from the history server.

    Comment


    • #3
      API tick data

      Thanks,
      it just seems rather odd to have this in the structure if you don't use it - as far as I can see OI, the flags and the tick data are all zero all the time. As the main program itself happily charts ticks with bid/ask/trade values I assumed you could actually retrieve a tick by tick datastream that could be filtered via the flags to give trade prices...

      My aim here is to produce realtime scanning of P&F charts to find buy/sell setups, basically you set up a small list of stocks/chart settings that are then monitored continuously for setups - in amongst the settings I was planning to offer the same range of timescales as the main program, which includes 'tick'.
      It is noticeable, however, that the ieSignal P&F only charts down to 1 minute bars, so I guess I'll have to stop there and do 1 minute H-L charts.

      You've saved me puzzling about making silly mistakes anyway - it's usual to annotate this sort of thing in the docs with 'not currently used' or similar, thanks for saving me wasted time... remind me to run a copy past you when I get done

      Dave

      Comment


      • #4
        BTW, I'm not sure what the official stance is on those fields being in the bar structure. I haven't tried to read them in the OnBarsChanged event to see if they are filled in there, and I don't know if they were placed in the data structure as a place holder for ideas to come. I'm just giving you my thoughts on the matter. I agree that it should be documented a bit better regarding those fields, but with all new development, documentation usual must come after implementation and this API is still pretty fresh from the oven.

        I do use the bid/ask/trade fields every day though from the Time and Sales stream. So at least we know the values arrive properly there (and if you register to receive them in the OnQuoteChanged event).

        Cheers... George

        Comment


        • #5
          API Ticks

          Sure, that's understood - manual writing isn't my favourite hobby either. Overall I'm very happy with the API and the docs - it's the usual thing here... the process looked really simple but didn't work as expected, and I don't want to make a mess of it so early in the project.
          Thanks again for the help,
          Dave

          Comment


          • #6
            You're welcome. I've also been pleased with the new API. Aside from a few rough edges which are on their way to being fixed, I have been very pleased with my apps port to eSignal. I'd love to see yours when it's ready.

            Cheers... George

            Comment

            Working...
            X