Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom bar types

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

    Custom bar types

    I love all this new functionality and I'm glad you are including it, particularly the volumetric stuff.

    One of these releases, I would hope you would begin to examine some of the things you aren't supporting in NT8 that you once did with NT7, such as custom bar types. I had someone ask me about help he needed converting an NT7 script that added a data series using a custom time frame that differed from the chart's time frame.

    Code:
    Add( PeriodType.Custom7, 12 );
    All I could do was tell him that while you could do that in NT7, you can't do that in NT8 because they got rid of custom types. That actually reminded me of a wish I have had for the past couple of years. I have written quite a few indicators that get bid/ask information from the Volumetric bars and love it because it's super fast compared with the old fashioned way of hitting OnMarketData every tick and keeping track of every buy or sell in a data structure. But I'm stuck getting that information with Range bars. I love Ray's no gap range bars but I can't get volumetric data from those because you can't pass in a custom data type from a bars type that you have written to AddVolumetric().

    I wish you would include it on the list to revisit functionality such as this you used to have in NT7 that you took away from us in NT8. I know volumetric bars weren't in NT7 but the abiltiy to add a data series based on a custom bar type was there, and these two issues are somewhat related. (If there was a way to pass a custom bar type to AddDataSeries(), I'm sure there would also be a way to pass a custom bar type to AddVolumetric()).

    Thanks.

    #2
    Hello traderpards,
    Thanks for your post.

    Custom bar types are a thing in NinjaTrader 8 and have their own class. Please see the following link for more information: https://ninjatrader.com/support/help...?bars_type.htm

    You can add custom BarsTypes that are installed on your system by casting the registered enum value for that BarsPeriodType. For example:
    Code:
    AddDataSeries((BarsPeriodType)14, 10);
    https://ninjatrader.com/support/help...dataseries.htm
    https://ninjatrader.com/support/help...barsperiod.htm
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Nice! Thanks Josh... I didn't realize you could do that.

      Is there any way to get my custom type to show up in a BarsPeriodType drop list? And can we look at being able to load a BarsPeriodType casted to a custom type like you explained in AddVolumetric? I was able to help the guy I'm helping but I couldn't help me...


      Comment


        #4
        traderpards,

        There is not a dropdown list available to view your installed bar types. You could use something like the following indicator though: https://ninjatraderecosystem.com/use...ype-identifier.

        Not sure what you are asking for specifically in regards to AddVolumetric().
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          Thank you for that. It's definitely something I can use.

          The second parameter for AddVolumetric asks for a BarsPeriodType. I tried to cast the custom bars type like you suggested but I got a runtime error: Indicator 'VolumetricBase': Error on calling 'OnStateChange' method. '166' cannot be used as a base bars period type for 'Volumetric.'

          So it appears AddVolumetric doesn't support any custom bars type. Why not? Bars is bars, right? The beauty of volumetric bars is everything is stored in the BarsTypes.VolumetricBarsType object, which is at the bar level, right? Would it be easy enough to just open that up? It would be really cool if you could do that. I mean, it's powerful already but being able to get bid/ask information from a custom bars type... I don't think anyone else does that, do they?

          Comment


            #6
            traderpards,
            Thanks.

            It would not yet be possible to use custom bar period types inside the Volumetric bars. We are tracking this as a feature request, so I will go ahead and have a vote added on your behalf. The internal tracking number for this feature request is SFT-3013. Please reference this internal tracking number if you ever have questions regarding this feature request.

            In the meantime you can access the Order Flow Volumetric Bar values with the properties and methods here: https://ninjatrader.com/support/help...tric_bars2.htm
            Josh G.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_JoshG View Post
              traderpards,
              Thanks.

              It would not yet be possible to use custom bar period types inside the Volumetric bars. We are tracking this as a feature request, so I will go ahead and have a vote added on your behalf. The internal tracking number for this feature request is SFT-3013. Please reference this internal tracking number if you ever have questions regarding this feature request.

              In the meantime you can access the Order Flow Volumetric Bar values with the properties and methods here: https://ninjatrader.com/support/help...tric_bars2.htm
              Hi Josh

              I too am looking to use custom bar types with the Volumetric bars. Please add my vote to the feature request.
              Thanks

              Comment


                #8
                cooltrooper,

                Thanks! Vote added!
                Josh G.NinjaTrader Customer Service

                Comment


                  #9
                  Add my vote for custom bar types with Volumetric bars

                  Comment


                    #10
                    Thanks for posting DanWe!

                    We have added your vote.
                    JimNinjaTrader Customer Service

                    Comment


                      #11
                      Please add my vote for this feature request SFT-3013.

                      Thanks
                      Ron

                      Comment


                        #12
                        Hello Ron,

                        We have added your vote.

                        Thanks for your feedback.
                        JimNinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_JoshG View Post
                          Hello traderpards,
                          Thanks for your post.

                          Custom bar types are a thing in NinjaTrader 8 and have their own class. Please see the following link for more information: https://ninjatrader.com/support/help...?bars_type.htm

                          You can add custom BarsTypes that are installed on your system by casting the registered enum value for that BarsPeriodType. For example:
                          Code:
                          AddDataSeries((BarsPeriodType)14, 10);
                          https://ninjatrader.com/support/help...dataseries.htm
                          https://ninjatrader.com/support/help...barsperiod.htm
                          Could I get a little more help on this? The documentation is incredibly hard for me to understand - there are barely any examples of how to accomplish even the simplest of things. What are the steps to show my custom BarsType on a chart in NinjaTrader 8? I've created the class, based off the TickBarsType (I basically only renamed it to experiment with getting it to show up). How do I get it to display? I don't have any clue where this code would go as suggested above:
                          Code:
                          AddDataSeries((MyCustomBarsType)14, 10);
                          Please help. Thank you.

                          Comment


                            #14
                            Welcome to the forums trevor14!

                            Please note that many custom NinjaScripts can be found on our User App Share and can be helpful when making your own works.

                            Below is a link to a custom BarsType found on the User App Share that can be referenced.

                            (Update March 11th, 2020 – Fix for TickReplay, calculates values if bar object is mid-session and have not been calculated as least once) This is a conversion of the UniRenko ‐ Universal Renko BarType developed and originally coded for the NinjaTrader 7 platform by monpere. Please contact the original author for any questions or comments. […]


                            The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

                            When you make your own custom BarsType, you will need to make sure that it is given its own BarsPeriodType index in State.SetDefaults. The UniRenko BarsType linked above does so at line 39.
                            Code:
                            BarsPeriod                            = new BarsPeriod { BarsPeriodType = (BarsPeriodType) 2018, BarsPeriodTypeName = "UniRenko(2018)", Value = 1 };
                            You will also want to provide your own Name property for your BarsType in State.SetDefaults.

                            We look forward to assisting.
                            JimNinjaTrader Customer Service

                            Comment


                              #15
                              Please add my vote for this feature request SFT-3013.

                              Thank you,
                              Steve

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by ZenCortexCLICK, Today, 04:58 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post ZenCortexCLICK  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              172 responses
                              2,279 views
                              0 likes
                              Last Post sidlercom80  
                              Started by Irukandji, Yesterday, 02:53 AM
                              2 responses
                              17 views
                              0 likes
                              Last Post Irukandji  
                              Started by adeelshahzad, Today, 03:54 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post adeelshahzad  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              3 responses
                              13 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X