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

Re: Need Help On If function



PureBytes Links

Trading Reference Links

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