Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/4/2005(UTC) Posts: 63 Location: Poole Dorset England
|
Hello All.
Need some help.My formula language is about as good as my French! Merci :-) I tend to like Histograms from a visual point (Colour Coded, Green for Up, Red For Down, see an attached jpeg of 1 of my Templates, with a rough idea of the intented Bollinger Band Indicator).
I would like to try a Bollinger Band Colour Coded Histogram. I can't seem to see anything out there on the net.
1 came close, which is from;
http://trader.online.pl/...nger_Band_Histogram.html
Formula;
((C+2*Std(C,20) - Mov(C,20,S)) / (4*Std(C,20)))*4 - 2
It's close to what I'm looking for, but
1. the histogram is one colour(Red) when I would like it to be Green for Up, Red for Down.
2. Auto add Horizontal lines in Blue,(-2 &+2 & 0) instead of having to add them Manually.
Also if possible, when building the indicator Formula, is it possible to add a 1 or 2 function(In the Parameters Field); 1 just to show the BBand Histogram Colour Coded with Horizontal Lines auto added, but a number 2 to also add a Bollinger Band Oscillator onto the Bollinger Band Histogram in a different colour which helps it stand out more.
See my attached Template for a rough idea as to what I'm trying to achieve.(Hope this is all making sense:-)
As to the Bollinger Band Osc Formula, I used this in my template;
((C+2*Std(C,21)-Mov(C,21,S))/(4*(Std(C,21)))*100)
Which seems to tie in with the BBand Histogram, and plot on top nicely.
Hope someone can help
Many Thanks
The Ghost:-)
PS,.
I found 5 different Bollinger Band Oscilators on;
http://trader.online.pl/MSZ/e-0-tytulowa-b.html
All different formulas to the one I've used!
Not too sure how they compare.
Maybe it might also be possible to have a few more adjustments in the properties box, tab- parameters,(Similar to Mr Jose's Excellent "Keltner & Bollinger Bands " Indicator).
http://www.metastocktool...om/MetaStock/Keltner.txt
See attached Jpeg to Clarify,
to adjust,
periods,
deviations etc
Only a final Thought:-)
Many Thanks again
The Ghost:-)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
Dear Ghost,
Just what portion of the Bollinger Bands are you trying to develope into a histogram?
Are you looking for the spread between the bands themselves?
The difference of the close in relation to the upper and lower bands?
In a MACD the histogram is the difference of the signal line and the MACD itself.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
The formula below is the difference between the upper and lower bands
BBT:=BBandTop(C,20,S,2);
BBB:=BBandBot(C,20,S,2);
Spread:=BBT-BBB;
Green:=If(Spread>=Ref(Spread,-1),Spread,0);
Red:=If(Spread<Ref(Spread,-1),Spread,0);
Green;Red;
Plot in it's own window, color each line in different colors and then save as a template
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
A:=((C+2*Std(C,20) - Mov(C,20,S)) / (4*Std(C,20)))*4 - 2;
Green:=If(A>=Ref(A,-1),A,0);
Red:=If(A<Ref(A,-1),A,0);
2;0;-2;Green;Red;
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/4/2005(UTC) Posts: 63 Location: Poole Dorset England
|
Thanks for the quick reply Henry.
It is the type of settings that I'm looking for.
I do have a few problems setting it up though.
(See attached jpeg).
1. Is there anyway the formula can be written to auto colour the histogram Green for Up & Red for Down?
2. I can't seem to colour the Lower Horizontal Line say in Blue? Was able to change the upper one.
(When I inserted the arrow pointing to the histogram, I tried to change that to red and that didn't change colour also??).
So I tried Colouring the Lower BBand Horizontal Line to blue from the BBand Osc Properties Box, uner Horizontal Lines, in which I inserted +2 & -2. It then coloured It's -2 Line blue, and it seemed to colour the Histogram Lower Horizonal Line Blue also, with some variation between the 2 lines?? (See Attached Jpeg).
I'm not too sure if I want to plot the BBand Osc over the top of the colour coded BBand Histogram or not as it is pictured in the Jpeg.
Is there any way of creating this so that I have an option in the Properties Dialog box under Parameters? ie. 1 to show Coloured BBand Histogram. 2. To show BBand Osc. 3 To show Coloured BBand Histgram & BBand Osc on Top? (Similar to Mr. Jose's "Keltner & Bollinger Bands Properties" Box? (See Attached Jpeg).
It's almost there Henry. I did read a post where someone had tried to just colour code the BBand Histogram, but couldn't for some reason.(Read Lower Part Of This Link)
http://trader.online.pl/...nger_Band_Histogram.html
Thanks for the quick reply again, and your effort in this Henry.
It is above me for sure this type of programming I'm affraid.
Hope you can help
Many thanks again
TheGhost
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/4/2005(UTC) Posts: 63 Location: Poole Dorset England
|
Apologies for some mis information on the above.
I have played with the colouring of the horizontal lines again, and they
have coloured correctly.
My mistake. (See attached jpeg of Henry1234 Coloured Histogram & BBand Osc
Pltted on Top
Sorry for this, but I hope some of the above can still be done if poss, IE
auto colour, and a properties box with the option to auto add Hist or Osc
or Both.
Many thanks to Henry1234 again for this
The Ghost.
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.