Help - how can I use Dataseries wich are calulate by an other Indicator?
just a simple C#-Question...
I try to develope an Indicator for a Bollinger-Band, based on a "faster" Moving Average.
To calculate the Standard-Deviation for that "faster" MA (i.e. EMA or HMA), I have the Idea, to customize the normal StdDev Indicator, so, that it is able to use that "faster" MA from the calling Bollinger-Band Indicator without a recalculation - the "faster" MA must be "visible" for the new StdDev-Indicator.
Here is my Question - How can I make the "faster" MA, calculate in the new faster Bollinger-Band Indicator, visible in the customized StdDev?
Within the "FastBollinger" I call that customized StdDev as followed:
Unfortunaly the Code for the customized StdDev did not work - It is not able to use the MA-Datastream
Hope, that someone of you can help - so that i can finished that Idea and make it usable for other users!
From your post it is not very clear, what you want to achieve.
1. I understand that you want to calculate a band around a moving average. You are talking about a faster moving average. So there must be a slow one as well that you are not mentioning. Can you tell me what is the purpose of the fast and the slow moving average?
2. You are mentioning different types of moving averages, EMA or HMA. Have you made up your mind, which one to use?
3. What is the mathematical formula for your band?
Thanks for reading my Question - and sorry, if my explanation was a unclear.
The normal NT - Bollinger Indicator is based on a Simple Moving Average. The Code is very simple:
Firstly it calculates the SMA, secondly it is calling the Standard Deviation- Indicator with the same Period for calculating the Standard Deviation of that SMA. Thirdly it calculates the two BollingerBands.
Here is the Main-Code Snip for Bollinger
And this one is the main Code Snip for the StdDev:
OK - You can see that the called StdDev also calculates a Simple Moving Average (SMA) instead of using the SMA Dataseries from the calling Bollinger Method.
My Intention is to write a modified StdDev Indicator that have access to the Moving Average which was calculated in the calling Method (for example a modified Bollinger-Indicator). This has two Advantages. Firstly it saves Ressources, if you are using complex Moving Averages instead of a simple SMA, and secondly this modified StdDev will be more flexible because you can use it with different Datastreams (mostly different Moving Averages).
Here is my Code Idea for a modified Bollinger (in this example with a "faster" EMA instead of a "slow" SMA).
Unfortunaly I have no Idea how to make the smaSeries from that modified Bolinger usable within the modified StdDev - and this is my Question.
Here is my - not working - Code-Idea for the modifiedStdDev
OK - I hope, that this explanation will be a little bit clearer.
Thanks for reading - and I hope someone can help!
Last edited by Trendseek; August 31st, 2010 at 09:46 AM.
Hello Fat Tails,
thanks again for your answer - but perhaps we use different conceptions about Bollinger, or I simply missconceive you?
Bollinger in his own words: "For Bollinger Bands the measure of central tendency is a simple moving average, and the interval is delineated by a measure of volatility, a moving standard deviation." (Bollinger, John; Bollinger on Bollinger Bands; 2002; S.50). And this is, what we see in the Standard-NT Code above. Do you have some Sources for your interpretation about "centerpoints" and prices?
In my view you need something like the SMA for calculate the Standard Deviation (the Difference between Datapoints and the SMA-Values). By the way - later in his Book, Bollinger discuss the uselessness of "fast Bollinger-Bands" who based on an EMA instead of a SMA for calculate the Standarddeviation. But back to my SIMPLE MAIN-Question - How can I use a Dataseries in an Indicator like a custumized StandardDeviation which was calculate by an other Indicator (or Method)?
The following user says Thank You to Trendseek for this post:
Ummm, standard deviation is variation around an AVERAGE. It has to use an SMA. If you modify it using anything not an average, it becomes something other than stddev. The multi-MA tool above seems to be the best approach
to me. Play around with different moving averages with Bollinger bands added and subtracted (plus/minus stddev) and I'm sure what you have conceptualized will be in there. But keep in mind that its still the average of the fast moving average for the (period) bars that the standard deviation is being calculated from. The Dataseries is an average of the EMA (for example).
To understand this better, try adding "close" as the dataseries of the stddev to regular Bollinger bands and then you would see the volatility of each bar close (price action). It is just interesting - maybe not useful tho.
The StdDev simple means what it says: It is a standardised deviation (or difference) between two Datasets - nothing else. Instead of an Average you can use a Regression-Line or anything else you want - but you are right: the "original" mathematical notation contains the differences between Datapoints and tha SMA of that Datapoints over a given Period.
@Fat Tails: Wow - a big thanks for your effort - this is a comfortable way to check out and compare different MA-Versions of Bollinger-Bands.
Unfortunaly it did not answers my Question about visibility and the access of different (MA-)Dataseries when they are a public or private.
Greetings from Leipzig
Last edited by Trendseek; September 1st, 2010 at 09:53 AM.