Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Code for Bar Creation on Charts

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

    Code for Bar Creation on Charts

    Where would I look to see the code used to generated the price bars for each of the types of charts available on NT? (Volume, Tick, Minute, etc.)

    Thanks,

    RJay
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    #2
    Hi rt6176, unfortunately this is not available. It is interally generated from the incoming tick / minute data by your broker or dataprovider.

    For a custom chart style and its programming you can check the 'RangeAlt' chart style in our sharing - http://www.ninjatrader-support2.com/...nge+alt&desc=1

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi rt6176, unfortunately this is not available. It is interally generated from the incoming tick / minute data by your broker or dataprovider.

      For a custom chart style and its programming you can check the 'RangeAlt' chart style in our sharing - http://www.ninjatrader-support2.com/...nge+alt&desc=1

      I did look at 'RangeAlt' cs file last weekend. It did have information that was useful.

      I have another question. Is it possible to edit and compile this 'RangeAlt' cs file inside the NT platform?

      I could not figure out how to do it. Its not an indicator or a strategy?

      Thanks,

      RJay
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment


        #4
        No, it is a chart style.

        You can open it in any text editor, such as notepad.

        Changes and modifications to it are unfortunately not supported by us.

        Comment


          #5
          Is there any supported or unsupported way to create new bar charts with NT?
          RJay
          NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

          Comment


            #6
            rt6176,

            Unfortunately this endeavour is outside the scope of what we can offer support for. You can try and see how RangeAlt did it, but we cannot offer you any guidance on this. Thank you for understanding.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Hi rt6176,

              NT does not seem to support editing type files. I simply take a built-in class from Documents\NinjaTrader 6.5\bin\Custom\Type\@BarsTypes.cs as a template and change it to my new class in an external editor. Then i zip it (do not forget the Type/ directory) and import to NT as any indicator/strategy. It sounds complicated but it is rather straightforward.

              Unfortunately, one is limited by BarsType class - which is storing only OHLCTV.

              I encountered one problem with forms when having multiple custom bars, see



              Cheers,

              Tomas

              Comment


                #8
                Hey Tomas,

                I am trying to make a BarsType in NT. I have been using Renko bars which was posted by roonius a few days ago as my template.

                As a first attempt, I didn't change anything in the code except for the name of the bartypes (anywhere I saw Renko I put test), and saved the files as test.cs. After I put it into a "Type/" directory and .zipped it up. I'm getting the following error...

                Import failed. NinjaTrader could not decompress the NinjaScript Archive File: Could not find part of the path 'C:\Documents and Settings\Anthony\My Documents\NinjaTrader 6.5\bin\Custom\Tmp\Import\Type\'.
                Have you encountered this?

                Thanks for your help.

                Anthony
                mrlogik
                NinjaTrader Ecosystem Vendor - Purelogik Trading

                Comment


                  #9
                  Anthony,

                  Drop the cs file in the appropriate file path and just open up any indicator and press F5 to compile.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Thanks for the help Josh
                    mrlogik
                    NinjaTrader Ecosystem Vendor - Purelogik Trading

                    Comment


                      #11
                      Hi mrlogik,

                      just a side comment: what Josh suggests is much more straightforward than what i did (importing code via zipped archive and using import ninjascript function). An interesting point is that, during compilation, NT recompiles all modified scripts - i.e. not only indicators and strategies but all the other stuff as well.

                      Tomas

                      Comment


                        #12
                        Tomas,

                        Thanks for the reply. That worked for me.

                        thanks again
                        mrlogik
                        NinjaTrader Ecosystem Vendor - Purelogik Trading

                        Comment


                          #13
                          Hi Tomas,

                          I did try the RangeAlt,
                          but it cannot add in strategy timeframe:

                          Add(PeriodType.RangeAlt, 4);

                          any idea, thanks!

                          Comment


                            #14
                            wkmetal,

                            Please use the IntelliSense on PeriodType and see what is available.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by wkmetal View Post
                              Hi Tomas,

                              I did try the RangeAlt,
                              but it cannot add in strategy timeframe:

                              Add(PeriodType.RangeAlt, 4);

                              any idea, thanks!

                              wkmetal,

                              type in this for RangeAlt Bars.

                              Add(PeriodType.Final1, 4);

                              RJay
                              RJay
                              NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              95 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              49 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              31 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              35 views
                              0 likes
                              Last Post TheRealMorford  
                              Started by Mindset, 02-28-2026, 06:16 AM
                              0 responses
                              71 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X