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

Re: [EquisMetaStock Group] Problem with the IF function



PureBytes Links

Trading Reference Links

Hi Fernando
 
 
Adding in the line below will give an additional output when plot=3. when plot<>3 this line will return N/A. There is no way you can force an If() function on its own to plot more than one output.
 
ValueWhen(1,plot=3,OPEN);
 
As for the colours that an indicator uses, once assigned separate colours individual plots will change colour as plots are added or removed. For example, if your indicator was set up to plot its 3 outputs as RED, WHITE and BLUE (first, second and third plots), if one plot is disabled (as with the ValueWhen() example above) the indicator will only use colours WHITE and BLUE. If only one plot is enabled it will be BLUE. I think that ensuring that colours remain consistent becomes a matter of properly choosing where each output is located relative to the other outputs. However, you might not want to make the last output one that can return N/A because this makes it impossible to read off values in the data window or with the cursor placed over the indicator.
 
Hope this helps.
 
 
Regards
 
Roy
 
 
----- Original Message -----
Sent: Monday, September 22, 2008 7:25 AM
Subject: [EquisMetaStock Group] Problem with the IF function

Considering this:

{ User Inputs }
plot:=Input("plot: [1]Hi/Lo [2]Open [3]All",1,3,3);

{ Plot in own window }
if(plot=1,HighP,if(plot=2,OpenP,HighP));
if(plot=1,LowP,if(plot=2,OpenP,LowP));

How can I include now the Open so when plot=3 he plots all(the High,
the Low and the Open)?

I'm banging my head on the table for the past hour and I just can't
see the solution.

Another question, when plot=2 I color it green so I can distinguish it
from the high and the low but when plot=1 the Low is the green color
instead of red. Shouldn't the green color be used only for the open,
since that was the color I chose for it? Is this issue related with
the way the IF function was written above?

regards



__________ NOD32 3458 (20080921) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com
__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___