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

RE: [amibroker] How to get today's index open



PureBytes Links

Trading Reference Links

First, you are getting more than the current bar, which is OK. You are
getting the entire price array. Just do the same for each price (and
volume if you want it).

IndexClose =Foreign("compx","Close",fixup=0);
IndexOpen  =Foreign("compx","Open",fixup=0); 
IndexLow   =Foreign("compx","Low",fixup=0);

PS: Graham's solution is the other way to get foreign ticker data and is
more useful when you need to run a bunch of computations on the foreign
symbol to get a result that you save before doing the Restore()
--
Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of fox97us
Sent: Tuesday, May 23, 2006 22:20
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] How to get today's index open

I have an intraday database of 5 min intervals.  When I do stock 
calculation, I like to know the index performance. How can I get the 
value of (Today's index open / index's close price of current 5 min)?

I can use the following to get the close price of the index. But how 
can I get the today's open price of the index? I tried TimeFrameGetPrice
( ) and settimeframe to daily, but both return the open of the 5-min 
bar instead of the open of today. I must did something wrong. 

IndCurrentBarClose =Foreign("compx","close",fixup=0);

Thanks a lot

Fox97us








Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links



 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

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