Advanced Bollinger Band indicator - does it exist ? - futures io
futures io futures trading



Advanced Bollinger Band indicator - does it exist ?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 17 posts (42 thanks)
    2. looks_two wldman with 12 posts (3 thanks)
    3. looks_3 forrestang with 11 posts (22 thanks)
    4. looks_4 Overview with 7 posts (0 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.5 thanks per post
    2. looks_two forrestang with 2 thanks per post
    3. looks_3 RedK with 1.5 thanks per post
    4. looks_4 wldman with 0.3 thanks per post
    1. trending_up 18,691 views
    2. thumb_up 74 thanks given
    3. group 11 followers
    1. forum 58 posts
    2. attach_file 12 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Advanced Bollinger Band indicator - does it exist ?

(login for full post details)
  #1 (permalink)
California
 
 
Posts: 40 since Dec 2010
Thanks: 14 given, 3 received

Hi All

I would like to use a more advanced Bollinger indicator, where I can show one middle band and up to 4 upper / lower bands instead of the normal 1.

Ideally this indicator will also, when applied to other indicators (rather than an instrument itself), show an option to use the indicator that is already in the target display panel, and also have customizable price markers.

It is possible to use the standard Bollinger indicator in NT7, but it is time-consuming to set up / change.

The other approach that would achieve a similar result might be a generic add-in so as to be able to show oscillator vertical scales in dual form - 1) the normal scale, and 2) normalized to the number of standard deviations from the mean (the mean ie.0 would also be shown) - then the period for calculating the mean and SD's could be something set in the add-in panel.

Anyone know of something like this - or something close ?

Reply With Quote

Journal Challenge February 2021 results:
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(172 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(120 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(31 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #2 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


Overview View Post
Hi All

I would like to use a more advanced Bollinger indicator, where I can show one middle band and up to 4 upper / lower bands instead of the normal 1.

Need to add some plots to the original Bollinger Bands.


Overview View Post
Ideally this indicator will also, when applied to other indicators (rather than an instrument itself), show an option to use the indicator that is already in the target display panel, and also have customizable price markers.

I am afraid that you will need to select the input series for the indicator manually when you apply it to a chart. Custumizable price markers can be coded, you would need to specify what you want to have customized.


Overview View Post
The other approach that would achieve a similar result might be a generic add-in so as to be able to show oscillator vertical scales in dual form - 1) the normal scale, and 2) normalized to the number of standard deviations from the mean (the mean ie.0 would also be shown) - then the period for calculating the mean and SD's could be something set in the add-in panel.

Not clear what you mean. Any indicator can be normalized and displayed relative to a scale of standard deviations, but how do you want to display a scale in dual form. If you display two scales, you will have two indicator lines on that panel as well.

Reply With Quote
 
(login for full post details)
  #3 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


Not sure what you're looking for, but I have something similar modeled that I've been watching/modifying for the past few weeks that is 'similar' to what the OP described, although probably not exactly.

That black line in the middle is the 0 standard Deviation. Then on each side of it is the first, second and third standard deviations.

Just modeling Bollinger bands themselves is a straightforward task and plotting Deviations on either side of the mean is easy. As FT suggested, applying that to a specific indie is pretty straightforward once adding it to the chart without going through custom programming.

Attached Thumbnails
Click image for larger version

Name:	Prime2011-09-21_040521.png
Views:	362
Size:	46.6 KB
ID:	49737  
Reply With Quote
 
(login for full post details)
  #4 (permalink)
California
 
 
Posts: 40 since Dec 2010
Thanks: 14 given, 3 received

Hi again Fat Tails !

What I was trying to do was to plot ROC instead of scaled as a percentage, in units of Standard deviation. What I ended up doing was putting up the ROC indicator in a new panel, and then using 4 BB indicators, set to 1, 2 3 and 4 SDs, with a very long period so that the 0 line was substantially flat.

The issues I had were 1) that to change the ROC period, you have to change it in 5 places - in the ROC indicator, and AFAIK in the input series drop-down in each of the 4 BB indicators.

So through the above kludge, I have approximately what I am looking for, but it's pretty inelegant, and given I am to programming as fish are to bicycles, that is the best I am going to get unless someone has already done something similar.

If I were able to plot ROC (or any other indicator) in measures of SD, then I could if I want have 2 panels, one ROC in % and the other in SD measures, and then do the standard NT7 trick of selecting the plot in the second ROC panel and dragging it into the first, in which case the second scale will be placed on the LHS of the panel, and I can then see both plots in different colours. The other thing that can then be done if the scales are normalized in SDs is to have ROC plots in the same panel but with different periods.

@Fat Tails - what I originally had in mind was a way of selecting whether the scale is in its original units or is displayed in SDs - hence the idea of an add-in to avoid having to modify the code for every indicator. No idea whether this is even possible, but thought it worth a mention - SD scaled presentation might be useful to other people for other indicators / oscillators as well as ROC.

@ forrestang Sounds like your indicator would be a great start for my purposes - any chance of getting hold of it ? And how easy is it to add another BB ?

Thx

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


Overview View Post

@ forrestang Sounds like your indicator would be a great start - any chance of getting hold of it ? And how easy is it to add another BB ?

Thx

My indie is 'still under construction' at the moment. There are some other things going on with that with behind the scenes that I am sorting out with regards to what I want to see on the chart.

But if you just want an indicator that will plot Bollingers with the standard deviations where you input a fixed length, I can create one of those really quickly for you so that you see that on your chart.

Reply With Quote
 
(login for full post details)
  #6 (permalink)
California
 
 
Posts: 40 since Dec 2010
Thanks: 14 given, 3 received

@ forrestang - Wow that would be great -- thanks v much

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


Overview View Post
@ forrestang - Wow that would be great -- thanks v much

Anything else you can think of that you might want in there before I post it?

Attached Thumbnails
Click image for larger version

Name:	Prime2011-09-21_084309.png
Views:	185
Size:	69.9 KB
ID:	49772  
Reply With Quote
 
