Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

VWAP improvements (anchored, custom session, prior session highlight, Labels)

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

    #76
    Hello DeskTroll,

    Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

    When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #77
      Hi Chelsea - Please add my vote for this. Thanks.

      Comment


        #78
        Hello iq200,

        Thanks for your voice.

        I've submitted your vote for SFT-4766.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #79
          Please add my vote for an Anchored VWAP SFT-4766, would be great if it was a drawing tool.

          Comment


            #80
            Hello RangerTrader,

            Welcome to the NinjaTrader forums!

            Your vote is submitted as well for SFT-4766.

            Thanks for your vote.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #81
              Hello all, I've searched the forums and found a script for VWAP in NT8. Figured this could be a useful addition to this conversation and that this script would be a good starting place to build an anchored VWAP. In the code, of I'm not mistaken,
              (Bars.IsFirstBarOfSession) is used to anchor the VWAP to the start of the most recent section in the chart. The question then, for the ninjatrader team, is how can you go about turning this static parameter into something dynamic that the user can adjust? I've hacked together some basic indicators in Ninja script before (I'm by no means an experienced coder) and would love to help bring an open source anchored VWAP to the community with some assistance. Thank you.

              Hello I understand that there is a VWAP indicator available as part of the OrderFlow option. But before I shell the $ to buy the needed lifetime license, I am trying to look for any free VWAP indicator that I can put to test as part of my evaluating the NT platform (new to NT). I am effectively looking for a VWAP indicator
              Attached Files

              Comment


                #82
                Hello StoneMan78,

                You could add a public bool using the NinjaScriptProperty attribute and an auto-getter and setter to make an input for the user.

                Below is a link to the help guide on the NinjaScriptProperty attribute which has sample code.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #83
                  Hello Chelsea B.,

                  Thank you for that suggestion. My next questions revolves around a design choice when it comes to anchoring the VWAP. You could either have the user input (from above) count how many sessions back you want to anchor the VWAP, or, you could tie the anchor point directly to a specific date. I think to start it would be easier to count how many sessions back you you want to anchor from the current one. Any suggestions on how (Bars.IsFirstBarOfSession) could be manipulated using the NinjaScriptProperty attribute method you showed in your last reply to achieve this?

                  Comment


                    #84
                    Hello StoneMan78,

                    You would need to design the custom logic.

                    A bool input could be used in a condition that when true would reset at the first bar of a session when Bars.IsFirstBarOfSession is also true..

                    An int input could be used to have a counter that counts the number of sessions if you are doing a loop through the data.

                    There is sample code of using a counter.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #85
                      Hello Chelsea B.

                      Thank you for your reply. Let me know if we are on the same page here, and if this logic lines up with what you are suggesting.

                      To begin we count with an int how many "trues" you get from a bool, which returns as true when Bars.IsFirstBarOfSession is true.

                      Then, the logic I am thinking of is the user inputs an int which will denote where they want the loop to stop. So if the user inputs 3, the algorithm will loop through three sessions, then stop the loop with some code like this -> (userinput == count). Then, the VWAP logic can begin at the first bar from three sessions ago.

                      Comment


                        #86
                        Hello StoneMan78,

                        The bool would give the user the choice of the default behavior or your custom behavior.

                        How you approach looping through the data could be gone about in different ways. You could add each session close bar number to a list when Bars.IsFirstBarOfSession is true on each bar close perhaps.
                        Then you could have the vwap be from that saved bar. If the user selects 3 it uses the index of the list count minus 3 for 3 sessions ago..
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #87
                          Hello Chelsea B.

                          I see what you are saying, the current bar function (pasted below) could be used to store only the bar numbers when when Bars.IsFirstBarOfSession is true.



                          You then say in the last reply, "You could add each session close bar number to a list." I like that idea. My question is, how would you create that list? If there 50 bars in a chart and bar (0, 9, 19, 29, 39) are all the first bars of the session. How you go about finding which is the first, second, third, etc. entry in that list? Is there a way we can successfully navigate a dynamic list like this? If so, could you explain it to me? At this point I guess this is more of a fundamental question about coding but it seems to be the lynch pin to tie this logic together. Thanks for your help by the way!

                          Comment


                            #88
                            StoneMan78,

                            Below is a link to the microsoft documentation List<T>.
                            Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.


                            And a link to the dotnetperls tutorials.


                            They would be in the order they are added.

                            The 2rd last session would be found with the[list.Count - 2]. The third last session would be[list.Count - 3]..
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #89
                              Chelsea B.

                              Thank you for the links, the dotnetperls tutorial was particularly useful. I believe the "C# program that uses List indexes and for-loop" example it provides would be a good framework for the anchoring logic of this indicator. The for-loop would examine each bar on the chart, and index bar numbers to the list where Bars.IsFirstBarOfSession is true. From there[list.count - UserInput] would return the bar number to anchor the VWAP on. Does this basic summary of the anchoring logic seem right you?

                              Comment


                                #90
                                Hello StoneMan78,

                                It looks like you are on the right path.
                                Chelsea B.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by NullPointStrategies, Yesterday, 05:17 AM
                                0 responses
                                71 views
                                0 likes
                                Last Post NullPointStrategies  
                                Started by argusthome, 03-08-2026, 10:06 AM
                                0 responses
                                143 views
                                0 likes
                                Last Post argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                76 views
                                0 likes
                                Last Post NabilKhattabi  
                                Started by Deep42, 03-06-2026, 12:28 AM
                                0 responses
                                47 views
                                0 likes
                                Last Post Deep42
                                by Deep42
                                 
                                Started by TheRealMorford, 03-05-2026, 06:15 PM
                                0 responses
                                51 views
                                0 likes
                                Last Post TheRealMorford  
                                Working...
                                X