Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

dValueArea: how to do some things

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

    dValueArea: how to do some things

    Hello again,

    I would like to adjust dvalueArea to calculate weekly and monthly profiles, and I would like to access the data in script, but I'm getting a little confused. I would really appreciate any pointers to help accelerate my understanding of what needs to be adjusted.

    [I understand the OrderFlow Volume Profile data cannot be accessed via script, so that's why I am seeking to use dvalueArea.]

    There have been some posts requesting guidance on dvalueArea, and I know the stock answer is, "please contact the original author."

    So, I guess I'm reaching out to NinjaTrader_ChelseaB because he is listed as the author on the download site: https://ninjatraderecosystem.com/use...ad/dvaluearea/

    Any assistance would be greatly appreciated!

    Thank you

    #2
    Hello catinabag,

    As a heads up I am not the original author of DvalueArea. This was a port from NinjaTrader 7 to NinjaTrader 8 created by DeanV.
    This means, I didn't develop the logic. I don't have a deep understanding of the inner workings or calculations. I've only copied and pasted the code into a NinjaTrader 8 script and corrected any code breaking changes from nt7 to nt8.
    https://ninjatraderecosystem.com/use.../dvaluearea-2/

    I would first recommend to contact the original author for any questions or comments, as the developer knows how the script works. It's their idea.


    When you mention "I would like to adjust dvalueArea to calculate weekly and monthly profiles", are you trying to apply the indicator to a Weekly chart or Monthly chart?

    Are you trying to reset values after a week or a month?


    The DataBox shows plots. If you have a value you want to show here, add a plot with AddPlot, and set the Values[plot index][bar index] for it.
    https://ninjatrader.com/support/help...t8/addplot.htm
    https://ninjatrader.com/support/help...nt8/values.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Chelsea. I will be looking at this again over the weekend. Basically, I want to get the volume profile over the month of January, for example, so I can access that VAH, POC and VAL data via script. The Order Flow Volume Profile indicator works great, but I cannot access that data aside from seeing it on a chart. This is not an urgent project but rather something which would improve my summary stats.

      Comment


        #4
        Hello catinabag,

        Does using a month input series change the values to what you are wanting?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks for following up - actually, it does not give the desired output. Rather than calculate each bar's profile [per month], it does collections of months, and they are not regularly-sized collections.

          This will be an interesting project for the weekend! [I have a back-up calc that is a bit inaccurate but close enough for horseshoes in a pinch, which I'm using for now].

          Comment


            #6
            Hello catinabag,

            Just as an idea. Possibly you have a condition to reset the variables to 0 when the month is a new month?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thanks, Chelsea - I will play around with it!

              Comment


                #8
                Hello there,

                I set aside this project eons ago, but I am picking it back up again!

                The importance of Value Area to me is quite clear: I use it to calculate Fibonacci levels.

                See this chart: you can see very clearly that the big moves aligned with the Fibonacci levels that were based on the prior week's Value Area High and Low as the 1 and 0 levels.

                I understand Market Profile is not made available to indicator scripts, which is really unfortunate! So, if you can let me know if you ever plan to make it available to indicator scripts, I would appreciate it! Thank you!

                [My simple plan is to make the Fibonacci levels appear on the chart automatically rather than hand draw them each time!]

                Comment


                  #9
                  Hello

                  I am working on this now, and I think it may help you



                  private DValueArea DValueArea1;



                  else if (State == State.DataLoaded)
                  {

                  DValueArea1 = DValueArea(Close,40,2,0,5,false,new TimeSpan(9, 30, 0),0.68,2,2,_dValueEnums.dValueAreaTypes.VWTPO,0,1 00,1,6.75,true,5,true,0,60,300,false,2,false);
                  AddChartIndicator(DValueArea1);

                  DValueArea1.Plots[0].Brush = Brushes.Yellow; // Desarrollo del Poc Session Actual
                  DValueArea1.Plots[1].Brush = Brushes.White; // Poc Session Anterior Cierre
                  DValueArea1.Plots[2].Brush = Brushes.Blue; // Vab Session Anterior
                  DValueArea1.Plots[3].Brush = Brushes.Blue; // Vat Session Anterior

                  }


                  Print("Poc de la Session y el desarrollo del mismo " + DValueArea1.RtPOC[0]);
                  Print("Poc " + DValueArea1.POC[0]);
                  Print("vAT " + DValueArea1.VAt[0]);
                  Print("vAB " + DValueArea1.VAb[0]);

                  protected override void OnBarUpdate()

                  // Valores Resultados dia Anterior
                  Print(string.Format("Poc de la Session y el desarrollo del mismo {0} | Poc {1} | vAT {2} | vAB {3}",DValueArea1.RtPOC[0],DValueArea1.POC[0],DValueArea1.VAt[0],DValueArea1.VAb[0]));

                  Comment


                    #10
                    Thank you very much for your post - sorry for a belated reply. Yes, that's a good idea how you're referencing the code

                    Adjusting that code from daily to weekly & monthly profiles is something I set aside. Just got really busy. I've learned a fair amount of C# since the last time, so I'll probably re-visit this again once I have some spare time

                    Comment


                      #11
                      Hello, I would like to get the weekly POC from dValueArea too, any ideas?

                      On other hand, I guess OF Volume Profile is not yet ready to use with StrategyBuilder, isn't it?

                      Thanks

                      Comment


                        #12
                        Hello federicoo,

                        You can add a weekly series with AddDataSeries() and do calculations with that weekly series.



                        If you are calling the DValueArea from a host script you can supply that as the input series to the indicator and call the indicator multiple times with different added series.


                        Order Flow indicators cannot be used in the Strategy Builder.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Hello,

                          Sorry for posting on an old topic but since my question is related i'll just ask here:

                          Any advice (or maybe somebody already did it) on how to add the possibility to change color or at least opacity of the value area compared to the area on top and bottom? I mean the proper area, not just the lines.

                          I never coded anything in C# so i wouldn't know where to start.

                          Thanks.

                          Comment


                            #14
                            Originally posted by CapoA View Post
                            Hello,

                            Sorry for posting on an old topic but since my question is related i'll just ask here:

                            Any advice (or maybe somebody already did it) on how to add the possibility to change color or at least opacity of the value area compared to the area on top and bottom? I mean the proper area, not just the lines.

                            I never coded anything in C# so i wouldn't know where to start.

                            Thanks.
                            Hello CapoA,

                            Thank you for your post and welcome to the NinjaTrader forum community!

                            The dValueArea uses custom SharpDX brushes to fill the area; the color and/or opacity could be changed programmatically though it may be challenging without C# experience. There are some relevant resources in the help guide that might help to gain a better understanding of how brushes are involved in the script and what you might need to change:Unfortunately, in the support department at NinjaTrader it is against our policy to create, debug, or modify, code or logic for our clients. Further, we do not provide C# programming education services or one-on-one educational support in our NinjaScript Support department. This is so that we can maintain a high level of service for all of our clients as well as our associates.

                            That said, through email or on the forum we are happy to answer any questions you may have about NinjaScript if you decide to code this yourself. We are also happy to assist with finding resources in our help guide as well as simple examples, and we are happy to assist with guiding you through the debugging process to assist you with understanding unexpected behavior.

                            You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team to follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one-on-one educational services.

                            Please let us know if we may be of further assistance.​

                            Comment


                              #15
                              Thank you very much for the details and the willingness to help, It's really appreciated.

                              Tomorrow i'll give a look at the code, if it doesn't require a new whole part in the script to redraw the upper/bottom area of the volume profile with the different color/opacity, maybe i can manage it.
                              After all, the indicators do already plots the lines for the area, so somewhere it is already calculated.

                              Best Regards.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              637 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              366 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              107 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              569 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              571 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X