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

Notification

Icon
Error

Options
Go to last post Go to first unread
kthakker0  
#1 Posted : Sunday, August 28, 2011 8:52:19 AM(UTC)
kthakker0

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 5/8/2010(UTC)
Posts: 28
Location: Mumbai (India)

Thanks: 1 times
Hi, I have an Expert Advisor which oscillates above and below the Zero line. My requirement is The indicator should change to Blue color when it goes above the zero line. Below mentioned formula is for Bullish Trend Mov(Fml("Swing Trd 1"),81,E)>0 The indicator should change to red when its below the zero line. Below mentioned formula is for Bearish Trend Mov(Fml("Swing Trd 1"),81,E)<0 This Swing Trd 1 is actually Rainbow Osc Can any one help??? Thks
jjstein  
#2 Posted : Sunday, August 28, 2011 9:18:01 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 only way to do this in Metastock is to plot values separately, though you can do this in the same indicator.


{* Plot *}
x:=Mov(Fml("Swing Trd 1"),81,E);
if(x>0,x,0);
x:=Mov(Fml("Swing Trd 1"),81,E);
if(x<0,x,0);


You then set LINE STYLE to Vertical Bars, then set COLOR separately for the bars above and below zero. You can also change the WEIGHT to increase thickness, which make the appearance closer to an area graph.

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.