[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Need Help On If function



PureBytes Links

Trading Reference Links

Yes, this is similar to what I did. The problem was that one color was
always plotting over another color at the 0 line. I ended up just adding a
null function that is always 0 and plotting it as a wide light gray for 0. I
plotted this on the chart last.

It seems the MS should add a plain If, then function to it's If, then, else.

neo


-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx
[mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of j seed
Sent: Friday, December 22, 2000 3:29 PM
To: metastock@xxxxxxxxxxxxx
Subject: Re: Need Help On If function


neo,
This will only work with an oscillator! Place the following at the end of
your formula and exchange your formula where indicated (not in brackets):

A:={YOUR CUSTOM FORMULA HERE};
Green:=If(A>Ref(A,-1),A,0);
Red:=If(A<Ref(A,-1),A,0);
Signal:=Mov(A,5,S);
Signal;
Green;
Red;

This will give you a red, green, and moving average. If you do not want the
moving average signal simply leave all signal references out of your
formula. Try placing a dark horizontal line at zero or add 0 to the end of
your formula so that 0 is the last thing plotted.

J.


>From: "neo" <neo1@xxxxxxxxx>
>Reply-To: metastock@xxxxxxxxxxxxx
>To: <metastock@xxxxxxxxxxxxx>
>Subject: Need Help On If function
>Date: Fri, 22 Dec 2000 11:02:45 -0500
>
>I am trying to use the If function to break an indicator in two so that it
>plots in green if up and red if down. The problem is that I do not see a
>pure If function. The only one is an If, Then, Else. If I put a 0 for else
>then I get a color dot there I do not want. Is there something that could
>be
>put there that would plot no color?
>
>I have thought about creating a null function that would plot in the same
>color as the background. Is there another way?
>
>neo
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com