(login for full post details)
  #8 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


Overview View Post
@ Fat Tails - what I originally had in mind was a way of selecting whether the scale is in its original units or is displayed in SDs - hence the idea of an add-in to avoid having to modify the code for every indicator. No idea whether this is even possible, but thought it worth a mention - SD scaled presentation might be useful to other people for other indicators / oscillators as well as ROC.
Thx

The ROC normalizes momentum by dividing through price. As instruments have different volatility, and as percentage changes depend on the bar period selected, you will not observe any uniform behaviour for all instruments and timeframes. You are absolutely right, if you want to use volatility to normalize price action. You have the choice between the average true range - this is what I personally prefer, because it is faster to calculate - and the standard deviation.

Normalizing means to divide the indicator value by the average true range or standard deviation and then display the result as a multiple. The point here is to find an appropriate look back period. Do you want to include price action of the night session or just use volatility observed during the day session? One solution that I have often adopted is to use the average true range over the entire chart. This is fast to calculate and - more important - stable. It will not slow down the indicator for real-time performance, as the calculation can be done once per bar - first tick of bar - only.

For the standard deviation, it can also be done over the entire chart period, if a modified formula is used.

I do not genereally recommend this as an add-on, but it can be done as an add-on as well. However, the add-on will be limited to oscillators, as you need a fixed reference such as 0 (momentum, MACD) or 50 (Stochastics, RSI) for calculating the bands.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #9 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


Overview View Post
What I ended up doing was putting up the ROC indicator in a new panel, and then using 4 BB indicators, set to 1, 2 3 and 4 SDs, with a very long period so that the 0 line was substantially flat.

The issues I had were 1) that to change the ROC period, you have to change it in 5 places - in the ROC indicator, and AFAIK in the input series drop-down in each of the 4 BB indicators.

So through the above kludge, I have approximately what I am looking for, but it's pretty inelegant, and given I am to programming as fish are to bicycles, that is the best I am going to get unless someone has already done something similar.

As is now, you would still have add it to the chart panel you want, apply the data series of whatever your target indicator is, and left justify it depending on how you want it displayed. And you won't have to change the period in so many different places.

Attached Thumbnails
Click image for larger version

Name:	Prime2011-09-21_100342.png
Views:	237
Size:	37.5 KB
ID:	49780  
Attached Files
Register to download File Type: zip OverViews_BBands.zip (7.8 KB, 75 views)
Reply With Quote
The following 6 users say Thank You to forrestang for this post:
 
(login for full post details)
  #10 (permalink)
California
 
 
Posts: 40 since Dec 2010
Thanks: 14 given, 3 received


@ forrestang


forrestang View Post
Anything else you can think of that you might want in there before I post it?

Oops - was n't watching the thread for a while .....
What you have is working nearly perfectly - I use daily charts a lot and if I have the data load set to 3650 days, and the ROC to say 10 days, if I set the period in the OverviewBB to be above about 2000 periods, the lines seem to disappear. I can survive with it as is but if it's a quick fix that would be great.

And if there were 4 BBs that would be really cool - that extra one can be useful sometimes. If it's too much effort no problem - and thanks very much for taking the time on what you have done.

@ Fat Tails

Appreciate the comments - my approach is a bit like yours - to set the SD period to the whole chart data load. The interesting thing about ROC as a % is that you see the offset and so can see the mean % increase per ROC period over the whole of the chart period.

If you want to compare ROC charts in the same panel, each with 2 different periods, by using the SD scale you can compare them more directly for variability. Horses for courses I guess. I'd not thought of using ATR for a similar purpose. You are way ahead of me Fat Tails - I was looking at using this for daily charts over 10 years for position rather than day or even swing. Going OT, I would be really interested to know how you use that type of chart - discretionary/automatic and how ? Maybe I can use what you are doing short term to help with much longer timeframes.

Reply With Quote
 
(login for full post details)
  #11 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


Overview View Post
@Fat Tails

Appreciate the comments - my approach is a bit like yours - to set the SD period to the whole chart data load. The interesting thing about ROC as a % is that you see the offset and so can see the mean % increase per ROC period over the whole of the chart period.

If you want to compare ROC charts in the same panel, each with 2 different periods, by using the SD scale you can compare them more directly for variability. Horses for courses I guess. I'd not thought of using ATR for a similar purpose. You are way ahead of me Fat Tails - I was looking at using this for daily charts over 10 years for position rather than day or even swing. Going OT, I would be really interested to know how you use that type of chart - discretionary/automatic and how ? Maybe I can use what you are doing short term to help with much longer timeframes.

I do not use that type of normalization for Bollinger Bands, but I have applied it to a number of other indicators.

Reply With Quote
 
(login for full post details)
  #12 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


Overview View Post
@ forrestang

Oops - was n't watching the thread for a while .....
What you have is working nearly perfectly - I use daily charts a lot and if I have the data load set to 3650 days, and the ROC to say 10 days, if I set the period in the OverviewBB to be above about 2000 periods, the lines seem to disappear. I can survive with it as is but if it's a quick fix that would be great.

Something to keep in mind, the indicator needs a certain amount of data to begin calculations. Whatever 'Period' you input for the indicator, its needs a minimum of that many bars on the chart before it even begins calculating, this is there to avoid trying to calculate data based on a bar index that doesn't exist.

So that means if you input a period of 2000, you need a MINIMUM of 2001 bars on the chart before the indicator makes it's first calculation. So if you like to look at 3000 days with a 'Period' of 2000 for example, you know those FIRST 2000 bars, the indie WILL NOT perform any calculations as it needs at least that many bars to perform the bollinger calculation.

SO if you put 3650 days on your chart and set your 'Period' to 2000, you won't see any calculations for the indicator during those first 2000 bars. If you want to see the values for those bars, then you need more days loaded on your chart.

