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

[amibroker] AUTOMATIC EXPORT IN CSV FILE - WITH FOPEN/FPUTS/FCLOSE


  • Date: Wed, 17 Feb 2010 18:52:51 -0000
  • From: "Twingo445" <twingo445@xxxxxxxx>
  • Subject: [amibroker] AUTOMATIC EXPORT IN CSV FILE - WITH FOPEN/FPUTS/FCLOSE

PureBytes Links

Trading Reference Links

Hi .


i know there are a lot of scripts for exporting the quotes of different stocks of all days to different files.

But i want to export f.i. 30 stocks O/H/L/C... data for the last weeks to only "1" csv file.

Anybody can give me a solution for this ?

Thats what i have so far.



_SECTION_BEGIN("EXPORT-CSV");


fh = fopen( "X:\\MySQL Indizes\\dax.csv", "w");

CloseYTDCheck = Year() != Ref( Year(), 1);
CloseYTD = ValueWhen( CloseYTDCheck, Close);

TimeFrameSet( inWeekly ); 
CloseWeek = Ref( Close, -1);
TimeFrameRestore();

YTDPerf = (100 * Close / CloseYTD) -100;
LASTWEEKPerf = (100 * Close / CloseWeek) -100;



NumColumns=8;
Filter=InWatchListName("DAX"); 
Column0=Close;
Column0Name="Close";
Column1=Open;
Column1Name="Open";
Column2=High;
Column2Name="High";
Column3=Low;
Column3Name="Low";
Column4=FullName();
Column4Name="NAME";
Column5=Low;
Column5Name="ISIN";
Column6=YTDPerf;
Column6Name="CloseYTD";
Column7=LASTWEEKPerf;
Column7Name="Close5D";


Line=Name()+

StrFormat(";%02.0f.%02.0f.%04.0f;%g;%g;%g;%g;%g;%g;%0.2f;%0.2f\n",

Now(),
Close,
Open,
High,
Low,
Low,
Low,
YTDPerf,
LASTWEEKPerf);



fputs(Line,fh);



fclose( fh ); 


_SECTION_END();


I need to find the way to export 30 different stock data from last week or this week into only one CSV file!

Thanks in advance.

Thomas



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/