PureBytes Links
Trading Reference Links
|
Jerome,
I see your point.
Since [i] is an array counter and not a bar counter, the array
for MA(C,5) is valid from Array[0] but not from Bar[0].
Someone has a solution, unfortunately I don't.
-Corey Saxe
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Silvarius
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Friday, November 28, 2003 9:55
AM
Subject: RE: [amibroker] Null
constant
<FONT face=Arial color=#0000ff
size=2>Corey,
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Thank you for your answer.
<FONT face=Arial color=#0000ff
size=2>
I
know actually the IsNull() etc ... functions, but I need also a mean to test a
null value in a for loops. The code was just given as a simple
example.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Jérôme ULRICH
<FONT face=Tahoma
size=2>-----Message d'origine-----De : CS
[mailto:res1wgwl@xxxxxxxxxxx]Envoyé : vendredi 28 novembre
2003 18:12À : <A
href="">amibroker@xxxxxxxxxxxxxxxObjet :
Re: [amibroker] Null constant
Jerome,
You don't need to go through the complexity
of a FOR loop.
test=<FONT
color=#ff0000>IIf(<FONT
size=2>IsNull(mo),1<FONT
size=2>,0<FONT
size=2>);
Plot<FONT
color=#ff0000>(test,"Null=1"<FONT
size=2>,colorblue,1<FONT
size=2>);
There are several functions for testing presence
of valid data:
IsNull
IsEmpty
IsFinite
Nz
IsNaN
IsTrue...
-Corey Saxe
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Jérôme
ULRICH
To: <A
title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Friday, November 28, 2003 7:16
AM
Subject: [amibroker] Null
constant
<FONT face=Arial
size=2>Hello,
<FONT face=Arial
size=2>
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 ?
<FONT face=Arial
size=2>
Thank you in
advance for any piece of help.
<FONT face=Arial
size=2>
Best regards,
Jérôme ULRICH
<FONT face=Arial
size=2>
<FONT face=Arial
size=2>
<FONT
size=1><FONT
size=1>-------------------------
mo = MA(C,<FONT
face="Courier New" color=#ff00ff>5);<FONT
face="Courier New">
test = <FONT face="Courier New"
color=#ff00ff>0;<FONT
face="Courier New" color=#800000>
for<FONT
face="Courier New">(i=<FONT face="Courier New"
color=#ff00ff>0<FONT
size=3>;i<BarCount;i++)
{
<FONT
size=3>if(mo[i] ==
Null) test[i] = <FONT face="Courier New"
color=#ff00ff>1<FONT
size=3>;
}
AddColumn<FONT
face="Courier New">(test,<FONT face="Courier New"
color=#ff00ff>"test"<FONT
face="Courier New">);<FONT face="Courier New"
color=#0000ff>
AddColumn<FONT
face="Courier New">(mo,<FONT face="Courier New"
color=#ff00ff>"mo"<FONT
size=3>);
Filter = <FONT
size=3>1<FONT
face="Courier New" size=1>;<FONT
size=+0>
<SPAN
class=437544714-28112003>--------------------------<FONT
size=+0>
<IMG
src="bmp00014.bmp"><FONT
face="Courier New" size=3><SPAN
class=437544714-28112003>Send
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.
Send 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.
Send
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
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.
Attachment:
Description: ""
|