• 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.


No announcement yet.

Partner 728x90


Value Areas - dValueArea

  • Filter
  • Time
  • Show
Clear All
new posts

    dragging up and old thread but hoping someone can point me in the right direction. I have been given and indicator that looks like it's come from this dvalue code. But I'm having a problem with it, and I have also seen the same issue using the dvalue code from this thread.

    I looks like it's not detecting the session times correctly


    you can see on this screenshot some days are being plotted as pre session (red) which therefore means the developing levels are not correct and also on the next day the "yesterday levels" are wrong..

    has anyone seen this before. I'm thinking it could be some sort of more generic issue with the code rather than specific to this indicator???



      Hello NathanO,

      Thank you for your post.

      I am not familiar with that indicator. It is protected in a dll or do you have access to the source?
      Patrick H.NinjaTrader Customer Service


        2/6/2017 11:55:20 AM,Default,Indicator 'DValueArea': Error on calling 'OnRender' method on bar 505: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.,

        Im getting this after loading a charts with the indicator.


          ericson, is this your script or did you download it the forums somewhere? Likely the OnRender() handling of brushes would need to be updated, as reference item you could check for example into - http://ninjatrader.com/support/forum...ad.php?t=85099
          BertrandNinjaTrader Customer Service



            Not sure, but i think if i load on too many charts, or set process priority higher, or scroll too far to the left of the chart. Not sure.

            I edited it by declaring some of variables before onbarupdate, but didn't help.


              Thanks ericson, we will check into it.
              BertrandNinjaTrader Customer Service


                Hello ericson,

                I've made some changes to the DValueArea for NinjaTrader 8 to update this to the latest version.

                Can you test this updated version and let me know if you are still getting errors?

                Chelsea B.NinjaTrader Customer Service


                  Yes I will. Thank you. Which code was altered? Only Onrender section?
                  Last edited by ericson; 02-09-2017, 01:49 PM.


                    Hi ericson,

                    The sessionIterator is moved to be created in State.DataLoaded.

                    Added !IsInHitTest to OnRender().
                    Chelsea B.NinjaTrader Customer Service


                      Hi, wanted to get back to you. Indicator seems to be error free now!

                      Is it normal to have 5% cpu load with indy, one chart, with COBC?

                      I remove it, cpu is about 1%

                      UPDATE: Seems zorder putbehind option when true causes excessive cpu load.

                      Also, i highly suggest declaring variables in the beginning of the script, those that can be, to improve performance. That way the variables are allocated a permanent memory space, rather than creating new ones each processing event.
                      Last edited by ericson; 02-21-2017, 01:38 PM.


                        How can i go about accessing the market profile data?

                        It looks like its stored in two dimensional array "priceHitsArray". 2 columns, # however many slots. I assume columns are for prices and their total volume?

                        How could another indicator access it to use or analyze?

                        UPDATE: Solved this issue by creating a new indicator
                        Last edited by ericson; 02-21-2017, 10:22 PM.


                          Hello ericson,

                          Please consult with the original author of the script, DeanV, for specifics about usage and requests for changes.
                          Chelsea B.NinjaTrader Customer Service


                            RtVAH & RtVAL to compliment RtPOC

                            DeanV, I like so many others greatly appreciate your fine work here. It is a huge help.

                            1) I just finished reading the entire thread going back to 2009 and NT6.5 (apparently there
                            is a real-time version for 6.5). There aren't any working models (RtValueArea)
                            for NT7 or 8 that I can find. There're at least a couple dozen requests for this feature
                            over the past 9-ish years. DeanV did all the heavy lifting by creating this beauty in the
                            first place, Thank you DeanV.
                            Can someone please implement this long overdue, highly anticipated feature for the NT8 version of DValueArea?

                            2) Q: Post 197 on https://ninjatrader.com/support/foru...DValue&page=14
                            "How can I have evolving VAH and VAL plotted on the chart (like Evolving POC)?"

                            A: Post 199 on https://ninjatrader.com/support/foru...DValue&page=14
                            "You'll have to write some code if you want the historical real-time value area.
                            Just add two more plots and look at how the RtPOC was called to duplicate."

                            Based on the authors response, it looks mighty simple for someone that knows what they're doing.
                            If someone will tell me where to place these two plots and
                            what I need to reconfigure from RtPOC to find RtVAH & RtVAL, I will make the changes and post it.

                            3) Can anyone point me to the code I'd have to change to have yesterdays VA plot on yesterday rather than today?
                            See pic "VA_shift".

                            4) I've included the most recent version of DValueArea I can find.

                            I thank all in advance for any guidance and especially DeanV.
                            Attached Files
                            Last edited by johnnymustard; 12-19-2017, 04:13 AM.


                              Hello johnnymustard,

                              I wanted to note that if you are not able to find a community member on the forums to implement the logic you are requesting, 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 business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.

                              As far a creating a plot, this done with the AddPlot() method in OnStateChange when State is State.SetDefaults.

                              Adding a plot creates an index in the Values collection that allows you to set the value for the plot to whatever value you would like.

                              Below are publicly available links to the help guide.
                              Chelsea B.NinjaTrader Customer Service


                                Evolving VAL and VAH

                                Thanks for your hard work on the latest iteration of the DValue indicator. It has improved my trading.

                                The settings allow for the evolving VAH and VAL to plot as lines just like the real time POC. However, no lines appear for the evolving VAL and VAH.

                                Can someone please help?



                                Latest Posts


                                Topics Statistics Last Post
                                Started by brett0, Today, 12:33 PM
                                1 response
                                Last Post NinjaTrader_Melissa  
                                Started by lordvader34, Today, 11:12 AM
                                1 response
                                Last Post NinjaTrader_PatrickG  
                                Started by tausifkhan, Today, 05:18 AM
                                1 response
                                Last Post NinjaTrader_ChrisL  
                                Started by spottysallrite, Today, 11:00 AM
                                2 responses
                                Last Post spottysallrite  
                                Started by Andreas189, Today, 10:28 AM
                                6 responses
                                Last Post NinjaTrader_Jim