Announcement

Collapse
No announcement yet.

Bands, Envelopes & Channels

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bands, Envelopes & Channels

    I am both experimenting with as well as researching all available information on bands & channels which are in principal some form of price envelope on which you can trend or range trade, depending on each originator's/developer's criteria. Thus far I have come up with the following combinations.

    -------------
    1. Bands
    -------------

    A. Basis - Linear Regression, Moving Average such as the usual SMA, EMA, WMA & Wilders as well as advanced and adaptive MAs such as DEMA, Ehler's FIR, FIR, KAMA, FAMA/MAMA, T3, TEMA, TRIX, & Vidya (CAMA) normally using a price based on the Close but also other combinations such as HL/2, OC/2, HLC/3, OHLC/4, HL2C/4 may be used.

    B. Bands

    B1. Anderson; Basis is a Linear Regression which is further smoothed by an SMA (usually) with a Standard Error derived from the Basis (usually for the same period) factored by 2 added/subtracted from the Basis.

    B2. Bollinger; Basis is usually an SMA with Standard Deviation of the Basis factored at 2 for last n Periods (usually same as Basis) added/subtracted from the Basis.

    B3. Keltner; Basis is usually an SMA (sometimes EMA) with an averaged unmodified HL range factored by 2.5 for last n Periods (usually same as Basis) added/subtracted from the Basis.

    B4. Kirshenbaum; Basis is an EMA with a Standard Error derived from a Linear Regression (usually for the same period as the EMA) factored by 1.75 added/subtracted from the Basis.

    B5. Headley (aka Acceleration); Basis is an SMA (or sometimes an EMA) with the channels derived by averaging (usually SMA and same period as basis) a specialized range computation of (H-L/((H+L)/2)) which is factored normally by 1 and then further computed by adding 1 and multiplying by the high for the upper channel and subtracting from 1 and multiplying by the low for the lower channel.

    B6. Stoller (aka STARC); Basis is usually an SMA (sometimes EMA) with an ATR factored by 2-3 for last n Periods (Basis usually 3 times less) added/subtracted from the Basis.

    B7. Turtle (aka Donchian); Does not use a Basis just HH or LL for last n Periods. A computed Basis can be derived from the average of HH/LL at any point if desired.

    B8. Unichannel; Basis can be any MA with the same MA (usually) factored either by a percentage or points move added/subtracted from the Basis for last n periods (usually same as Basis MA).

    -----------------
    2. Channels
    -----------------

    A. Basis - Regression with varying degrees; Linear, Exponential, logarithmic, Power, Sine, Quadratic, Cubic, Quartic & Quintic using a price based on the Close but also other combinations such as HL/2, OC/2, HLC/3, OHLC/4, HL2C/4 may be used.

    B. Channels

    B.1 Standard Deviation; Computed for the same price values and period used in the Basis, where a mean value is derived (usually based on an SMA) and the Standard Deviation is factored by 2 added/subtracted from the current bar's computed regression value, projected backward across the period range according to the regression formula's Slope and Intercept values.

    B.2 Raff; Computed for the same price values and period used in the Basis, where the highest high and lowest low for the period is added/subtracted from the current bar's computed regression value, projected backward across the period range according to the regression formula's Slope and Intercept values.

    B.3 Standard Error; Computed for the same price values and period used in the Basis, where the linear regression line is used to compute the differences between the actual and forecasted values to derive the Standard Error which is factored by 2 added/subtracted from the current bar's computed regression value, projected backward across the period range according to the regression formula's Slope and Intercept values.

    I would appreciate if anyone knows of any more to point me in the right direction for further research.

    Robert

  • #2
    rcameron

    Robert,

    Don't forget Hurst Channels. I think Chris K. was doing some work on them.
    http://www.stoploss.ch/Metastock_Hurst_Channels.htm


    Any plans to have some bands, channels and envelopes plot dynamically from the open of a day?

    That is, instead of using standard period settings like "20" for bollingers, etc. How about having the bands, channels and envelopes adjust their period parameters dynamically throughout the day?

    1st bar of day set to 1 period
    2nd bar of day set to 2 period
    3rd bar of day set to 3 period
    etc., etc.

    John

    Comment


    • #3
      Himalaya:

      Thanks for the feedback. The link you posted gives a corrupted form of Hurst channel theory which by using ATR on a detrended MA is a hybrid of Stoller/Hurst. From research that I have already done which I did omit in the listing made (an oversight on my part) is that Hurst's work requires 2 DMAs (using SMA and possibly WMA) to be plotted where a centered MA would be derived onto which standard deviation bands would be drawn. I believe that Bollinger used part of this concept as the methodology for his bands.

      I have found various references to "Sigma Bands" which use Hurst's original work. There are various methodologies used to derive the DMA's with some sophisticated methods using (I believe) 4th degree polynomials. There is also further filtering using dominant cycle theory as given by Hurst to optimize the periods used for the DMAs.

      I have not coded this methodology yet but could prove an interesting study to play around with. apparently it can also be used to project bands for future possible prices, however I have my doubts on the accuracy of such forecasts, because if true then everyone would be making fortunes with ease!

      On the other point you raised, what would be the advantage of performing the ramp up in periods from the start of the trading day? Are you looking to increase the period bar by bar until the end of the trading day? As I deal only with continuous future indices, this kind of ramp up does not apply in any meaningful way that I can see.

      If you have any further thoughts/comments then I would appreciate your feedback.

      Robert

      Comment


      • #4
        Dynamic Bands

        Robert,

        Sorry about the funky link to to the Hurst channel code.

        Yes, increase the bar period bar by bar until the end of the day.

        Disclaimer: Everything below is just an opinion. :-)

        The main advantage I see for dynamic bands is the ability to truly measure the mean and volatility of the day as it develops thus providing relevant levels to trade off of. (the dynamic logic also applies for longer time frames like weekly and monthly)

        The problem with static bands, channels and envelopes is the same problem with all oscillators. You are simply measuring how far you are from a preset MA or a tweaked preset MA. The period setting of the MA is everything. And as we know the market has not chosen a favorite period setting that it likes to cycle in.
        (I have heard of guys making custom oscillators [custom "TICK"] of certain S&P 500 issues, weeding out the contrarian moving issues, for trading the Emini)

        Hoping the market will move in 20 one minute cycles or 20 five minute cycles or 20 fifteen minute cycles is just that - HOPE.

        The bands draw a line in the sand for us to trade off of. It is important for that line (as much as possible) to be in tune with the current market relative to our trading time frame.

        Most bands, channels, envelopes are essentially doing the same thing - plotting measurements from the MA or the mean. If the trader thinks that the mean of the last 20 bars, 14 bars or 50 bars is statistically more powerful than the mean of the day so far then trading results would prove that randomly chosen static periods have statistical importance.

        Of course we could just have the self fulfilling prophecy thing going for us, i.e set all our bands to 20, all our stochastics to 14,3 and all MACD's to 12,26,9. Everyone else will also have the same settings and the market will turn like clockwork to preset intervals.

        Don't get me wrong if a randomly chosen (or herd of traders chosen) number provides a statistical edge for trading I am all for it. We only need a small edge and the discipline to follow it to make $$ trading.

        I mainly trade using Market Profile and Volume Profile, so you can see why I would give more importance to a dynamic mean. When I saw your post/interest in bands I naturally was hopeful of potentially seeing bands/envelopes/channels develop off of the dynamic mean of a bar/candle chart.

        I greatly appreciate the improvements you are pushing for in Esignal and look forward to your research into bands. Keep up the good work!

        Trade on and be excellent to each other

        John

        Comment


        • #5
          Robert,

          You might check out BOMAR bands also. I have had good luck in the past using these. I haven't coded them in eSignal yet, so you would either have to find someone that has done the work, or do it yourself.

          Garth
          Garth

          Comment


          • #6
            Garth,

            Thanks for the tip, I could not find much information on these and only in Bollinger's site are they described, but in not much detail. Do you have any site url's where there is more coverage or coding examples in other languages?

            Robert

            Comment


            • #7
              John:

              Thank you for detailing your thoughts on what you required. I was intrigued by what you described and decided to code your main point of having an increasing period from the start of the trading day to compute MAs and bands to see how useful this methodology could be in trading.

              I came up with the attached script which has been based on an SMA as the basis and Standard Deviation as Bollinger Bands to use as a trial. I was quite surprised to see how useful it could be. Take a test drive and see what you think. The only coding problem I have to resolve is when you set the end time for the next day i.e. start 09:30 to end 09:29 drawing cuts off at the 24:00 point. However everything else works just fine, if you work only with cash instruments then you will have no problems as the times are usually 09:30 to 16:00 EST. As I use continuous futures data it is an issue for me.

              I look forward to any feedback you may have.

              Robert
              Attached Files

              Comment


              • #8
                Here is a chart of continuous DJ mini futures to show how the chart should look using default settings (with exception of the time periods which you must adjust for your time zone and favored instruments).

                Robert
                Attached Files

                Comment


                • #9
                  In case anyone had any problems with the script I had already posted. I have attached an update with improved error handling. I still have not fully resolved how to handle the rollover to a new day where the end time is less than the start time meaning that the period to be monitored should include part of the next day. For cash instruments no problms should now be experienced for any intraday period. If so let me know.

                  As to continuous futures data, if anyone has a good solution, let me know so that I can integrate it. I have experimented using "rawtime", however there is a bug with this so I am reticent to use it until I have an answer as per the follwoing thread:-

                  http://forum.esignalcentral.com/show...&threadid=5792

                  Robert
                  Attached Files

                  Comment


                  • #10
                    Looks Great

                    Robert, nice work on the Dynamic BB

                    I am watching this realtime today

                    I actually was manually adjusting your stoller band efs (both MA and ATR) yesterday on a 5 min AB Z3 and it gave some amazing signals on the morning lows and highs.

                    Don't have a programing bone in my body so I cant help on the continuous contract problem. Somebody should chime in soon though.

                    Your band research is looking very promising. WTG!

                    John

                    Comment


                    • #11
                      Robert

                      Excellent Job!!! Thank you.

                      Certainly have Sigma ( Hurst Channels) would be a good.

                      With TDM , Hurst is so far the most neglected in this community as far as EFS. Despite the fact that in terms of cycles......was likely the #1
                      Fabrizio L. Jorio Fili

                      Comment


                      • #12
                        I have amalgamated a number of band studies into my original script and have now renamed it as bandvar.efs. It now includes the following MAs (Moving Averages):-

                        1. EMA; Exponential which in fact gives the same results as WMA because of the variable period not true for fixed study periods.
                        2. LR; Linear Regression
                        3. SMA; Simple
                        4. Wilders; Wilders Exponential which in fact gives the same results as SMA because of the variable period not true for fixed study periods
                        5. WMA; Weighted

                        The following Band studies are available:-

                        1. Anderson (Standard Error); Smoothed LR as basis, Smoothed SE Bands

                        2. Bollinger (Standard Deviation); Usually SMA as basis, SD Bands

                        3. Headley (Acceleration Bands); Usually SMA as basis, specialized Range Bands which are independent of the basis.

                        4. Kirshenbaum (Standard Error); Usually EMA as basis, SE Bands

                        5. Keltner; Usually SMA as basis, Averaged unmodified High-Low range as bands

                        6. Stoller (STARC); usually SMA as basis, Averaged True Range(ATR) as bands

                        However you are not obliged to have the default basis with the band type. You can choose whatever MA for the basis you desire.

                        I have not resolved the issue of time rollover yet.

                        Fabrizio: Programming for Hurst bands is very complex depending on the degree of sophistication that is required. I have seen very complex code related to this. From what I have read many people have experimented with their own ideas as Hurst never outlined in detail how he came up with his bands back in the 70s, nor is it obvious from the realms of data in handouts that were given during Hurst seminars.

                        I would like comments to the output produced by this script and if anyone has any example chart screen shots to describe what would be great trading strategy plays then let us know.

                        Of course if anyone has any ideas how to resolve the rollover timing then that would be much appreciated to get the script fixed.

                        Robert
                        Attached Files
                        Last edited by rcameron; 12-04-2003, 01:03 PM.

                        Comment


                        • #13
                          After some more testing, I found a strange bug when using the HLC/3 price data together with LR for continuous futures from 00:00 to 00:00, and had to put some more error trapping routines. Here is the revised script (v1.2.5) which also includes more pertinent information in the cursor window.

                          Robert
                          Attached Files

                          Comment


                          • #14
                            Variable Bands

                            Robert,

                            One thing I have noticed is it looks like the bands are not ploting on the first bar of the day along with the MA. It looks like they are offset 1 or 2 periods.

                            Does it appear that way to you? (On the Stollers)

                            Its great to all have all the bands in one script.

                            John
                            Last edited by Himalaya; 12-04-2003, 04:03 PM.

                            Comment


                            • #15
                              John:

                              None of the bands are offset, just that the first 1or 2 bars are purposely cutoff to prevent garbage being displayed:-

                              Bands using Standard Deviation; because the result is divided by (Period-1) then for the first bar it would be divided by 0 giving an error, so display is omitted for this result.

                              Bands using Standard Error; Because the result is divided by (Period-2) then for the 2 bars it would be divided by 0 giving an error, so display is omitted for these results.

                              Bands using ATR; Because the result requires a Previous Close which is not available for the first bar as we are strictly starting all computations from a fixed start time then those results are omitted for the first bar.

                              I have placed in the code many error trapping routines to prevent garbage being dispayed for the Basis and Bands, so if you ever see anything missing from the first 1 or 2 bars is as a result of some error occurring (usually a null or infinity value) so the script just prevents it being displayed.

                              Robert

                              Comment

                              Working...
                              X