Try taking that into account and lemme know if the problem still persists. I'll add some more lines on it after you lemme know if you get things working the way you want.

Reply With Quote
The following 2 users say Thank You to forrestang for this post:
 
(login for full post details)
  #13 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,758 since Jun 2009
Thanks: 32,301 given, 97,526 received

When using the mention feature, don't put a space after the @ sign. It should be @Overview, not @ Overview.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #14 (permalink)
California
 
 
Posts: 40 since Dec 2010
Thanks: 14 given, 3 received

@forrestang - OK - and thanks very much for the help
@Big Mike - wilco

Reply With Quote
 
(login for full post details)
  #15 (permalink)
California
 
 
Posts: 40 since Dec 2010
Thanks: 14 given, 3 received

@forrestang - now tried the indicator out - works fine. Still a little confused about the short chart drawing because the standard BB indicator does n't have that behavior, but I can certainly live with it. Thanks very much and if you feel like adding a 4th band sometime that would be great

Reply With Quote
 
(login for full post details)
  #16 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


Overview View Post
@forrestang - now tried the indicator out - works fine. Still a little confused about the short chart drawing because the standard BB indicator does n't have that behavior, but I can certainly live with it. Thanks very much and if you feel like adding a 4th band sometime that would be great

I think you probably have figured it out, but just in case.......

Well, for the 'short drawing,' think about it this way, if you were told to calculate a moving average based on 20 bars by hand, how could you calculate it if you only had 10 bars and not a full 20? You could fit an approximation in there, but your calculation WOULD NOT be an ACTUAL 20 period moving average. It would be a 10 bar moving average.

So what the study is doing, is WAITING until it has a minimum of whatever period YOU input as a PERIOD. Once it has that many bars + 1, that is when the study starts performing a calculation.

Here is the study with the 4th band added, renamed for simplicity.

Attached Thumbnails
Click image for larger version

Name:	Prime2011-10-06_093306.jpg
Views:	124
Size:	291.2 KB
ID:	51111  
Attached Files
Register to download File Type: zip FP_VolatilityByFour.zip (8.0 KB, 34 views)
Reply With Quote
The following 5 users say Thank You to forrestang for this post:
 
(login for full post details)
  #17 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

forrest?

dang it, I want to follow this thread.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #18 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


wldman View Post
forrest?

dang it, I want to follow this thread.

THIS one, or do you mean my other thread? This is just an indicator OverView wanted.

Reply With Quote
 
(login for full post details)
  #19 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

final color final coat going on today, then staining ceiling planks building window seat installing floor, putting up trim and moving them in.

Question on the NT standard bollinger. If I wanted to be able to use ema or a diffetent ma for the calc...how hard is that for you? DB

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #20 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


wldman View Post
final color final coat going on today, then staining ceiling planks building window seat installing floor, putting up trim and moving them in.

Question on the NT standard bollinger. If I wanted to be able to use ema or a diffetent ma for the calc...how hard is that for you? DB


Probably about 76 seconds.

Reply With Quote
The following user says Thank You to forrestang for this post:
 
(login for full post details)
  #21 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received


forrestang View Post
Probably about 76 seconds.


Can you snap that together please?

Make a bollinger where the ma can be selected from a drop down like Fat did in his modified Keltner?

Working on that exit metric as well, while Im painting. DB

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #22 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


wldman View Post
Can you snap that together please?

Make a bollinger where the ma can be selected from a drop down like Fat did in his modified Keltner?

Working on that exit metric as well, while Im painting. DB

So just EMA and SMA options?

Reply With Quote
 
(login for full post details)
  #23 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received


forrestang View Post
Probably about 76 seconds.

ema for what I'm wrenching on right now. That would be fine and much appreciated.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #24 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


wldman View Post
final color final coat going on today, then staining ceiling planks building window seat installing floor, putting up trim and moving them in.

Question on the NT standard bollinger. If I wanted to be able to use ema or a diffetent ma for the calc...how hard is that for you? DB


Why don't you simply download this indicator?



It currently allows you to select between 12 moving averages. If you like I can make it 24.

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #25 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


wldman View Post
ema for what I'm wrenching on right now. That would be fine and much appreciated.


Fat Tails View Post
Why don't you simply download this indicator?



It currently allows you to select between 12 moving averages. If you like I can make it 24.

LOL, well hell...... I just spent some time having @MWinfrey schooling me on using an enum as I had never used it before.

@Fat Tails, the one you have is definetely nicer than my little P.O.S BB indicator

But I feel like I need to post it anyway since I made it, at least I learned something new. Woot!!!

Attached Thumbnails
Click image for larger version

Name:	Prime2011-10-06_121324.jpg
Views:	162
Size:	295.4 KB
ID:	51122  
Attached Files
Register to download File Type: zip FP_VolatilityByfour.zip (13.5 KB, 46 views)
Reply With Quote
The following 7 users say Thank You to forrestang for this post:
 
(login for full post details)
  #26 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


forrestang View Post
LOL, well hell...... I just spent some time having @ MWinfrey schooling me on using an enum as I had never used it before.

@ Fat Tails, the one you have is definetely nicer than my little P.O.S BB indicator

But I feel like I need to post it anyway since I made it, at least I learned something new. Woot!!!

I disagree, yours has more bands, so it is not comparable. Also my indicator is quite old, I guess I will recode it, as I have made some progress in coding since. I always feel ashamed if I read what I have coded one year ago...

Reply With Quote
The following 5 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #27 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received


Fat Tails View Post
Why don't you simply download this indicator?



It currently allows you to select between 12 moving averages. If you like I can make it 24.


was not aware that the indicator was available for review and download. But I do now so I will take a look. Thanks Fat.
BTW I was not aware that there where 24 types of ma to choose from. lol

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #28 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

pretty much exactly what I would want in a bband indie. Thanks Fat.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #29 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


wldman View Post
was not aware that the indicator was available for review and download. But I do now so I will take a look. Thanks Fat.
BTW I was not aware that there where 24 types of ma to choose from. lol

