Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

get a bar with the Maximum volume over a period of time

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

    get a bar with the Maximum volume over a period of time

    1) get a bar with the Maximum volume over a period of time

    How is it possible to get?

    2) The second question is how you can get the maximum volume bar per day?

    Is there something similar like this

    Code:
     // store the highest bars ago value
    int highestBarsAgo = HighestBar(High, Bars.BarsSinceNewTradingDay);
    //evaluate high price from highest bars ago value
    double valueHigh = High[highestBarsAgo];
    But just for volume?

    Or any other options,
    thanks in advance.

    #2
    Hello memonolog,

    Thanks for your post.

    In your example code, you can replace High with Volume and that would provide you with the Highest bar volume from the beginning of the session.

    For the maximum volume over time (or over the period of your days to load) I would suggest to simply create a double variable to hold the maximum Volume and an int value to hold the bar number of the maximum Volume. Then in code, you could do something like:

    if (Volume[0] > maxVolume) //maxVolume is the double variable
    {
    maxVolume = Volume[0];
    maxVolumeBar = CurrentBar; //maxVolumeBar is the int variable
    }
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello memonolog,
      Let me share a simple code for max vol, you can refer this & modify as required. This marks Price level with max vol everyday.
      Attached Files

      Comment


        #4
        Originally posted by s.kinra View Post
        Hello memonolog,
        Let me share a simple code for max vol, you can refer this & modify as required. This marks Price level with max vol everyday.
        Hello, thanks for sharing, how do I understand this daily POC? - one specific price (price with the maximum volume per day) ??

        Comment


          #5
          Hello memonolog,
          This is not POC but PVP viz. Peak Volume Price as I have already mentioned in name. This will plot the Closing price of the bar with highest volume, its applicable to intra day time frames. So, this will identify the highest volume bar during a session & marks the price, you can print current bar index for better understanding. If you plot this on your chart it would be more clear. I shared it so you can have a clarity for understanding sessions & plot conditions. This is the nearest match to your requirement.

          Comment


            #6
            Originally posted by s.kinra View Post
            Hello memonolog,
            This is not POC but PVP viz. Peak Volume Price as I have already mentioned in name. This will plot the Closing price of the bar with highest volume, its applicable to intra day time frames. So, this will identify the highest volume bar during a session & marks the price, you can print current bar index for better understanding. If you plot this on your chart it would be more clear. I shared it so you can have a clarity for understanding sessions & plot conditions. This is the nearest match to your requirement.
            Thank you.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fernlicht, Today, 02:38 AM
            0 responses
            5 views
            0 likes
            Last Post fernlicht  
            Started by lokifdr, Today, 02:13 AM
            0 responses
            3 views
            0 likes
            Last Post lokifdr
            by lokifdr
             
            Started by b16_aln, Today, 01:48 AM
            0 responses
            6 views
            0 likes
            Last Post b16_aln
            by b16_aln
             
            Started by james272, Yesterday, 10:50 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Marco  
            Started by vaz21102, Yesterday, 09:22 PM
            2 responses
            9 views
            0 likes
            Last Post vaz21102  
            Working...
            X