Export Intraday Data.afl

rkgoyal_98

Well-Known Member
#1
Dear Friends,

I want to export Intraday data from AMIBROKer and using this AFL.

//
//------------------------------------------------------------------------------


/*
Export intraday and EOD data to TXT 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
*/

fh = fopen( "c:\\IntradayData\\"+Name()+".txt", "w");
if( fh )
{
fputs( "Ticker,Date,Time,Open,High,Low,Close,Volume \n", fh );
y = Year();
m = Month();
d = Day();
r = Hour();
e = Minute();
n = Second();

for( i = 0; i < BarCount; i++ )
{
fputs( Name() + "," , fh );
ds = StrFormat("%02.0f/%02.0f/%02.0f,",
m[ i ], d[ i ], y[ i ] );
fputs( ds, fh );

ts = StrFormat("%02.0f:%02.0f:%02.0f,",
r[ i ],e[ i ],n[ i ] );
fputs( ts, fh );

qs = StrFormat("%.2f,%.2f,%.2f,%.2f,%.0f\n",
O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );
fputs( qs, fh );
}

fclose( fh );
}

Buy = 0;


In the Apply to Section i am selecting all symbols and and in the range i am selecting current date.

However the files generated afterscan are showning EOD data. i am enclosing one of the fle here. Kindly help me in telling what i a doing wrong

Thanks
 
Last edited:

cooltetra

Active Member
#2
Try changing the time frame to what ever u want(say 5 mins) and then run the exploration. Hope you are trying this on an intraday database :D

Best Regards
Coool.
 

Similar threads