You can easily find more than that. Digital filters, super polished averages, zerolagging creatures, it is a fully fledged habitat.

Reply With Quote
 
(login for full post details)
  #30 (permalink)
Des Moines, Iowa
 
Experience: None
Platform: Ninja, TOS
Broker: AMP/CQG, TOS
Trading: CL, TF, GC
 
madLyfe's Avatar
 
Posts: 1,644 since Feb 2011
Thanks: 9,220 given, 1,015 received


Fat Tails View Post
I disagree, yours has more bands, so it is not comparable. Also my indicator is quite old, I guess I will recode it, as I have made some progress in coding since. I always feel ashamed if I read what I have coded one year ago...

will u update in the downloads section once you've recoded it? ;-)

dont believe anything you hear and only half of what you see

¯\_(ツ)_/¯

(╯°□°)╯︵ ┻━┻
Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #31 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


madLyfe View Post
will u update in the downloads section once you've recoded it? ;-)

I update all indicators in the download section, when I have recoded them. But I have a huge backlog now, it won't be tomorrow for the Bollinger Bands.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #32 (permalink)
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
 
MWinfrey's Avatar
 
Posts: 1,880 since Jul 2009
Thanks: 1,450 given, 3,325 received


Fat Tails View Post
I disagree, yours has more bands, so it is not comparable. Also my indicator is quite old, I guess I will recode it, as I have made some progress in coding since. I always feel ashamed if I read what I have coded one year ago...

I do the same thing. I look at my old code and wonder what was going through my mind at the time.

Reply With Quote
The following user says Thank You to MWinfrey for this post:
 
(login for full post details)
  #33 (permalink)
Legendary Urban Samurai
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,194 since Jun 2010
Thanks: 290 given, 876 received


MWinfrey View Post
I do the same thing. I look at my old code and wonder what was going through my mind at the time.

Hmmm, so what does it mean if you look at your CURRENT work and wonder what is going through your mind?

Reply With Quote
The following user says Thank You to forrestang for this post:
 
(login for full post details)
  #34 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


forrestang View Post
Hmmm, so what does it mean if you look at your CURRENT work and wonder what is going through your mind?

You are always proud of your current work. The problem only occurs, if you review it a few days or months later and think "who is the stupid guy who had coded that piece of junk" - and then you discover it was yourself.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #35 (permalink)
California
 
 
Posts: 40 since Dec 2010
Thanks: 14 given, 3 received

@forrestang - tested and looking good - many thanks.

I use it to catch spiky turning points - usually set the period on the 4 way BB to the same number of bars as are on the chart - working well.

@Fat Tails - if you ever fancy doing a normalized ROC indicator i.e. vertically scaled in standard deviation units, if it's really easy, then that would be a really cool addition at some point. (I would use that one as an input to the market analyzer)

Thanks again all !!

Reply With Quote
 
(login for full post details)
  #36 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received

Have now updated the Bollinger Universal Indicator. Here are the features:

- The midband can be selected from a moving median, a moving mode or 27 different moving averages.

- Midband and channels can be smoothed.

- The period for the standard deviation can be different from the period for the moving average.

- The indicator has an option to display the channels or the midband individually.

- All plots can be colored according to their slope, or alternatively all plots can be colored according to the slope of the midband.

- The slope color includes a neutral slope, which can be adjusted via a threshold.

- The area between the Bollinger Bands can be shaded, shading may increase the CPU load.

The indicator can be found here:





Reply With Quote
The following 6 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #37 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

@Fat Tails

I could not find a thread dedicated to your specific indicator so I am happy to move or have @Big Mike move this to the right spot.

I noticed a setting on your anaBollingerUniversal for a neutral threshold. Here is a pic, the questions included.


Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #38 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


wldman View Post
@Fat Tails

I could not find a thread dedicated to your specific indicator so I am happy to move or have @Big Mike move this to the right spot.

I noticed a setting on your anaBollingerUniversal for a neutral threshold. Here is a pic, the questions included.

The neutral color just refers to the slope of the lines. I had been annoyed by all these false slope and angle indicators, which do not correctly show momentum relative to the chart scales. I have therefore coded an indicator which shows a neutral zone (slope close to zero) across all instruments and timeframes. The steepness measured by this indicator is normalized. You can apply it to a daily chart of YM or a 1-min chart of 6E and will always get a correct result for the relative slope of the lines. Try to do that with anyone of the many angle indicators and compare the results.

The Bollinger Universal has the option to measure a neutral zone for each of the three bands, or you can set it to midbandslope. In that case it will measure the slope of the moving average, which is used as a midband.

A yellow midband means that there is no strong trend but indecision. Now when there is a squeeze, that means that the directional movement has come to a halt, so you may expect a yellow area. This is like an unstable equilibrium. The color that follows indecision will then show the direction of the short term momentum, which would be the direction to enter your trade.

The chart attached gives an example, I have set the Bollinger Universal to MidBandSlope. The indicator below is the standard Bollinger Squeeze (Bollinger Bands inside the Keltner Channels).


Reply With Quote
The following 8 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #39 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

I have not updated to V.4 yet. Do you reccomend that I do that?

I understand what you have provided and I think that will be very useful.

How am I to interpret a numerical setting for "Neutral Threshold"? A larger number creates a larger neutral colored region. I see slope as a percentage of atr but I am not sure what that means. Could you describe that for me please?

Thanks Harry.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #40 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

out loud on this. A bollinger band that was color coded based on the relative width between or the convergence/divergence of the bands would be a measure of short term relative volatility. That could also be used like the squeeze is to refine out periods of non-entry?

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #41 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


wldman View Post
I have not updated to V.4 yet. Do you reccomend that I do that?

I understand what you have provided and I think that will be very useful.

How am I to interpret a numerical setting for "Neutral Threshold"? A larger number creates a larger neutral colored region. I see slope as a percentage of atr but I am not sure what that means. Could you describe that for me please?

