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

Single Price Bars

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

    Single Price Bars

    I'd like to use a bar type that aggregates all consecutive same price ticks together, then changes to a new bar (actually just a new data point) when the price level changes, then starts aggregating all ticks at the new price level until a new price level occurs, etc.

    Conceptually it's something like a 0 (zero) range bar plotted as a zigzag. Volume, trade count, and cumulative delta calculations should be possible for each bar.

    I've attached a quick example of its construction mocked up in excel.

    Can anyone point me in the right direction if it already exists, or suggest a resource for coding it?

    Many thanks!








    #2
    you describe 1 tick chart

    Comment


      #3
      thanks nkhoi for the response. here's a screenshot of a 1-tick chart in NT8. it shows multiple ticks (trades) at the same level. i want all the ticks at the same level to be contained in 1 tick. so in the case of the screenshot there would be only 3 ticks showing: one for each price level (2587.25, 2587.00, 2586.75).

      Comment


        #4
        What about a 1 range bar?

        Comment


          #5
          hi captain future, thanks for the suggestion. attached is a screen shot of a 1 range bar. each bar has 1 range between 2 ticks.

          Comment


            #6
            Hello dave01,

            Thank you for the post.

            For what you are explaining, I believe the closest to the description would be a 1 range bar as Captain Future noted however what you have detailed is essentially a 0 range bar.

            You would likely need to create a BarsType to accomplish this. The existing Range BarsType could be used as a starting point, its Range input specifically has a hard limit of 1 which you could remove as a starting point. You would likely need to go through the logic in the existing bars type to make sure it still makes sense in contrast to using 0 range to break bars. You can use the NinjaScript editor to view the existing BarsTypes code.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              thanks jesse, i'll give it a try!!

              Comment


                #8
                Greetings. Did you manage to create this type of bars?

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by futtrader, 04-21-2024, 01:50 AM
                5 responses
                56 views
                0 likes
                Last Post NinjaTrader_Eduardo  
                Started by PeakTry, Today, 10:49 AM
                0 responses
                2 views
                0 likes
                Last Post PeakTry
                by PeakTry
                 
                Started by llanqui, Today, 10:32 AM
                0 responses
                5 views
                0 likes
                Last Post llanqui
                by llanqui
                 
                Started by StockTrader88, 03-06-2021, 08:58 AM
                45 responses
                3,992 views
                3 likes
                Last Post johntraderuser2  
                Started by TAJTrades, Today, 09:46 AM
                0 responses
                8 views
                0 likes
                Last Post TAJTrades  
                Working...
                X