Announcement

Collapse
No announcement yet.

esignal.RequestHistory

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

  • esignal.RequestHistory

    Is RequestHistory working as expected? I am trying the following:

    item.HistoryHandle = esignal.get_RequestHistory(item.Name, "1", IESignal.barType.btBARS, 100, -1, -1);

    But either it doesn't return anything (no events of esignal_OnBarsReceived) or it just return the most current data. Can anyone suggest a way to do it? Thanks!

  • #2
    This line looks OK to me. Did you call IsHistoryReady()? If you play around with the parameters, do you get more than one response? Do the samples work?

    Rather than request 1 minute bars, it would probably be faster to create them on the desktop by streaming in data and then creating the bars.

    Comment


    • #3
      I am trying to understand the logic here:

      First, I request 100 bars of 1-min data for EUR A0-FX:

      item.HistoryHandle = esignal.get_RequestHistory("EUR A0-FX", "1", IESignal.barType.btBARS, 100, -1, -1);

      Right after the above, I check if the data is immediately available, if so, I call the OnBarsReceived manually to process my histories:

      if (esignal.get_IsHistoryReady(item.HistoryHandle) != 0)
      if (esignal.get_GetNumBars(item.HistoryHandle) > 0)
      esignal_OnBarsReceived(item.HistoryHandle);

      Second, in my implementation of esignal_OnBarsChanged, I have the following code fragment:

      for (i = -99; i <=0; i++)
      {
      IESignal.BarData bd = esignal.get_GetBar(lHandle, i);
      System.Console.WriteLine("Close = " + bd.dClose);
      }

      My expectation is that esignal_OnBarsChanged event should occur just once with 100 bars returned. But now it looks like esignal_OnBarsChanged event occurs more than once. Is this the behavior you intented to do?

      Thank you for your answer.

      Comment


      • #4
        Originally posted by raymondyam
        My expectation is that esignal_OnBarsChanged event should occur just once with 100 bars returned. But now it looks like esignal_OnBarsChanged event occurs more than once. Is this the behavior you intented to do?
        OnBarsChanged will be called everytime there is a trade because that will cause price and/or volume in the most recent bar to have changed.

        Cheers... George

        Comment


        • #5
          I'm facing the same problem.. my application was working fine for a week.. and now all of a sudden, it doesn't recieve the history!

          nothing changed at all.


          I didn't know about the get_IsHistoryReady()

          gonna mess with it and see if it works..

          Comment

          Working...
          X