Thanks Harry.

I always recommend to update to the latest version. Attention here, in case that there is a version conflict, you would need to first remove and then update all

- HeikinAshi
- Keltner Universal
- Bollinger Universal
- SuperTrend U11

Only applicable if you have them installed.

Neutral Threshold

I need to come back to the concept of slope. If you have a 10 tick move on a 5 min chart and you consider that steep, what would you consider steep on a 60 min chart? Certainly not a 10 tick move. The theoretical answer tells you that the equivalent would be close to a 10 * sqrt(12) = 35 tick move. The practical approach is to compare that move to the average bar size of the last xxx bars. The average true range just stands for average bar size.

Also it is important to understand that the slope of the moving average is a proxy for momentum. If you calculate the slope of a SMA it is the current value of the SMA minus the prior value, divided by a scale factor. The difference current value - prior value of a N-period SMA is identical with the N-period momentum divided by N. Slope therefore means N-period momentum divided by (N * scale factor).

The neutral threshold allows you to define what you consider flat. If you move that threshold up to 1000 the whole world will be flat. If you move it to zero, no slope is small enough to be considered flat. By selecting an appropriate number you can define a range for what is considered "weak momentum". This is experimental, you could for example set that value to 100.

The yellow areas cannot be described as a squeeze. Zero momentum can be created by too large moves that cancel out. A squeeze means that price has been sitting in a narrow range for some time, where narrow range is defined in terms of barsize.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #42 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


wldman View Post
out loud on this. A bollinger band that was color coded based on the relative width between or the convergence/divergence of the bands would be a measure of short term relative volatility. That could also be used like the squeeze is to refine out periods of non-entry?

The squeeze compares N-bar volatility to intrabar volatility. It detects a situation where N-bar volatility is unusually low compared to intrabar volatility.

If you color code a Bollinger Band depending on the bandwidth (which is just the standard deviation), then you look at absolute levels of volatility, without comparing them to intra-bar volatility.

Low levels of absolute volatility mostly conincide with low levels of volatility relative to intra-bar volatility. A Bollinger Band indicator color coded on bandwidth would be something similar as the squeeze. If you compare the bandwidth to barsize, that is exactly the formula for the squeeze.

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #43 (permalink)
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
 
Posts: 76 since Jul 2010
Thanks: 202 given, 36 received


Fat Tails View Post
The neutral color just refers to the slope of the lines. I had been annoyed by all these false slope and angle indicators, which do not correctly show momentum relative to the chart scales. I have therefore coded an indicator which shows a neutral zone (slope close to zero) across all instruments and timeframes. The steepness measured by this indicator is normalized. You can apply it to a daily chart of YM or a 1-min chart of 6E and will always get a correct result for the relative slope of the lines. Try to do that with anyone of the many angle indicators and compare the results.

The Bollinger Universal has the option to measure a neutral zone for each of the three bands, or you can set it to midbandslope. In that case it will measure the slope of the moving average, which is used as a midband.

A yellow midband means that there is no strong trend but indecision. Now when there is a squeeze, that means that the directional movement has come to a halt, so you may expect a yellow area. This is like an unstable equilibrium. The color that follows indecision will then show the direction of the short term momentum, which would be the direction to enter your trade.

The chart attached gives an example, I have set the Bollinger Universal to MidBandSlope. The indicator below is the standard Bollinger Squeeze (Bollinger Bands inside the Keltner Channels).


Dear Fat,
Thank you again for your continuous contribution .... I would very much like to have your detailed "Slope Calculation" description .... As i have no programming knowledge, it is not possible to understand and interpret the code .... Please also make a reference to "neutral zone" ....
Waiting for your kind and detailed answer .... Thank you in advance.....
Best Regards
Dimitri

Reply With Quote
 
(login for full post details)
  #44 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


dimitri View Post
Dear Fat,
Thank you again for your continuous contribution .... I would very much like to have your detailed "Slope Calculation" description .... As i have no programming knowledge, it is not possible to understand and interpret the code .... Please also make a reference to "neutral zone" ....
Waiting for your kind and detailed answer .... Thank you in advance.....
Best Regards
Dimitri

Slope is a geometrical concept which was used as a proxy for momentum. The geometrical slope depends on the vertical and horizontal scales used. The original idea was to look at momentum and to divide it by the number of bars (rise over run). If you use the slope of a moving average, you just need to compare the values of two consecutive bars, as the lookback period of the moving average is already taken into account.


Vertical scale value (not normalized): Price difference between the current bar's and the prior bar's value
Vertical scale value (normalized): Price difference between the current bar's and the prior bar's value divided by average bar true size over a longer lookback period
Horizontal scale value : 1 bar

A normalized formula for the slope would therefore be

slope = (current value of MA - prior value of MA) / average true range

I have seen concepts that use the ticksize instead of the average true range, but this is not very helpful. If you use ticksize, YM will always show steeper moves than ES, because its relative TickSize is smaller.

The indicator uses a variation of that definition of slope. Instead of the difference between current value and prior value of the MA it uses the difference between the current value and the average value of the two preceding bars. This also means that a correctional factor of 1.5 must be applied.

slope = (MA[0] - 0.5* MA[1] - 0.5* MA [2])/(average true range * 1.5)

which is a smoother version of slope. You can think of this as an artificial slope which applies to all instruments and timeframes.

The neutral threshold just measures that slope against a percentage. A value of 30 means 3%. This means that all slope value between -3% and + 3% are considered as insignificant (flat), which translates into a yellow color.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #45 (permalink)
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
 
Posts: 76 since Jul 2010
Thanks: 202 given, 36 received


Fat Tails View Post
Slope is a geometrical concept which was used as a proxy for momentum. The geometrical slope depends on the vertical and horizontal scales used. The original idea was to look at momentum and to divide it by the number of bars (rise over run). If you use the slope of a moving average, you just need to compare the values of two consecutive bars, as the lookback period of the moving average is already taken into account.


