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

Re: [amibroker] Ticker information import



PureBytes Links

Trading Reference Links

in this example only the stocks Issue data is imported, but just add
what you want near the bottom of the script file. Use the details as
spelt out in the AB help screens for OLE stuff. I will post summary of
this at bottom
Data as comma separated values in the order you import them
for below as example
ABCD,1000000000
EFGH,2000000000


/* change this line according to your data file name */
var filename = "issue.txt";

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();
 fields = r.split(","); /* split the lines using comma as a separator */
 stock = AmiBroker.Stocks.Add( fields[ 0 ] ); /* add a ticker - this
is safe operation, in case that ticker already exists, AmiBroker
returns existing one */
stock.Issue = fields[ 1 ];
// stock.IndustryID = parseInt( fields[ 2 ] );
}

/* refresh ticker list and windows */
AmiBroker.RefreshAll();
WScript.Echo("Industry Setup Finished" );


The other details that i have found that can be imported into the
information windows are (just rearranged fromm the help screens

Stock properties:

// Ticker Information window
Ticker : string 
Code : number 
Alias : string 
WebID : string (*new in 3.30) 
FullName : string 
Address : string 
//Country - ???
//Currency - ???
Issue : number //shares issued
MarketID : number 
//Par Value - ???
IndustryID : number - (*new in 3.40) 
BookValue : number 
GroupID : number 
RoundLotSize : number- (*new in 4.10) 
MarginDeposit : number- (*new in 4.10) 
TickSize : number- (*new in 4.10) 
PointValue : number- (*new in 4.10) 
Continuous : boolean 
Favourite : boolean 
Index : boolean 
DataSource : number- (*new in 3.90) //?? 
DataLocalMode : number- (*new in 3.90) //??


//Financial results window
FinanceYear( number Quarter ) : number 
FinanceIncome( number Quarter ) : number 
FinanceEBT( number Quarter ) : number 
FinanceEAT( number Quarter ) : number 

Quotations : object (collection) 
WatchListBits : number (*new in 3.70) - SEE NOTE 
WatchListBits2 : number (*new in 3.70) - SEE NOTE 
NominalValue : float 
IsDirty : boolean - (*new in 3.40) 




On 7/9/05, Terry <MagicTH@xxxxxxxxxxx> wrote:
> File -> Import Wizard.
> 
> --
> Terry
> 
> | -----Original Message-----
> | From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> | Behalf Of jeremy7827110028
> | Sent: Friday, July 08, 2005 11:15
> | To: amibroker@xxxxxxxxxxxxxxx
> | Subject: [amibroker] Ticker information import
> |
> | Is their a way to import a text file containing all of the fields in
> | the ticker information dialogue box and watch list assignments?
> |
> |
> |
> |
> | ------------------------ Yahoo! Groups Sponsor --------------------~--
> | >
> | Try Online Currency Trading with GFT. Free 50K Demo. Trade
> | 24 Hours. Commission-Free.
> | http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/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
> |
> |
> |
> |
> 
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
> 


-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/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/