Announcement

Collapse
No announcement yet.

Real-Time Volume

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

  • Real-Time Volume

    I am processing the real-time volume number that comes with the function Hooks1BarsChanged( ). Is this volume number an individual trade volume like Time-Sales data, or is this the total summation for the bar?

    I guess I am asking if we need to do our own running summation of the volume number from Hooks1BarsChanged().

    Thanks
    Patrick

  • #2
    Which Desktop API method did you call to receive this event?
    In what data structure is this volume field contained in?

    Comment


    • #3
      I am calling RequestHistory as seen below.

      lRTHandle = Hooks1->RequestHistory[wSymbol] [wInterval] [btType] [lNumBars] [lStartTime] [lEndTime];


      I process the callback, "Hooks1BarsChanged" the volume number is in the barItem data structure.

      Hooks1BarsChanged(TObject *Sender, long lHandle){

      lNumBars = Hooks1->GetNumBars[lHandle];

      barItem = (BarData)(Hooks1->GetBar[lHandle][0]);

      o2=(double)barItem.dOpen;
      h2=(double)barItem.dHigh;
      l2=(double)barItem.dLow;
      c2=(double)barItem.dClose;
      v2=(int)barItem.dVolume;

      }

      Comment


      • #4
        Assuming that you are requesting 1 minute intraday bars update in real-time, the volume field you get in the baritem object is the volume for that particular minute.

        Comment

        Working...
        X