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

[amibroker] Re: Null constant



PureBytes Links

Trading Reference Links

jerome,

à la fin de l'execution de la boucle ( barcount-1)
mo[i] ne sera jamais null sauf si une valeur a 4 jours de data
aussi test[i] ne donne jamais 1 mais zero.
fais une explore avec
for(i=0;i<BarCount;i++)
{
if(mo[i] >0 ) 
test[i] = 1;
}

stephane



> Hello,
> 
> Until yet, I have not succeeded in using the "Null" constant in for 
loops.
> In the simple following code, I would have expected the first 5 
bars of the
> "test" array to hold a "1" value. This is not the case, so the 
expression
> (mo[i] == Null) does not return a true result even when the MA(C,5) 
doesn't
> return any value. Is this by design or do I use this constant in a 
wrong way
> ?
> 
> Thank you in advance for any piece of help.
> 
> Best regards, Jérôme ULRICH
> 
> 
> -------------------------
> mo = MA(C,5);
> 
> test = 0;
> 
> for(i=0;i<BarCount;i++)
> 
> {
> 
> if(mo[i] == Null) test[i] = 1;
> 
> }
> 
> AddColumn(test,"test");
> 
> AddColumn(mo,"mo");
> 
> Filter = 1;
> 
> --------------------------


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/