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

Re: [amibroker] Precedence in Iif statement



PureBytes Links

Trading Reference Links


Waz,
 
Yes, the first match is a valid one.
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Listes 
trading 
To: <A title=amibroker@xxxxxxxxxx 
href="">AmiBroker 
Sent: Tuesday, April 23, 2002 3:02 
PM
Subject: [amibroker] Precedence inIif 
statement

<SPAN 
class=162135112-23042002>Tomasz
<SPAN 
class=162135112-23042002> 
I have a set of 
stocks which belong to different indexes (Index0, Index1,Index2,...). Foreach 
index, I have a watchlist containing all the stocks of the index (watchlist0 
forIndex0,...). Each stock can belong to several indexes, so to several 
watchlists.
My purpose is 
to select automatically an index corresponding to a 
stock.
To do 
this, I write:

<SPAN 
class=162135112-23042002>Index= <FONT 
color=#3cb371>WriteIf(<FONT 
color=#3cb371>InWatchList(<FONT 
color=#282828>0),"<SPAN 
class=162135112-23042002>Index0",<SPAN 
class=162135112-23042002> <FONT 
color=#3cb371>WriteIf(<FONT 
color=#3cb371>InWatchList(<FONT 
color=#282828>1),"<SPAN 
class=162135112-23042002>Index1",<SPAN 
class=162135112-23042002> <FONT 
color=#3cb371>WriteIf(<FONT 
color=#3cb371>InWatchList(<FONT 
color=#282828>2),"<SPAN 
class=162135112-23042002>Index2",<SPAN 
class=162135112-23042002>....<FONT 
color=#0000ff>);
<FONT color=#000080 
size=2>What will happen for a stock belonging to Index0 AND Index1? I 
guess that it will be assigned to Index0 as all the other "writeif" statement 
will be ignored if the first one is true.
<FONT color=#000080 
size=2>Do you confirm?
<FONT color=#000080 
size=2>WazYour 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.