PureBytes Links
Trading Reference Links
|
I will try to answer your query as I understand it.
You can import the ticker codes into AB and place them into which Market you
want. Rename the Market lists to reflect the relevant exchange.
If you have a CSV or TXT file (below called Markets.csv in the script) with
the ticker codes and next to each the relevant MarketID (0,1,2 etc) use the
script file similar to the industry setup script. I have assumed you are
using one databse for both, but otherwise it is best to have separate
databases for different exchanges in case the ticker codes are the same.
Maybe amiquote can do this all automatically, but I do not use it so maybe
try the amiquote yahoo group, address is at bottom of emails,
Place both the js file and the csv file in the same directory, I use the
Amibroker/scripts directory.
The file should read something like this example
AAA,0
AAB,0
AAC,1
AAD,2
With AB open double click the js file and the markets should be set up. You
can do similar with industries from where this script file is used normally.
/*name the js file markets.js as example*/
/* change this line according to your data file name */
var filename = "Markets.csv";
var fso, f, r;
var ForReading = 1;
var AmiBroker;
var fields;
var stock;
/* Create AmiBroker app object */
AmiBroker = new ActiveXObject( "Broker.Application" );
/* ... and file system object */
fso = new ActiveXObject( "Scripting.FileSystemObject" );
/* open ASCII file */
f = fso.OpenTextFile( filename, ForReading);
/* read the file line by line */
while ( !f.AtEndOfStream )
{
r = f.ReadLine();
/* split the lines using comma as a separator */
fields = r.split(",");
/* add a ticker - this is safe operation, in case that */
/* ticker already exists, AmiBroker returns existing one */
stock = AmiBroker.Stocks.Add( fields[ 0 ] );
stock.FullName = fields[ 1 ];
stock.MarketID = parseInt( fields[ 2 ] );
}
/* refresh ticker list and windows */
AmiBroker.RefreshAll();
WScript.Echo("Market Setup Finished" );
Cheers,
Graham
http://groups.msn.com/asxsharetrading
http://groups.msn.com/fmsaustralia
-----Original Message-----
From: ertan_can [mailto:chiko@xxxxxx]
Sent: Saturday, 10 January 2004 7:37 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Newbie
thanx for the link to the newsletter, but there is no help to my
question.
A question to all here! How can you set up all major international
markets in amibroker??? I think after setting up the markets and the
stocks belonging to the markets, amiquote gets automatically the
quotes for this markets. But how can I set up the markets?
can
rom: "RR" <stocks@xxxx>
Date: Sat Jan 10, 2004 12:24 am
Subject: RE: [amibroker] Re: NEWBIE
ADVERTISEMENT
http://www.amibroker.com/newsletter/04-2000.html
-----Original Message-----
From: ertan_can [mailto:chiko@xxxxxx]
Sent: Friday, January 09, 2004 5:17 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: NEWBIE
graham thanx for your answer, but I did look at the help sections for
hours, I just want to set up all international major exchanges,
without searching every single ticker-symbol. There is nothing in the
help section about this. Does anyone know how to set up for example
the dax30 or the ftse100 etc. automatically with amiquote? How can I
set up all the markets? Is this possible with amibroker/amiquote?
thanx to all
can
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 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/
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 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/
|