Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pleading for RangeAlt bars

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

    Pleading for RangeAlt bars

    When I asked about RangeAlt bars previously, Ray said:

    "RangeAlt was not a system chart type, it was an add on located in our NinjaScript File Sharing section. Its still there however, I am not sure its compatible at this time."

    and it is NOT compatible.

    Please could it be added to NT7? (preferably included in chart types) All of the people from Woodie's CCI Club will be wanting it.

    (Note: the difference between Range bars and RangeAlt bars is that RangeAlt bars will not have a gap between bars.)

    #2
    LG,

    I believe NT7 range bar implementation does NOT plot bars to fill the gap --> Same as the RangeAlt.
    RayNinjaTrader Customer Service

    Comment


      #3
      Range alt Bars

      Range alt Bars are available for download to Ninja platform at www.bigmikestrading.com in a easy to load .zip format. These range bars are referred to, there, as NoGap Range Bars.

      Comment


        #4
        Originally posted by LG View Post
        When I asked about RangeAlt bars previously, Ray said:

        "RangeAlt was not a system chart type, it was an add on located in our NinjaScript File Sharing section. Its still there however, I am not sure its compatible at this time."

        and it is NOT compatible.

        Please could it be added to NT7? (preferably included in chart types) All of the people from Woodie's CCI Club will be wanting it.

        (Note: the difference between Range bars and RangeAlt bars is that RangeAlt bars will not have a gap between bars.)
        I think it was the other way round. In NT6.5 Range Bars would add new bars if there was a gap (e.g. opening gap or an intraday price jump). The RangeAlt bars would not feel the gap. So if price moved from 50.00 to 50.02 without trading at 50.01, the RangeAlt bars would reflect that with a bar closing at 50.00 and the next one starting at 50.02. I personally prefer this behavior since it does not insert dummy prices. That particular download no longer works with NT7.

        Comment


          #5
          V7 RangeAltBarsType

          Here is a RangeAltBarsType for V7. It is based on the B6 version of the RangeBarsType, but does not fill the gaps just like the previous version did.

          I do not use this BarType, so milage may vary, but I did test it out to verify functionality.

          This is the raw .cs file, since Ninja will not export types. Just place this file in your "My Documents\NinjaTrader 7\bin\Custom\Type" folder, open and compile any indicator, and restart Ninja. After restarting, the "RangeAlt" type should show up at the end of the bar type list.

          Perhaps someone at Ninja could put into a proper zip file and post to ease importing?
          Attached Files

          Comment


            #6
            Thanks for the contribution. If OK by you, I will add this to our File sharing area?
            RayNinjaTrader Customer Service

            Comment


              #7
              Yes, go ahead and add.

              Comment


                #8
                Can RangeAlt be made the official Range bar type?

                I am writing an indicator that is only works as intended with RangeAlt. So I want to use a line like this:
                if (BarsPeriod.BasePeriodType!=PeriodType.RangeAlt) return;

                However RangeAlt does not show up in the PeriodType enumeration. In fact when using RangeAlt bars checking the BasePeriodType gives "Minute" (presumably the default).

                Questions:
                1) Can anyone suggest a way of changing the RangeAltBarsTypeV7.cs so that it can be detected by BasePeriodType as RangeAlt (or at least as "Range" rather than "Minute")?

                2) If getting the BasePeriodType correct is not possible for RangeAlt can anyone suggest another way of detecting the use of RangeAlt?

                3) Is there any user who prefers Range to RangeAlt?
                I cant see the point of using a graph with fictional bars (filled in with fictional volume) where no trading actually took place (existing Range bar implementation). This looks like a bug since it does not seem to conform to the original Range bar concept.
                If there's no user who prefers Range to RangeAlt then why not correct Range to work the same as RangeAlt (make the best version the officially supported version)?
                This would of course also resolve problems like not being able to detect the use of RangeAlt.

                Comment


                  #9
                  Hi Dave, thanks for the suggestions - if you're on our latest beta 14 you should not see the default Range bar type used fill the gaps with 'fictional' data anymore so you could directly use this then or am I missing your point?
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    You can check like this:

                    if (BarsPeriod.Id == Final1) {
                    }

                    I'll leave it to NT support to explain why the BasePeriodType comes back as minute (especially since the base type should really be tick since that is how range bars are built, and that is what the AltRangeBar code returns in BuiltFrom()).

                    Comment


                      #11
                      Originally posted by NinjaTrader_Bertrand View Post
                      if you're on our latest beta 14 you should not see the default Range bar type used fill the gaps with 'fictional' data anymore
                      Thanks for the reply Bertrand but Range in beta 14 is still producing fictional bars for price ranges where nothing got traded. Thats why I am still using the unsupported RangeAlt (thanks Aslane).

                      Here is an example:
                      I'm using info from IB for EURUSD on 23 Apr.
                      Price was falling sharply around 13:47:09 BST (14:47:09 CEST, 06:47:09 MDT, 08:47:09 EDT).
                      Using RangeAlt 5:
                      I get 2 bars for 13:47:09 the first has low of 1.32785 and vol=35.6M, the next has high of 1.32775 and vol=4M.
                      There was a gap of 1 pip where no trading took place (presumably no trading was possible in that range while the price was falling at that time).

                      But switching to Range 5:
                      I now see 5 bars for 13:47:09.
                      The gaps have been filled in very neatly, so it looks very nice. But it is misleading.
                      The first bar has low of 1.32789 and vol=35.6M
                      2nd bar has low of 1.32783 and vol=2M
                      3rd bar has high of 1.32782, low of 1.32777 and vol=0 (perhaps this is where a bug has been fixed I think the volume was fictionally repeated from previous bar in older versions. But the production of a bar is still a fiction here).
                      4th bar has high of 1.32776 and vol=2M.

                      Summary: Fictitious volume in a bar where no trading took place seems to have been fixed (now showing 0).
                      But if producing a bar for a price range where no trading took place is a bug (I believe it is), then that bug is still there in the current Implementation of Range. This is why I am still using RangeAlt.

                      Question to users: Does anyone find the production of fictitious Range bars where no trading took place useful?

                      According to this article: http://www.futuresmag.com/Issues/200...rs.aspx?page=2
                      one advantage of Range bars is the removal of noise. But adding a bar where there is no tick data seems to me to be adding noise (Range still does this, RangeAlt does not).

                      Comment


                        #12
                        Thanks for indepth explanation DaveE, according to my knowledge those gaps should indeed be filled on range bars, as per definition I'd say there are no gaos on those other than for example due to trading halt at natural session break times...I believe the effect is positive also for indicator based trading techniques, as they seem to generate signal quicker than if the gap was left in, at least my take on this.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          Bertrand,

                          OK I think you are saying that the fact the Range creates bars (now with volume=0) to fill gaps between ranges where there was real trading is a positive feature useful to traders. I have looked into this and see there may sometimes be benefits to traders. On the other hand this behaviour may sometimes be detrimental. Since there are pros and cons for both then NT should officially support both types of Range bars.

                          One difference between the two is that RangeAlt seems to fit bars better to the boundaries of the underlying range required, whereas Range tends to split bars across these boundaries. For example if I use "quote currencies" = 10th pip and Range 5 the boundaries do not tend to fit into the half pip boundaries actually used by IB for FOREX, whereas RangeAlt 5 does fit nicely. This is another reason why RangeAlt produces less bars than Range in the example in my previous post.

                          Another difference can be illustrated by the following extreme scenario:
                          Market Maker drops price instantaneously by 10 pips, then 3 minutes later raises price instantaneously by 10 pips. This alternation is repeated every 3 minutes.
                          Assume "quote currencies"=10th pip.

                          Charting this with a 1 minute bar chart would produce a Square Wave, giving an indication that no trading was possible in the transition between the highs and lows.

                          Charting this with a 3 minute bar chart would show a condensed square wave (one bar high, next low, next high) all with large intermediate gap.

                          Charting this with RangeAlt 5 would show exactly the same as the 3 minute chart. The actual trading opportunities are shown with the minimum number of bars possible.

                          But charting the same thing with Range 5 would result in a Saw Tooth wave, because bars would be manufactured (and shown as a nice diagonal) to fill all the empty half-pip gaps between the real high and low prices.

                          Effect on strategies: Using a typical "jump on a short-term trend" strategy would run as follows:
                          On Range 5, the strategy would try to short on the way down. On backtest this would presumable give consistently profitable results if signal raised on one manufactured red bar and order placed on next red bar.
                          In the same way would try to go long on the way up and get a profit each time in backtest. But when you try to run this live (still using Range 5) ALL of these trades will lose!
                          This is because there is no real short opportunity on the way down. The manufactured bars that suggest there is are only created when the price is at the lowest point. The short order cant be placed where its desired so (if Market is used) will be placed at the lowest price.
                          In the same way there is no real Long opportunity on the way up, the Long order cant be made where it is wanted, so (if market is used) will be placed at the highest price.

                          But using RangeAlt 5 a "trend-following" strategy would not place any trades for this scenario (since no false trend is generated).
                          Same goes for traditional time based charts (1 minute, 3 minute etc).

                          The only way someone with a "trend-following" strategy can make money in such a scenario is by using Range 5 and reversing the buy/sell signals (Ehlers might suggest changing the phase of the cycle). But this would of course stop woking once the Market maker started providing intermediate trading opportunities again.

                          Comment


                            #14
                            DaveE,

                            Thank you for the post. At this point in time of the beta we unfortunately will not be adding new features, but just like how RangeAlt was available in NT6.5, it is available in NT7 in a similar fashion (Aslane's file) so you should be able to use whichever style you feel more comfortable using.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              RangeAlt Bars

                              Originally posted by NinjaTrader_Ray View Post
                              LG,

                              I believe NT7 range bar implementation does NOT plot bars to fill the gap --> Same as the RangeAlt.
                              You are right NinjaTrader_Ray, Range Bars in NT7 does not plot bars to fill the gap. I should have looked and think, before scream for RangeAlt.

                              Thanks

                              Javier

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bubblegum, 03-18-2024, 10:41 AM
                              4 responses
                              51 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by kujista, Yesterday, 12:39 AM
                              3 responses
                              15 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by Yasharandom, 05-04-2024, 07:45 AM
                              2 responses
                              24 views
                              0 likes
                              Last Post Yasharandom  
                              Started by francesjandujar, Today, 05:15 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post francesjandujar  
                              Started by francesjandujar, Today, 05:14 AM
                              0 responses
                              0 views
                              0 likes
                              Last Post francesjandujar  
                              Working...
                              X