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

[EquisMetaStock Group] Re: Problem with the IF function



PureBytes Links

Trading Reference Links

Again, 

Thanks for the help and teachings.

Fernando






--- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxx> wrote:
>
> 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 ----- 
>   From: Fernando Santos 
>   To: equismetastock@xxxxxxxxxxxxxxx 
>   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
>



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/