Vertical scale value (not normalized): Price difference between the current bar's and the prior bar's value
Vertical scale value (normalized): Price difference between the current bar's and the prior bar's value divided by average bar true size over a longer lookback period
Horizontal scale value : 1 bar

A normalized formula for the slope would therefore be

slope = (current value of MA - prior value of MA) / average true range

I have seen concepts that use the ticksize instead of the average true range, but this is not very helpful. If you use ticksize, YM will always show steeper moves than ES, because its relative TickSize is smaller.

The indicator uses a variation of that definition of slope. Instead of the difference between current value and prior value of the MA it uses the difference between the current value and the average value of the two preceding bars. This also means that a correctional factor of 1.5 must be applied.

slope = (MA[0] - 0.5* MA[1] - 0.5* MA [2])/(average true range * 1.5)

which is a smoother version of slope. You can think of this as an artificial slope which applies to all instruments and timeframes.

The neutral threshold just measures that slope against a percentage. A value of 30 means 3%. This means that all slope value between -3% and + 3% are considered as insignificant (flat), which translates into a yellow color.

Dear Fat,
Thank you for your detailed description ..... I am trying to find a solution into "calculating slope" ... the obtained results are not satisfactory ..... I will try your logic and calculations ....... I will let you know ....
Thank you again for all ....
Best Regards
Dimitri

Reply With Quote
The following 2 users say Thank You to dimitri for this post:
 
(login for full post details)
  #46 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

Thank you @Fat Tails for those great descriptions. I have a late start today and will enthusiastically focus on those posts after the coffee kicks in. On the most basic level I was looking for an improved typical squeeze type indicator with less lag that could be placed on the price field as I already have a good tenant in the sub-graph. Two sub graphs and IMO you start to queer up price action, which of course is and should always be king. I do enjoy the bpfsqueeze and the view I get from the Gaussian filter drawn histogram. I'm still trying to figure out what draws the signal/zero line though.

Be well Fat Tails and trade well.

Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to wldman for this post:
 
(login for full post details)
  #47 (permalink)
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
 
Posts: 76 since Jul 2010
Thanks: 202 given, 36 received


Fat Tails View Post
Slope is a geometrical concept which was used as a proxy for momentum. The geometrical slope depends on the vertical and horizontal scales used. The original idea was to look at momentum and to divide it by the number of bars (rise over run). If you use the slope of a moving average, you just need to compare the values of two consecutive bars, as the lookback period of the moving average is already taken into account.


Vertical scale value (not normalized): Price difference between the current bar's and the prior bar's value
Vertical scale value (normalized): Price difference between the current bar's and the prior bar's value divided by average bar true size over a longer lookback period
Horizontal scale value : 1 bar

A normalized formula for the slope would therefore be

slope = (current value of MA - prior value of MA) / average true range

I have seen concepts that use the ticksize instead of the average true range, but this is not very helpful. If you use ticksize, YM will always show steeper moves than ES, because its relative TickSize is smaller.

The indicator uses a variation of that definition of slope. Instead of the difference between current value and prior value of the MA it uses the difference between the current value and the average value of the two preceding bars. This also means that a correctional factor of 1.5 must be applied.

slope = (MA[0] - 0.5* MA[1] - 0.5* MA [2])/(average true range * 1.5)

which is a smoother version of slope. You can think of this as an artificial slope which applies to all instruments and timeframes.

The neutral threshold just measures that slope against a percentage. A value of 30 means 3%. This means that all slope value between -3% and + 3% are considered as insignificant (flat), which translates into a yellow color.

Dear Fat,
Is that possible to describe the calculation to "measure the slope against a percentage", in order to understand your approach ....

Thank you in advance for your cooperation ....
Best Regards
Dimitri

P.S. : i am working with your "slope calculation" and it is very interesting ....

Reply With Quote
 
(login for full post details)
  #48 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


dimitri View Post
Dear Fat,
Is that possible to describe the calculation to "measure the slope against a percentage", in order to understand your approach ....

Thank you in advance for your cooperation ....
Best Regards
Dimitri

P.S. : i am working with your "slope calculation" and it is very interesting ....

@dimitri: My indicator is open source, you can simply copy the code and analyze it.

If you look at my definition of slope I take the vertical distance of two consecutive points of the moving average. This distance represents something like the average per bar momentum over the lookback period. I then divide that value by the average true range. This is the simple version.

The indicator basically does the same thing, but uses two prior points P1 and P0 to calculate the slope. This gets you a slightly smoother variation of slope.

The chart below shows a delta of 0.05 against an average true range of 0.134. Division gets me a slope of 37%. If the absolute amount of that slope is smaller than 3%, the moving average will be displayed as yellow if the threshold is set to 30 ‰ (which is 3%).


Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #49 (permalink)
Dubai, UAE
 
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
 
RedK's Avatar
 
Posts: 171 since May 2012
Thanks: 44 given, 143 received

don't mean to confuse things, and i follow the slope discussion with interest.. very interesting thought to use ATR to arrive at a "relative" slope that can be used between different instruments and still provide a usable reading..

here's my mathematical view - as i did give this a shot few weeks back before i saw the discusion on futures.io (formerly BMT) - hoping this approach may give some thoughts to fellow scripters. will try to avoid complex pure math stuff,

- we are not living in a linear world when looking at a chart of a future or stock price as it goes up & down, but rather in a relative/log-based .. where i'm more interested in a 1% decreasse or increase rather than the $$ value. while the absolute dollar value of that 1% will change depending on what the current price range is, the 1% itself remains the same. for me that means slope "rise" need to be based on percentatges change and not absolute $ value change..

calculating price change relative to ATR(length) is a very practical approach to work around things & convert rise to a relative/percentage, my worry is, ATR(length) is not a constant and will slightly change with volatility, but maybe then, i may want that factor being built into the result. just need to be aware of it.

- the MA is not a line, but a curve.. so in slope calc we need to use the "slope of a tangent of a curve" version and not the "line slope" version..

