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

Creating Custom Bar Type

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

    Creating Custom Bar Type

    Are there instructions to understand how to create a custom bar type. I have a theory that I want to create my own bar type. I want to use the 1 minute close price and 1 minute open price, but depending on my logic I want to draw it if it passes certain criteria

    #2
    Can I get a indicator value withing a custom bar type. I would like to get an indicator value in order to change the bar.

    Comment


      #3
      Hello ballboy11,

      Advanced ideas and code generally don't have tutorials but expect you to be at the level of understanding to use the existing scripts as examples.

      There is the Minute bar type in the @MinuteBarsType.cs script and the UniRenko script on the forums.

      Unfortunately, no. It is not possible to pass BarsRequests to an indicator as an input series.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        A follow on question relates to incoming data. If that is Ticks, then each OnDataPoint seems to represent ONE Tick, which NT can then aggregate into whatever is needed (ie. 100 Ticks per bar or seconds bars etc.). Can I safely assume that if the raw data is ticks, that each datapoint is exactly one tick (where Open = High = Low = Close .. )?

        If my raw data stream is BasePeriod.Minute, do I get 1 Minute Bars one at a time (completed 1 minute bars) and no updates within the minute? In other words, the data I get is not smaller than a complete 1 minute bar and hence I don't get data in between. Every bar I get is also closed .. which means I would not need to ever call UpdateBar in OnDataPoint if I want to create a 1 Minute Chart .. correct?

        Thanks much for any help

        Comment


          #5
          My original question appeared twice, so I thought I would delete ONE of them, but now BOTH are gone

          Comment


            #6
            Can I UNDELETE it ?

            Comment


              #7
              Basically I was looking for more in depth tutorials or documentation about how to write Custom BarTypes which would explain when each of the methods are needed and what each of the methods cause to happen or not happen. I was looking at code examples from the existing BarTypes and I can understand the core idea what the methods do but I can't figure out what I would need to overwrite in my case ..

              So basically I am looking for a pointer to any walk-though or educational doc that explains "Custom BarTypes for Dummies" like me

              (PS: sorry for the repeats of my posts .. not sure how to send exactly one comment without duplicting everything else .. haven't been here for nearly 10 years)

              Comment


                #8
                Hello Kermit,

                I'm not aware of anything like this that exists.

                There is a trader that wrote his own book. I believe it was called ninjascript programmer's launch pad.

                Below is a public link to a google search for this.
                https://www.google.com/search?safe=a...30.sjHA3ZvFiIQ


                This thread will remain open for any forum members that may know of a book or tutorial for custom bar types that would like to assist.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,234 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                1 view
                0 likes
                Last Post thread
                by thread
                 
                Started by jclose, Yesterday, 09:37 PM
                0 responses
                6 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,414 views
                0 likes
                Last Post Traderontheroad  
                Started by firefoxforum12, Yesterday, 08:53 PM
                0 responses
                11 views
                0 likes
                Last Post firefoxforum12  
                Working...
                X