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

RE: [amibroker] Creating a text file - NEVER MIND. Figured it out.



PureBytes Links

Trading Reference Links

Ron,

 

Thanks.   Actually, I figured out something similar about 3 minutes ago.  (Great minds… :) 

 

In my case, I’m not interested in saving quote data, but simply the Estimated Earnings Date (at least in this iteration) plus other data.   If I understand the string handling functions correctly, it appears that multiple types of data could be saved in each file as a string pair.   The first member of the string pair would be a type identifier with the second member being the value.  For example, data in an “MSFT_Val.csv” file might be:

 

EstEarningDate,18-Aug-05

CurrentRSC,307

RSCMinus5,251

RSCMinus21,251

 

If this works, it might be a way of speeding up scans tremendously.    I.e., you’d populate the files in one scan and then use the data in other scans and charts.

 

Do you see any issues with this?  Better solution?

 

Thanks and regards,

 

Dan.

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of ronbo
Sent: Saturday, August 13, 2005 9:33 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Creating a text file - NEVER MIND. Figured it out.

 

here is an example Graham coded a while back.  use it as an example to do what you want.  it creates a .csv file for every symbol...

 

hth,

ron

 

/*

Export EOD data to CSV files One file for each stock

In the first line insert the directory you want to save them to, make sure the directory exists

Select your charts to export with the "Apply to" filter in AA window

Select the timeframe period you want to save as using the AA "Settings"

Press Scan button

by Graham Kavanagh 05 Feb 2004

Modified 4/1/2004 by ronbo to remove the Time column,

1. remove the dashes in the date

2. remove the Time column

3. customize the file location

*/

fh = fopen( "C:\\Program Files\\PFScan 2\\Data\\"+Name()+".csv ", "w");

if( fh )

{

fputs( "Ticker,Date,Open,High,Low,Close,Volume \n", fh );

y = Year();

m = Month();

d = Day();

for( i = 0; i < BarCount; i++ )

{

fputs( Name() + "," , fh );

ds = StrFormat("%04.0f%02.0f%02.0f,",

y[ i ], m[ i ], d[ i ] );

fputs( ds, fh );

qs = StrFormat("%.3f,%.3f,%.3f,%.3f,%.0f\n",

O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );

fputs( qs, fh );

}

fclose( fh );

}

Buy = 1;

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On Behalf Of Dan Clark
Sent: Saturday, August 13, 2005 9:09 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Creating a text file - NEVER MIND. Figured it out.

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dan Clark
Sent: Saturday, August 13, 2005 8:49 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Creating a text file

 

Hi,

 

I’m trying to read from and save data to a file.   There is an fdelete function, but I can’t find an fcreate function.  How do you CREATE a file in AFL if it does not already exist?  

 

Regards,

 

Dan.

 




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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software Stock investment software


YAHOO! GROUPS LINKS