Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Range bar vertical gaps ?

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

    #31
    VTtrader,

    Thanks again for your input. I woke up early this morning and spent time focused on this issue. I like your analogy about the continous data stream broken down into bars of price data. I visualized that this morning and I completely agree with you.

    Here are my thoughts regarding bar gapping for any kind of chart.

    Lets say you are watching a 1 minute bar chart. At the beginning of a new bar the price gaps up 3 ticks. The bar starts there and continues up. 20 seconds later the price gaps up another 3 ticks.

    Most charts today do not display the first gap up with a bar representation, but the second gap up is represented with a bar.

    If you look at the same data on a five minute chart both price gap ups are representated with the same continous up bar.

    If the price data is a continous stream, why should there ever be data ( price gap up) without a bar to represent it?

    It should not happen, but it does.

    Once a bar is opened, price change from current price is always displayed with a bar.

    When a new bar is opened, current programming makes the bar think it is a brand new chart that has yet to define a current price. So instead of the bar beginning at the current price, it waits for a change in price to begin the new bar.

    I think this is very wrong. Price changes should not be treated differently simply becouse one bar is closing and another is opening. It should be treated the same as all other price changes that occur within each bar.

    That means Close[1] should equal Open[0]. No matter what kind of chart you are using.

    Current price should be carried forward from one bar to the next so all price data receives the same treatment.

    When this true, all price data is represented with bar(s). There is no such thing as "price bar gap on bar open".

    Indicators that use OHLC data will always have complete and correct data to process on close of current bar.

    ---------------------------------------------------------------------------------------

    I will not rehash the Range bar thing again. I think we have made our viewpoints clear on that issue.

    ---------------------------------------------------------------------------------------

    I know that I am taking a radical position with this post.

    I think some people will agree, my brain may have a few wires crossed.

    ----------------------------------------------------------------------------------------

    I want to thank you again for this open discussion.

    RJay
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    Comment


      #32
      RJay,

      I've already forwarded the request to development and it is now on our list of future considerations.
      Josh P.NinjaTrader Customer Service

      Comment


        #33
        Rjay,
        Thanks, I'm glad you're enjoying the conversation, I'm also enjoying it.

        When I was referring to the data coming as a continuous stream, I meant it is not segmented into bars. I did not mean to imply that each tick is always equal to, or 1 tick higher or lower than the previous tick. A trade/tick being 2 or 3 or more ticks/(minimum price movements) away from the previous tick is actually quite common, especially in thinly traded instruments. An instrument such as the ES is very liquid and gaps are less likely to happen, but you can find them even there.

        The best way to visualize the actual data is with a 1tick "tick" chart (not a 1 tick range bar). That will show you the actual data points that will then get processed into the various types of bar charts. I have attached a picture of one for the YM. the red arrows point to the previous tick and the blue arrows point to the following tick. You can see where there are several gaps of 3-4 ticks. If you make a chart like that and select "line on close" as the bar type the data will appear as a continuous line (the data stream).

        Normal bar charts (tick, volume and time based charts) all have a "true" OHLC, there is an actual first trade, last trade, high and low trades. Range bars are a different kind of bar, while they are based on market action, their open and close are not always actual trades. Which is one reason why many people don't like them. I find them useful, but I realize their weaknesses. BTW, this weakness is there regardless of how the bars are built.

        Take my example yesterday, say bar1 had traded between 10 and 13, the last trade was at 11 and the next trade was at 9. The bar close would still say 10 even if it wasn't the last trade, it was the bottom of the range. Or to make an even more extreme example, say bar1 traded between 11 and 13, with the last trade at 11 and the next one at 9, having never actually traded at 10 at all, the close would still be 10. That could also happen at the open of bar2, say it traded last at 10 and the next trade had one of those 4 tick gaps in that picture, the open would still be 9, but the first trade would be 6, the low of the bar! 4 tick gaps are never fun (unless they are in your favor ) and they can bite you whatever type bar you use, but range bars can accentuate the problem (especially short ones). Again, this is a problem with range bars in general, no matter what method is used to build the bar. It is due to the fact that open/close are not always actual trades.

        This weakness can distort your strategy results during backtesting since the "open" is assumed to be an actual traded price, when in reality it is just the first price of the new "range". The moral of this story is to use caution when assuming the open and close of range bars for placing market orders, regardless of how they're built.

        To wrap this up, range bars do have some strengths. They help to filter out some of the choppy sideways noise when sized properly. Also, being a set range you can calculate the 2 possible places the bar will close, and the next one will open in advance. this can be very useful in placing limit entries or stops.

        Hope all this makes sense.
        Take care,
        VT
        Attached Files
        Last edited by VTtrader; 01-15-2009, 09:03 PM.

        Comment


          #34
          VTtrader,

          Development has confirmed that OnBarUpdate will be called at the 10th tick of a 10tick bar.
          Josh P.NinjaTrader Customer Service

          Comment


            #35
            RJay,

            That message was in response to VTtrader's question about how tick bars are built and not about Range bars.
            Josh P.NinjaTrader Customer Service

            Comment


              #36
              RJay,

              We have already added your request for range bars to our list of future considerations. If you go back through the thread and read post #28 you will find VTtrader has asked a question about tick and volume bars. I said I will inquiry with development and I came back with the answer. Please do not be offended.
              Josh P.NinjaTrader Customer Service

              Comment


                #37
                Range Bars

                I recently began looking at range bars to see if they might work for my trading idea. Here is what I've learned:

                There are two types of range bars, and (not counting RangeBarAlt) and the one NT uses in the Format Data Series has these characteristics:

                1) Each bar is the same height because the range is constant.
                2) The close of a bar is always at the high or low of the bar.
                3) The open of a bar is always one tick below or above the close of the preceding bar.
                4) The time period covered by each bar varies.
                5) All gaps are filled with inserted 'phantom' bars.

                It was #3 and #5 that had me confused.

                Re: #3
                The reason every bar open is gapped 1 tick is because the previous bar must exceed the range before it is closed.
                So, a 4 range bar is really a 5 range bar because it takes the 5th tick of range to force a new bar. In other words, the 4 tick range might be met but the bar is not closed until the 5th tick of range arrives.

                Re:#5
                Phantom bars are the only real price gaps. All the other gaps are merely display gaps because of the "industry standard" of range bar functionality. This shows up on a chart that excludes overnight price action, where the display of the overnight gap is an ascending or descending series of equal range bars all with the same time stamp. And the phantom bar is either a dragonfly or gravestone doji so it has no real range. The tail/wick is just for display, just like the gaps at every bar open. As such, this type of range bar is not representative of actual price action.

                There is a second type of range bar that closes when the range value is met, whether or not price continues to trade in that range. There are no gaps at every open and there are no phantom bars. (There are gaps when there really is one). This type of range bar chart accurately represents actual price action. NT does not offer this option but SierraChart does, if you're interested.

                I know there are traders who would want one over the other, and that's fine. We want choices as users and subscribers. I hope to see this option in an upcoming release.

                Comment


                  #38
                  Originally posted by tomgilb View Post
                  I recently began looking at range bars to see if they might work for my trading idea. Here is what I've learned:

                  There are two types of range bars, and (not counting RangeBarAlt) and the one NT uses in the Format Data Series has these characteristics:

                  1) Each bar is the same height because the range is constant.
                  2) The close of a bar is always at the high or low of the bar.
                  3) The open of a bar is always one tick below or above the close of the preceding bar.
                  4) The time period covered by each bar varies.
                  5) All gaps are filled with inserted 'phantom' bars.

                  It was #3 and #5 that had me confused.

                  Re: #3
                  The reason every bar open is gapped 1 tick is because the previous bar must exceed the range before it is closed. So, a 4 range bar is really a 5 range bar because it takes the 5th tick of range to force a new bar. In other words, the 4 tick range might be met but the bar is not closed until the 5th tick of range arrives.

                  Re:#5
                  Phantom bars are the only real price gaps. All the other gaps are merely display gaps because of the "industry standard" of range bar functionality. This shows up on a chart that excludes overnight price action, where the display of the overnight gap is an ascending or descending series of equal range bars all with the same time stamp. And the phantom bar is either a dragonfly or gravestone doji so it has no real range. The tail/wick is just for display, just like the gaps at every bar open. As such, this type of range bar is not representative of actual price action.

                  There is a second type of range bar that closes when the range value is met, whether or not price continues to trade in that range. There are no gaps at every open and there are no phantom bars. (There are gaps when there really is one). This type of range bar chart accurately represents actual price action. NT does not offer this option but SierraChart does, if you're interested.

                  I know there are traders who would want one over the other, and that's fine. We want choices as users and subscribers. I hope to see this option in an upcoming release.

                  Hi tomgilb,

                  I did not want to wait for NT to adapt their Range bars.

                  I do not believe they would anyway. so I attempted the project myself.

                  I adjusted the code to eliminate the programmed gaps. It also only uses the correct number ticks per bar.

                  The 5th tick to create the new bar is assigned to the new bar being created and is the first 0f the four ticks in the bar.

                  This altered Range bar chart cs file is posted here, post #7.

                  RJay, Please have a look at these charts and notice that the 4 range and 4 range no gap are almost identical and the 5 range no gap does not match the 4 rand gap at all with the same instrument same data vendor. Does this just back fill? Thanks in advance. JamTheTrader JamTheTrader, 5 RangeNoGap is comparable to NT's 4 Range bars. Both need 5 ticks to create a new bar. If the charts start at different times, plus NT's reverse First tick gap issues will result in slightly different looking charts. Looking …


                  Follow the instructions there to import file. Be sure to test before going live.

                  Good Luck,

                  RJay
                  RJay
                  NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                  Comment


                    #39
                    Tom, thanks for posting your thoughts and welcome to the forums! The request for a different RangeBar implementation as discussed in this thread is already on our list for future consideration.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #40
                      Incorrect Range Bars

                      NinjaTraders range bars are done incorrectly period!!! and "graphically" they are not easy to look at. This needs to be addressed as I can tell you many of my students are frustrated and looking elsewhere.

                      JamTheTrader
                      [email protected]

                      Comment


                        #41
                        No Gap Range bars

                        SierraChart offers Type 2 (no gap) range bars.

                        Maybe NT7 will also, we'll see....

                        In the mean time, RJay has created his own script for NoGapRangeBars, available on another forum. Thanks, RJay!

                        Last edited by tomgilb; 12-04-2009, 12:11 PM. Reason: Located script on another forum

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by usazencort, Today, 01:16 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post usazencort  
                        Started by kaywai, 09-01-2023, 08:44 PM
                        5 responses
                        603 views
                        0 likes
                        Last Post NinjaTrader_Jason  
                        Started by xiinteractive, 04-09-2024, 08:08 AM
                        6 responses
                        22 views
                        0 likes
                        Last Post xiinteractive  
                        Started by Pattontje, Yesterday, 02:10 PM
                        2 responses
                        21 views
                        0 likes
                        Last Post Pattontje  
                        Started by flybuzz, 04-21-2024, 04:07 PM
                        17 responses
                        230 views
                        0 likes
                        Last Post TradingLoss  
                        Working...
                        X