Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Volumetric data for custom bar

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

    Volumetric data for custom bar

    Hi, I would like to know how to extract volumetric data for a custom type bar.
    The NT built-in volumetric data only shows the data for tick, second, minute, range, and a few limited more options.
    My other bar type is similar to regular bars with time, and OHLC, a combination of time and volume bar type. Thanks.

    #2
    Hello Photon66,

    Thank you for your post.

    This would be outside of what is supported by NinjaTrader Support.

    However, it may be possible and this thread will remain open for any community members that would like to assist.

    Below I am providing a public link to the help guide on VolumetricBars that may give you pointers about what would need to be recreated in the custom bar type.
    https://ninjatrader.com/support/help...tric_bars2.htm

    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.

    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Hi Brandon, Thank you for the reply. Just curious: is it possible to use Custom Bar in the following command?

      AddVolumetric(null, BarsPeriodType.MyCustomBarType, ParamtersOfMyCustomBar, VolumetricDeltaType.BidAsk, 1);


      Thank you

      Comment


        #4
        Hello Photon66,

        Thank you for your note.

        As stated in the Warnings section of the AddVolumetric() help guide documentation, arguments supplied to AddVolumetric() should be hardcoded. Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided.

        Arguments supplied to AddVolumetric() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result in an error similar to: Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner.

        See the help guide documentation below for more information.
        AddVolumetric() - https://ninjatrader.com/support/help...volumetric.htm

        Let us know if we may further assist.
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Hi Brandon, Thank you for the reply. I am confused about the notion of dynamic and being hard coded. Here MyCustomBar is hard coded; for example, it can be Alan Percent Bars (could not think of a better example that is free) which is installed as an add-on Bar Type and I would like to see Volumetric display for this type. Thank you.

          Comment


            #6
            Hello Photon66,

            Thank you for your note.

            With custom bar types a unique ID must be chosen. If two scripts use the same ID, only one of them will show in the 'Type' list of a bar type.

            The first 14 IDs for BarsPeriodType are reserved by NinjaTrader.

            As stated in the Tips section of the AddDataSeries() help guide documentation, You can add a custom BarsType which is installed on your system by casting the registered enum value for that BarsPeriodType. For example: AddDataSeries((BarsPeriodType)14, 10); This means that you would need to use the id of the custom bar type.

            (BarsPeriodType)14 would be considered Volumetric bars, for example.

            Below is a publicly available link to a helpful script that lists the IDs for each bar type.
            https://ninjatraderecosystem.com/use...pe-identifier/

            See the help guide documentation for more information.
            BarsPeriod - https://ninjatrader.com/support/help...barsperiod.htm
            AddDataSeries() - https://ninjatrader.com/support/help...dataseries.htm

            Let us know if we may assist further.

            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.
            Brandon H.NinjaTrader Customer Service

            Comment


              #7
              Great. Thank you for the suggestions. What I got from the Bar ID are:

              ROE Bars - 1342
              BarsTypeIdentifier(ES 06-21 ( 20, 1000, 200 ROE))


              ROE is a paid BarsType that is closed source. ROE bar needs 3 parameters, for example (20, 1000, 200).

              When I try this

              AddVolumetric(null, (BarsPeriodType)1342, ( 20, 1000, 200), VolumetricDeltaType.BidAsk, 1);

              I get errors that that expression is invalid. I do not know how to enter the 3 parameters into the above code.

              Thank you.




              Comment


                #8
                Hello Photon66,

                Thank you for your note.

                You can specify optional BarsPeriod values (such as Value2) of a custom BarsType in the BarsPeriod object initializer. For example: AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)14, Value = 10, Value2 = 20 }); This is seen in the AddDataSeries() help guide documentation.

                That said, unfortunately, this will only work with some base bar types. BarsPeriodType Value would be available but not Value2.

                I have submitted a feature request to the Development team regarding having an overload method that allows you to set multiple values for a BarsPeriod. I will follow up with an internal tracking number for your reference as soon as it is created.

                Let us know if we may assist further.
                Brandon H.NinjaTrader Customer Service

                Comment


                  #9
                  That would be great. Thank you very much.

                  Comment


                    #10
                    Hello Photon66,

                    Thanks for your patience.

                    The internal tracking number for your feature request is SFT-3013. Please reference this internal tracking number when contacting Platform Support if you ever have questions regarding this feature request.

                    When a feature request is implemented, you'll find a description of the new feature in the release notes:Let us know if we may assist further.
                    Brandon H.NinjaTrader Customer Service

                    Comment


                      #11
                      Photon66 , did you end up finding a way to create Volumetric data based on some custom BarType? If you did, can you post an example?

                      Comment


                        #12
                        wadams , NinjaTrader_BrandonH no I have not figured out a way and I am still waiting for Ninja Trader to implement it.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by WHICKED, Today, 02:02 PM
                        1 response
                        3 views
                        0 likes
                        Last Post NinjaTrader_Erick  
                        Started by selu72, Today, 02:01 PM
                        0 responses
                        0 views
                        0 likes
                        Last Post selu72
                        by selu72
                         
                        Started by f.saeidi, Today, 12:14 PM
                        8 responses
                        21 views
                        0 likes
                        Last Post f.saeidi  
                        Started by Mikey_, 03-23-2024, 05:59 PM
                        3 responses
                        49 views
                        0 likes
                        Last Post Sam2515
                        by Sam2515
                         
                        Started by Russ Moreland, Today, 12:54 PM
                        1 response
                        7 views
                        0 likes
                        Last Post NinjaTrader_Erick  
                        Working...
                        X