PureBytes Links
Trading Reference Links
|
Alberto,
Sounds like an IIf() function might do
it....
AddToComposite( iif(Foreign("C H2004",
"C" ) - Foreign("C Z2004", "C" )==0,ref(Foreign("C H2004", "C" ) - Foreign("C
Z2004", "C" ),-1),Foreign("C H2004", "C" ) - Foreign("C Z2004", "C" )) "~SPREAD
" + "C H-Z 04", "X" );
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Alberto
Torchio
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">AmiBroker
Sent: Wednesday, December 24, 2003 7:33
AM
Subject: [amibroker] Add To Composite
question
Dear TJ and Listmembers,I am using the following
formula to chart spreads:AddToComposite( Foreign("C H2004", "C" ) -
Foreign("C Z2004", "C" ), "~SPREAD " + "C H-Z 04", "X" );However, it
returns "0" value when the commodities don't trade: obviously the charts get
messed as you can see below...
How can I avoid that? The best would be to get either
the previous spread's price (that is the price for the previous day) or simply
to skip the date...
Merry Christmas to all!
Alberto
<IMG
src="bmp00017.bmp">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
Yahoo! Groups Links
To visit your group on the web, go to:<A
href="">http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:<A
href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
<BLOCKQUOTE
><FONT
face="Courier New">---Outgoing mail is certified Virus
Free.Checked by AVG anti-virus system (<A
href="">http://www.grisoft.com).Version: 6.0.555
/ Virus Database: 347 - Release Date:
12/24/2003
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
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Attachment:
Description: ""
|