• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Maximum Volume

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

    Get Maximum Volume

    The script below returns the price at which the most volume occurred in a bar. Can we replace "price" with "volume" instead to get the maximum volume itself? Is that possible?

    (+ barsType.Volumes[CurrentBar].GetMaximumVolume(null, out price) + " at price: " + price)

    Will this return the total Volume? (+ barsType.Volumes[CurrentBar].GetMaximumVolume(null, volume) )

    Thank you.

    #2
    Hello Trader17,

    This would not be a feature this method specifically offers however you may be able to use GetTotalVolumeForPrice in combination with the found price. Have you tried getting the price from the maximum and then get the volume for that price? Outside of this, I would need to put in a feature request for specifically providing a volume output from this method.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      How do I get price first and then the total volume at that price? Maybe a feature request will be great too.
      Thank you.

      Comment


        #4
        Hello Trader17,

        In my prior post, I mentioned one way to use the found price toward accessing the volume. You would use both the GetMaximumVolume and GetTotalVolumeForPrice methods to do that. Is this not what you are asking to do?

        If you use GetMaximumVolume first that will output a price where the maximum volume was found. That price could then be used with GetTotalVolumeForPrice which takes a price as the input and returns the total volume for that price. Are you trying to do something other than taking the found price and getting the volume for that price? In your first post, you mentioned that you wanted to replace the found price with volume which the method GetMaximumVolume specifically does not do, but you can later access the volume at that price with GetTotalVolumeForPrice.

        I look forward to being of further assistance.

        JesseNinjaTrader Customer Service

        Comment


          #5
          I want to do both. So I can get the price using GetMaximumVolume. And then how would I use GetTotalVolume for that Maximum? Is there another script to do that in Order Flow? I thought they were different. Like one gets the total volume at price and the other gets the price at which maximum volume occurred. I am looking for the total volume at the maximum. Makes sense?
          Thank you.

          Comment


            #6
            Hello Trader17,

            I agree they are different methods and do have different general purposes but the context in which you are wanting to use these methods you are referring to the same price which has the same volume based on the context of your question.

            If you have used GetMaximumVolume first and now have the price where that maximum volume is, using that same price and retrieving the volume by its price would also be that same maximum as that is the same price being used.

            If you are unsure of the result of these methods, I would suggest that you use prints and test this from your end yourself. You can use the help guide sample to test this question. You would need to move the GetTotalVolumeForPrice to be called after GetMaximumVolume and change GetTotalVolumeForPrice to use "price" instead of "Close[0]".

            Please let me know if I may be of further assistance.




            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by faisamtrader, Today, 10:31 AM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Tyler  
            Started by ChazJ, Today, 09:48 AM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by maxie, Today, 10:01 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Melissa  
            Started by Bionian, Today, 09:36 AM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by tomd, Today, 09:48 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_Ariana  
            Working...
            X