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

Re: [amibroker] Some strange addition rules



PureBytes Links

Trading Reference Links




Dimitris,
 
The {empty} ( or  Null) in AmiBroker works as NULL in the 
databases.
 
When any part of arithmetic expression is NULL the entire 
expression becomes NULL.
Null (empty) means in fact "UNKNOWN" 
If you add 2 + UNKNOWN the result is 
still UNKNOWN.
 
For example for the first 20 bars the value of MA( Close, 20 ) 
is UNKNOWN (empty).
 
As for DB examples see:
<A 
href="">http://msdn.microsoft.com/library/default.asp?url="";>
 
 
AB 4.29.8 features new function Nz
<A 
href="">http://www.amibroker.com/guide/afl/afl_view.php?name=NZ
 
that allows to easily convert Null (empty) to 
zero:
 
Nz( Foreign("RATL","O") ) + Nz( Foreign("CSCO","O") 
)
Best regards,Tomasz 
Janeczkoamibroker.com
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Dimitris 
  Tsokakis 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, March 06, 2003 11:37 
  AM
  Subject: [amibroker] Some strange 
  addition rules
  
  I noticed that
  {empty}+X={empty}
  X+{empty}={empty}
  One should expect {empty}+X=X.
  Consequently, special care should be taken with similar 
  additions [or subtractions, multiplications, divisions]
  If you try to add Foreign("RATL","O")+Foreign("CSCO","O") 
  and the RATL data is missing for a certain bar, the result would be 
  {empty}
  instead of the expected Foreign("CSCO","O") 
  Dimitris TsokakisSend 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT  









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.