logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
lahara  
#1 Posted : Monday, February 06, 2017 6:15:58 AM(UTC)
lahara

Rank: Newbie

Groups: Registered, Registered Users, Unverified Users
Joined: 11/19/2009(UTC)
Posts: 2
Location: Brisbane

Is there a way, using the formula language when creating an indicator, to set the color(s) of that indicator? A different color could then be programmaticaly applied to, say, positive and negative indicator values.

wabbit  
#2 Posted : Monday, February 06, 2017 8:00:34 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,106
Location: Perth, Western Australia

Was thanked: 12 time(s) in 12 post(s)

The short answer is, no. The longer answer involves saying again, that the basic Metastock Formula Language does not allow any programmatic access to the user interface other to return value(s). A suggestion: you can workaround this (serious deficiency) by "splitting" your indicator into "parts" and then manually formatting each part as you like, then save the work as a template to avoid having to repeat these steps. e.g.

Code:

ind:=MACD();

positive:=ind * (ind>0);
negative:=ind * (ind<0);
signal:=Mov(ind, 9, E);

{plot}
positive; {make me histogram, green}
negative; {make me histogram, red}
signal; {make me line, blue}

Edited by user Thursday, April 20, 2017 8:44:14 AM(UTC)  | Reason: Fixed code tags

lahara  
#3 Posted : Monday, February 06, 2017 9:26:11 PM(UTC)
lahara

Rank: Newbie

Groups: Registered, Registered Users, Unverified Users
Joined: 11/19/2009(UTC)
Posts: 2
Location: Brisbane

Thank you wabbit, for your reply. I have used the method of "splitting" the indicator and then changing the color. I was hoping that someone had come up with a better method. The ability to have, for an indicator (or even a security price), automatically applied different colors for positive and negative, or rising and falling values, would, in my view, be an improvement. I would like to see that in an upcoming version of Metastock.
Users browsing this topic
Similar Topics
Unable to change Indicator Colors (MetaStock)
by slipperx 4/11/2007 11:49:47 PM(UTC)
How to change indicator colors [RESOLVED] (MetaStock)
by peter_zyn 5/5/2005 12:25:35 AM(UTC)
Multiplot indicator colors (Formula Assistance)
by BitTwiddler 2/17/2005 6:09:47 PM(UTC)
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.