Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

new version of bollinger bands Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Glassmoons
Posted : Monday, August 21, 2006 1:14:54 PM
Registered User
Joined: 12/16/2004
Posts: 9
Hi... so I'm trying to add my own indicator, which basically is a Bollinger Band based on the range of the day (H-L) instead of the Close of the day. I found a formula for Bollinger bands and have adjusted it to suit my needs, but am having problems, most of which probably come from the complexity. In order to track this over the last 30 days, the whole thing comes to a ridiculous amount of code, which is made simpler by making separate PCF's initially, but the final PCF or Indicator has to contain all of the code. By breaking it into parts, I have tested the syntax, but then when i do something simple such as adding 2 of the parts, the syntax does not check out anymore...

So, i have a few questions:

1) Is there ANY sort of variable capabilities in the coding for PCF's so that I don't have to make it re-calculate the same numbers hundreds of times (i.e. L + ((H-L)/2) )?
2) Is there ANY sort of looping function in the code for PCF's?
3) Is there a simpler way of doing this than programming the whole thing from scratch?

All help is much appreciated...

-Jonathan
Craig_S
Posted : Monday, August 21, 2006 1:18:21 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Do you want to bands around the CENTER of the daily range or HALF of the daily range?



- Craig
Here to Help!
Glassmoons
Posted : Monday, August 21, 2006 1:37:46 PM
Registered User
Joined: 12/16/2004
Posts: 9
Around the Center of the range
Craig_S
Posted : Monday, August 21, 2006 1:41:34 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
(H-L)/2 is HALF the range.

(H+L)/2 is the center of the range.

Try this:

Add a CUSTOM INDICATOR with the following formula:

(H+L)/2

Be sure to select the PRICE SCALE option.

You can now EDIT your chart template and ADD Bollinger Bands to THAT custom indicator. I believe this is what you want.

Here are some videos to review:

Plotting Custom Indicators with Examples

Adding, removing and saving indicators to a chart template

- Craig
Here to Help!
Users browsing this topic
Guest-1

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.