Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/30/2005(UTC) Posts: 112
|
Hi,
I would like to code an indicator to show different colors showing upward / downward trends for upper and lower Bollinger Band (UBB & LBB), say red for upward trend while blue for downward..and the moving average is a constant color
It is possible?
Gary
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/24/2005(UTC) Posts: 17 Location: Chagrin Falls, Ohio USA
|
The quickest way to change colors on a Bollinger Band indicator is to post the indicator on your price clip, go to the line for which you want to change the color, left click on the line, and change the color in the Bollinger Band Color/Style panel.
Hope this helps,
Craig
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/30/2005(UTC) Posts: 112
|
Craig,
Thanks, but that will change the color of the line consistently.... I would like to plot a color for the two line of the bands for upward trend while another color for downward trend. I am sure that can be done, but I am pluzzling..
Gary
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
I have been able to do this in an expert, not in a template.
Go through some of the sample experts to see if you can find an example
you like to duplicate then just copy the code.
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/24/2005(UTC) Posts: 17 Location: Chagrin Falls, Ohio USA
|
Gary,
Not True!! If you click on the UBB, you can selectively change it's color versus the centerline and the LBB. Once you've changed the color of the UBB, click OK on the panel--you'll see the color change. Now change the color of the LBB the same way. I do this all the time with BBs at 1 and 2 sigma, and you can make the change. It's a little unwieldy but it works.
Now, you can't specify the default color pattern within an indicator that you've written, but you can save your indicator study to a template, and then apply the template to your new equity. Et voila'!
If you have problems with these directions, let me know, and I will give you the exact order. The directions above, though, should work.
Best regards,
Craig
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/24/2005(UTC) Posts: 17 Location: Chagrin Falls, Ohio USA
|
Gary,
Mea culpa...
I just saw that I misread your question. You're right...perhaps the Expert Advisor method may be the only way. I've not tried it, but it is certainly a clever approach.
Best regards,
Craig
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/30/2005(UTC) Posts: 112
|
Thanks Craig,
well, I think my requirement can be coded in some way....
can anyone help here?
Gary
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/30/2005(UTC) Posts: 112
|
johnl wrote:I have been able to do this in an expert, not in a template.
Go through some of the sample experts to see if you can find an example
you like to duplicate then just copy the code.
John, what expert do you use with this function?
Gar
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
Hold on a bit and I will dig up an example up for you.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
follow the url.. download and import the expert.. apply it to a chart. It will show you what you can do.
quick rsquared expert sample
h**p://s21.yousendit.com/d.aspx?id=23UZ10KC7YREN2NWRD2HXQTBFT
link is good for 7 days
change ** to tt
|
|
|
|
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.