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

Notification

Icon
Error

Options
Go to last post Go to first unread
peter_zyn  
#1 Posted : Thursday, May 5, 2005 12:25:35 AM(UTC)
peter_zyn

Rank: Newbie

Groups: Registered, Registered Users
Joined: 5/5/2005(UTC)
Posts: 5
Location: Australia

How do I attach different colors to an indicator I have written, on a line chart.eg. If value increasing COLOR GREEN If value decreasing COLOR RED Is there a code for Color regards peter_zyn
wabbit  
#2 Posted : Thursday, May 5, 2005 11:22:34 AM(UTC)
wabbit

Rank: Advanced Member

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

Was thanked: 16 time(s) in 16 post(s)
You cannot change the colour of an indicator, only each bar on the price chart by using an expert highlight. What you can do, though, is combine indicators: x:=mov(c,21,s); up:=if(x>ref(x,-1),x,0); dn:=if(x<=ref(x,-1),x,0); up {colour me green}; dn {colour me red}; Hope this helps wabbit :D
peter_zyn  
#3 Posted : Sunday, May 8, 2005 11:38:05 PM(UTC)
peter_zyn

Rank: Newbie

Groups: Registered, Registered Users
Joined: 5/5/2005(UTC)
Posts: 5
Location: Australia

wabbit wrote:
You cannot change the colour of an indicator, only each bar on the price chart by using an expert highlight. What you can do, though, is combine indicators: x:=mov(c,21,s); up:=if(x>ref(x,-1),x,0); dn:=if(x<=ref(x,-1),x,0); up {colour me green}; dn {colour me red}; Hope this helps Thank You Wabbit, much appeciated Regards peter_zyn wabbit :D
skeetabomb  
#4 Posted : Monday, May 9, 2005 11:19:13 PM(UTC)
skeetabomb

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/28/2005(UTC)
Posts: 41
Location: London

Peter, One thing to remember is that when Metastock draws the chart on the screen, it plots the indicators in the order they are written in the formula. Think of each plot as being a transparent sheet of plastic which has the indicator drawn on it. Metastock lays the sheets down one by one from top to bottom. So if the last plot written in your formula is the same value as the first one and it is invisible, it will cause the first plot to dissappear. Cheers, SteveD :wink:
samjohn  
#5 Posted : Thursday, August 30, 2012 6:53:57 AM(UTC)
samjohn

Rank: Member

Groups: Registered, Registered Users
Joined: 8/30/2012(UTC)
Posts: 11

Does this mean that I have to create one Indicator and one EA?

Use of EA is to color the MA lines differently and Indicator is to compute values?

Do I have to work in C++ or other language to accomplish this?

jjstein  
#6 Posted : Thursday, August 30, 2012 10:51:32 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
The Expert can color price bars. You cannot color line-style indicators based on value. If you use the Vertical Bar-style (histogram), you CAN color based on value, as seen in the example.
samjohn  
#7 Posted : Saturday, September 1, 2012 9:38:46 AM(UTC)
samjohn

Rank: Member

Groups: Registered, Registered Users
Joined: 8/30/2012(UTC)
Posts: 11

When you are placing text in comments, it is just a hint to the person, right? It may sound odd but at first, I thought it is a special syntax within MSFL to interpret. I wish MS had function plot(DATA ARRAY, COLORREF, LINEstyle, LINEWidth) that I could embed within indicator!!
jjstein  
#8 Posted : Saturday, September 1, 2012 1:36:20 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
samjohn wrote:
When you are placing text in comments, it is just a hint to the person, right?
Yes.
samjohn wrote:
I wish MS had function plot(DATA ARRAY, COLORREF, LINEstyle, LINEWidth) that I could embed within indicator!!
That would be handy. However, it's not too much trouble to set a color/style. When you plot two or more variables in one indicator, bear in mind that you must first click the item to alter, change the color/style, then click on an empty place in the chart, THEN click the 2nd (or 3rd, 4th, etc.) item, change the color/style, and so on.
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.