• 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

Order Flow Volume Profile

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

    Order Flow Volume Profile

    Are any Values from the Order Flow Volume Profile exposed to Ninja Script? Specifically the Value Area High, Value Area Low and the Point of Control.
    Thank you.

    #2
    Hello Trader17,

    Thank you for the post.

    Currently, Order Flow Volume Profile script access is not supported or documented yet. All documented Indicators will be listed here. There is a feature request to expose the plots of all the OrderFlow tools, I will add your vote to that feature request.

    Please let me know if I can assist further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you for adding my vote. Hope it comes out soon!!

      Comment


        #4
        Hello,

        I have a similar question.

        Are any Values from the Order Flow 'Volumetric Bars' exposed to Ninja Script?

        Comment


          #5
          Originally posted by NinjaTrader_ChrisL View Post
          Hello Trader17,

          Thank you for the post.

          Currently, Order Flow Volume Profile script access is not supported or documented yet. All documented Indicators will be listed here. There is a feature request to expose the plots of all the OrderFlow tools, I will add your vote to that feature request.

          Please let me know if I can assist further.
          Here is the list so far. Some form Volumetric Bars are included.

          Comment


            #6
            Hi Trader17,

            Thanks for the info.

            That is great.

            Hopefully they will provide the functionality I'm looking for.

            Comment


              #7
              Hello i2w8am9ii2,

              Thanks for the reply.

              Here is the documentation on accessing Order Flow Volumetric bars:

              https://ninjatrader.com/support/help...tric_bars2.htm

              Please let me know if I can assist further.
              Chris L.NinjaTrader Customer Service

              Comment


                #8
                Hi Chris,

                Great. Thanks for the link.

                So would we be able to create input parameters for methods/properties such as the following?

                GetAskVolumeForPrice
                GetTotalVolumeForPrice


                Or do such methods/properties (with Get in the front) only provide the volume numbers and cannot be set for use in an input parameter?

                Comment


                  #9
                  Hello i2w8am9ii2,

                  Thanks for the reply.

                  Yes you can use input parameters to pass in as long it occurs after you initialize the BarsType like in the help guide page:

                  Code:
                   NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsType barsType = Bars.BarsSeries.BarsType as     
                          NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsType;
                  Please let me know if I can assist further.
                  Chris L.NinjaTrader Customer Service

                  Comment


                    #10
                    Hi Chris,

                    Great. Thanks for the info and code.

                    I appreciate it.

                    Comment


                      #11
                      Hi,
                      If i want to get total volume for the week and total volume for the week within a price range inside the automated strategy, how can I code that?
                      Thanks.
                      Last edited by avdem; 05-15-2019, 08:31 PM.

                      Comment


                        #12
                        Hello avdem, Thanks for your post, and welcome to the NinjaTrader forum.

                        If your inquiry is not related to the thread, please note to make a new thread in the future.

                        Your script will need to add a weekly data series and access the Volume series when BarsInProgress == 1. The attached script will print out the weekly volume at the end of every week.

                        Please let me know if you have any additional questions.
                        Attached Files
                        Chris L.NinjaTrader Customer Service

                        Comment


                          #13
                          Thanks Chris,
                          This solves half of the problem getting the total volume for the week.
                          The second part is to get the volume within the price range for the week. For example weekly price range is between 107 and 110 and I need the volume between 108 and 109 for that week.
                          From what I understand GetTotalVolumeForPrice gives the volume for a specific price. So is there easy way to get the sum for this range or I would have to get volume for every tick within the range and then sum those?

                          Also I'm looking for the week to current moment values, not current week. So if i'm calculating this on Thusday 8:00pm it should take values from previous Thursday 8:00pm to current Thursday 8:00m.

                          Thanks,

                          Alex
                          Last edited by avdem; 05-16-2019, 09:43 PM.

                          Comment


                            #14
                            Hello Alex, Thanks for your reply.

                            If you need to sum up those values, use a for loop to iterate through each price level and have a running total I found this video that shows how to sum numbers with a for loop.

                            e.g.

                            Code:
                            if (Bars == null)
                            return;
                            
                            NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as
                            NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
                            
                            if (barsType == null)
                            return;
                            
                            double TheSum = 0;
                            try
                            {
                            for(int i = -5; i < 5; i++)
                            {
                            
                            Print("Volume at " + (Close[0] + TickSize*i) + " V = " + (barsType.Volumes[CurrentBar].GetTotalVolumeForPrice(Close[0] + TickSize*i)));
                            TheSum += (barsType.Volumes[CurrentBar].GetTotalVolumeForPrice(Close[0] + TickSize*i);
                            
                            }
                            Print("");
                            }
                            catch{}
                            All the best wishes!
                            Chris L.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by nepenthean, Today, 08:01 AM
                            0 responses
                            1 view
                            0 likes
                            Last Post nepenthean  
                            Started by bxl2019, Today, 07:59 AM
                            0 responses
                            0 views
                            0 likes
                            Last Post bxl2019
                            by bxl2019
                             
                            Started by tcfcigvo, Yesterday, 11:39 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post tcfcigvo  
                            Started by BobbyWan, Yesterday, 09:15 PM
                            0 responses
                            10 views
                            0 likes
                            Last Post BobbyWan  
                            Started by trader14, Yesterday, 08:23 PM
                            0 responses
                            6 views
                            0 likes
                            Last Post trader14  
                            Working...
                            X