Announcement

Collapse
No announcement yet.

RequestHistory: How to get Tick data including Bid & Ask

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

  • RequestHistory: How to get Tick data including Bid & Ask

    I am trying to figure out how to request 1 DAY of tick data, including bid and ask.

    I tried using "1T" for 1 day. This returns weird data.
    Seems to be ok trade data but with no time stamp.

    Here is my code in C#:

    sd.Handle = esignal.get_RequestHistory("EBAY", "1T", barType.btDAYS, 1, -1, -1);

    while(...not received...) { wait }

    if (esignal.get_IsHistoryReady(sd.Handle)!=0)
    {
    lHandle=sd.Handle;
    count = esignal.get_GetNumBars(lHandle);
    sd=(SymbolDay)handleMap[lHandle];
    BarData data;
    for(int i = 0; i < count; ++ i)
    {
    data = esignal.get_GetBar(lHandle,-i);
    IntraDaily id=new IntraDaily();
    id.Symbol = symbol;
    id.Date = data.dtTime.ToShortDateString( );
    id.Time = data.dtTime.ToLongTimeString( );
    id.Ask=data.dTickAsk;
    id.Bid=data.dTickBid;
    id.High=data.dHigh;
    id.Low=data.dLow;
    id.Price=data.dTickTrade;
    id.Volume=data.dVolume;

    And it seems that"
    id.Time does not get set.
    id.Ask & id.Bid neither.

    What I am doing wrong?

    -- Eric Meyer
    [email protected]

  • #2
    You probably want to use RequestTimeSales instead of RequestHistory.

    Cheers... George

    Comment

    Working...
    X