considering these 2 points in calculating slope produces an angle, and regardless of scale of chart, underlying price range, or change of ATR(length) due to price fluctuating during certain periods, the angle of slope will continue to be a usable metric.. then you can say, between +15 and -15 i'm not interested as it shows a weak move ..

i can share the script for ToS .. reason i don't use it, it was almost the same curve as the momentum study i use.. so went back to Momentum.

hope this helps add another perspective,
cheers, RedK

Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to RedK for this post:
 
(login for full post details)
  #50 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

So @Fat Tails maybe square scaled charts would create a more perfect visual on this?

Thanks so much for the feature and for the explanation here. The preset setting of 30 represents 3% slope or something just less than 1:3 where there is 1 unit of "rise" to every 3 units of "run"?

I'm thinking that a squeeze like indicator could be created measuring the relationship between the slopes of two lines, in this case the bollinger and the keltner. Those are not totally non colinear, but I wonder if the same relationship could be viewed with value between two non colinears.

Hate to be so nerdy, but I do sit and ponder this type of thing all the time.

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to wldman for this post:
 
(login for full post details)
  #51 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

@RedK

The distinction that interests me is the relationship between two non co-linears, perhaps relative to price. I'n that context I'd seek a pattern that can be anticipated or duplicated. So unlike MACD where the "CD" is between two MA's, this idea would look at the relationship between say volatility and volume, or between two timeframes, and then be overlaid on price.

Not to digress too much but I think the situational evaluation for the trade entry/exit metric should be based on relationships between readings, not just readings. In that, I think, you gain some insight especially in determining the risk/reward of a potential entry.

DB

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #52 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


RedK View Post
don't mean to confuse things, and i follow the slope discussion with interest.. very interesting thought to use ATR to arrive at a "relative" slope that can be used between different instruments and still provide a usable reading..

here's my mathematical view - as i did give this a shot few weeks back before i saw the discusion on futures.io (formerly BMT) - hoping this approach may give some thoughts to fellow scripters. will try to avoid complex pure math stuff,

- we are not living in a linear world when looking at a chart of a future or stock price as it goes up & down, but rather in a relative/log-based .. where i'm more interested in a 1% decreasse or increase rather than the $$ value. while the absolute dollar value of that 1% will change depending on what the current price range is, the 1% itself remains the same. for me that means slope "rise" need to be based on percentatges change and not absolute $ value change..

The relative/ log-based approach is necessary for longer timeframes. As long as you apply indicators to intraday charts the linear approximation is good enough. I do not use logarithmic scales on an intraday chart, but would definitely use it on a monthly chart.

When trading stocks the absolute percentage reflects the amount invested and is proportional to the downside risk. When trading futures you would use leverage to adjust your position to the volatility of the underlying. In this case it is better to adjust slope to volatility.

In the end when coloring an indicator, what I really want to achieve is to get alerted to a situation where price moves sideways. If I was to use a correct mathematical approach I would calculate all deltas of the moving average over a lookback period of a year, then show the (near-Gaussian) distribution of those slopes and just take out 5 percentiles ot each side of the zero-slope and consider this as flat. This is because I do not use slope as proxy for value but for a sideways market condition.


RedK View Post
calculating price change relative to ATR(length) is a very practical approach to work around things & convert rise to a relative/percentage, my worry is, ATR(length) is not a constant and will slightly change with volatility, but maybe then, i may want that factor being built into the result. just need to be aware of it.

Thank you for pointing to this problem. Originally I had used an approach which calculates an average true range over the entire chart period. In that case the value is less arbitrary and less fluctuating than the ATR(20), which I have used in this indicator. The only problem with the ATR is that it evolves slowly, and that the final values will then depend on the lookback period of the chart. I know that ATR(20) is not a perfect solution, but that some improvement is possible here.

One problem is that with intraday charts volatility is low prior to the session start, so the ATR(20) used for the first bar of the session is not really relevant. What I should do is either

-> calculate the average true range over 5 consecutive trading days
-> or produce an estimation of the average true range by calculating it from the daily range

The second option is not so difficult. I would load the last year of daily data, then calculate the average range per day, and then divide it by the square root of the average number of bars per day. For example, if I have a 5 minute chart of ES, then the number of bars per day are 267(Monday), 279(other days), which results in an average of 276.6 bars, I would therefore divide the average daily range by sqrt(276.6) = 16.63 to obtain my normalization factor for slope.

If I was to use an adaptive approach - as I do now for simplicity's sake - I would rather opt for using implicit volatility than historical volatility. Implicit volatility could be calculated by studying intraday seasonality and use a volatility function calculated from the DayOfWeek/TimeOfDay.


RedK View Post
- the MA is not a line, but a curve.. so in slope calc we need to use the "slope of a tangent of a curve" version and not the "line slope" version..

A tangent is only available for continuous functions. Approximating a tangent with a secant is not a crime.


RedK View Post
considering these 2 points in calculating slope produces an angle, and regardless of scale of chart, underlying price range, or change of ATR(length) due to price fluctuating during certain periods, the angle of slope will continue to be a usable metric.. then you can say, between +15 and -15 i'm not interested as it shows a weak move ..

i can share the script for ToS .. reason i don't use it, it was almost the same curve as the momentum study i use.. so went back to Momentum.

hope this helps add another perspective,
cheers, RedK

Does your script also achieve the prupose for which I have produced the code that is

-> to produce a practical solution for ALL instruments and ALL timeframes to identify the middle percentiels in the distribution of slope,

-> if it achieves the purpose the yellow (neutral) zones should be as frequent on a daily chart of YM as they are on a 1-minute chart of EURUSD ?

Reply With Quote
 
(login for full post details)
  #53 (permalink)
Dubai, UAE
 
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
 
RedK's Avatar
 
Posts: 171 since May 2012
Thanks: 44 given, 143 received

