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 algospoke, Yesterday, 06:40 PM
          2 responses
          19 views
          0 likes
          Last Post algospoke  
          Started by ghoul, Today, 06:02 PM
          3 responses
          14 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          45 views
          0 likes
          Last Post jeronymite  
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          20 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          181 views
          0 likes
          Last Post jeronymite  
          Working...
          X