Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Today's Intraday Volume Again...

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

    Today's Intraday Volume Again...

    So I asked last week for a standard Indicator or method to calculate intraday volume.

    This is the he same number you can get all over the place with no effort.

    I got a number of crafty answers, none of which were functional against the backdrop of my 3000 line strategy code (nor should they be, necessarily, I recognize).

    Ultimately, I got the following answer: "Here at NT, we can't debug everyone's code. You should use a lot of print statements."

    That's great, since I already do this.

    Ultimately, I built += (1 second volume) bar calculation to run and aggregate throughout the day, but it lacks a certain amount of accuracy I desire.

    My entire strategy is calc'd "on bar close", so simply using "on bar open one day" VOL[0] is not the manner in which i want to proceed.

    So on the holiday Friday, I put the market monitor up (I rarely use it) and the number I want is sitting DIRECTLY on my screen under "daily Volume" under some default layout.

    Is there a way to grab this value and reference it in my strategy directly?

    Or is this column perhaps a particular predefined NT indicator, for which I can simply reference the indicator name?

    Eagerly,

    Andrew

    #2
    Originally posted by alabell View Post
    So I asked last week for a standard Indicator or method to calculate intraday volume.

    This is the he same number you can get all over the place with no effort.

    I got a number of crafty answers, none of which were functional against the backdrop of my 3000 line strategy code (nor should they be, necessarily, I recognize).

    Ultimately, I got the following answer: "Here at NT, we can't debug everyone's code. You should use a lot of print statements."

    That's great, since I already do this.

    Ultimately, I built += (1 second volume) bar calculation to run and aggregate throughout the day, but it lacks a certain amount of accuracy I desire.

    My entire strategy is calc'd "on bar close", so simply using "on bar open one day" VOL[0] is not the manner in which i want to proceed.

    So on the holiday Friday, I put the market monitor up (I rarely use it) and the number I want is sitting DIRECTLY on my screen under "daily Volume" under some default layout.

    Is there a way to grab this value and reference it in my strategy directly?

    Or is this column perhaps a particular predefined NT indicator, for which I can simply reference the indicator name?

    Eagerly,

    Andrew
    Code:
    protected override void OnMarketData(MarketDataEventArgs e)
    {
    if (e.MarketDataType == MarketDataType.DailyVolume) 
    DailyVolume = e.Volume;
    }
    Last edited by koganam; 01-25-2014, 12:03 PM.

    Comment


      #3
      Hello,

      This may work : http://www.ninjatrader.com/support/f...67&postcount=3

      You may also be able to get a value using Bars.GetVolume. Unfortunately we cannot do extensive debugging nor program things for you, but we are able to give suggestions and/or answer educational items.
      Adam P.NinjaTrader Customer Service

      Comment


        #4
        I don't want extensive debugging, I want a complete answer. I can usually debug on my own once pointed in the right direction.


        If I were to use Bars.GetVolume, what would the syntax look like in a cursory example?

        Regards.

        Comment


          #5
          Thank you Koganam.

          I have not worked with onMarketData, in the past, but I have worked with a number of other methods, so I will take to investigating how to implement the below code, as I did when debugging my OnExecution code, OnOrderUpdate code, and the "unsupported" Account class methodology.

          Many thanks for your answer and the code sample below, and I wish you best regards,

          Andrew

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          64 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          41 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          22 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          25 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          52 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X