@FatTails, i don't think it does or it attempts to come close to what you're doing.. it is a very basic calc of slope that i worked on for a while.. with focus on stocks, and i would rarely look at 1min or 5min charts ..

i was just sharing how I approached the methematica problem of calculating slope on a price chart.. and the key 2 thoughts i had to work around.. your approach is mouch more comprehensive and i admire the amount of effort you put into it.. this is really valuable to all of us,

cheers,
RedK

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to RedK for this post:
 
(login for full post details)
  #54 (permalink)
South Carolina
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Zen Fire
Trading: 6E, ES
 
Posts: 52 since Jun 2011
Thanks: 126 given, 15 received


Reply With Quote
 
(login for full post details)
  #55 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


lblanks View Post

Could you please provide a link to the indicator that retrieves the signals. I have no clue what it is doing.

The Bollinger Universal indicator has an additional smoothing feature. Also it allows to use different moving averages. I do not know how that other indicator calls it.

Reply With Quote
 
(login for full post details)
  #56 (permalink)
South Carolina
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Zen Fire
Trading: 6E, ES
 
Posts: 52 since Jun 2011
Thanks: 126 given, 15 received

Sorry User error I somehow got median instead of SMA you would not think it makes that much difference but it does thanks for all your work on the forum.

Reply With Quote
The following user says Thank You to lblanks for this post:
 
(login for full post details)
  #57 (permalink)
Athens - Greece
 
Experience: Intermediate
Platform: Metastock
 
Posts: 76 since Jul 2010
Thanks: 202 given, 36 received


Fat Tails View Post
@dimitri: My indicator is open source, you can simply copy the code and analyze it.

If you look at my definition of slope I take the vertical distance of two consecutive points of the moving average. This distance represents something like the average per bar momentum over the lookback period. I then divide that value by the average true range. This is the simple version.

The indicator basically does the same thing, but uses two prior points P1 and P0 to calculate the slope. This gets you a slightly smoother variation of slope.

The chart below shows a delta of 0.05 against an average true range of 0.134. Division gets me a slope of 37%. If the absolute amount of that slope is smaller than 3%, the moving average will be displayed as yellow if the threshold is set to 30 ‰ (which is 3%).


@Fat Tails
Dear Fat, using your logical approach to calculate the slope .... we can go on, by using Trigonometry ....
So we can now "calculate the X axis" (which in charts is "time series") .... using the "slope value" and the "Delta (which is the Y axis or price...)". Now by using the Tangent formula = X/Y or X=Tan*Y ....
Having now the "new conventional value" of X, we can start a very serious research with this value ....
At this point, i have to declare that i am using Metastock and i am not a programmer ... Manually (it is very hard ....with all PC's and technology around ...) i have tried to see how the "X" value is performing in following logic ....
It seems to have an interesting result ....
The Logic is : Starting from a ZERO point which can be a Highest High or a Lowest Low .... we add the "X" with the "X of previous bar" ... when it is applied ....

If anybody can spend his precious time to code it and show the chart results ..... (as explained i have no any programming skill ...) it will be very very much appreciated ...

Best Regards
Dimitri

Reply With Quote
 
(login for full post details)
  #58 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


dimitri View Post
@Fat Tails
Dear Fat, using your logical approach to calculate the slope .... we can go on, by using Trigonometry ....
So we can now "calculate the X axis" (which in charts is "time series") .... using the "slope value" and the "Delta (which is the Y axis or price...)". Now by using the Tangent formula = X/Y or X=Tan*Y ....
Having now the "new conventional value" of X, we can start a very serious research with this value ....
At this point, i have to declare that i am using Metastock and i am not a programmer ... Manually (it is very hard ....with all PC's and technology around ...) i have tried to see how the "X" value is performing in following logic ....
It seems to have an interesting result ....
The Logic is : Starting from a ZERO point which can be a Highest High or a Lowest Low .... we add the "X" with the "X of previous bar" ... when it is applied ....

If anybody can spend his precious time to code it and show the chart results ..... (as explained i have no any programming skill ...) it will be very very much appreciated ...

Best Regards
Dimitri

Any geometrical approach will not help you but lead you directly to a bunch of problems. Let me repeat the basics.

Slope is a visual proxy for momentum, which works if scales are invariant and if you use it for a single time frame. When chart books for daily charts were printed, with always the same horizontal scale and the same vertical scale, this was possible.

We are not interested in slope, but we are interested in the relative change of the value of the moving average between two consecutive bars.

"steep" means that it is changing faster than usual
"flat" means that it is not changing or that the changes are very small compared to average change

Steepness on a 5 minute chart is not the same as steepness on a 60 min chart. On a 60 min chart the change of the MA value should be sqrt(12) times larger than on a 5 min chart. This means that we need to take into account the timeframe of the chart, if we wish to continue to use the concept of steep and flat. Taking into account the timeframe is achieved by comparing the change in the values of the MA to the average bar size. If the change is a full bar, it is very steep. If it is a small fraction of that bar it is flat.


Rise-over-run

The concept of "rise-over-run" replaces the geometrical concept of the slope. Rise-over-run is the change of a linear regression slope or a moving average over 1 bar. Rise-over-run is not normalized over instruments and timeframes, so with similar settings rise-over-run will not identify flat periods. Normalization can be achieved

- via dividing by average volatility
- by populating a large array with all available MA differences over the chart lookback period and calculating percentiles (this is similar to the approach for market profile)

You cannot achieve this with any trigonometric approach.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #59 (permalink)
Puyallup, Washington State
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NINJATRADER/CQG
Trading: NQ, CL, ES, YM
 
echoeversky's Avatar
 
Posts: 115 since Sep 2009
Thanks: 113 given, 48 received

Any thoughts as to using the Eito (sp) Calculus that helped the Black Scholes formula with its continuous time contribution?

Follow me on Twitter Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Advanced Bollinger Band indicator - does it exist ?


Last Updated on June 11, 2013


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1500 prizes from Topstep!

February
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts