Hello experts, Can anybody help me export one minute data from amibroker to csv. I hve a afl which earlier worked very nicely after selecting it on New Analysis window and then click Scan. But for long it stopped working. I am unable figure out the problem. Here is my afl:
Code:
fh = fopen( "c://AmiBackupOnemin//"+Name()+".csv", "w");
if( fh )
{
fputs( "Ticker,Date,Open,High,Low,Close,Volume
", 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,",
y[ i ], m[ i ], d[ i ] );
fputs( ds, fh );
ts = StrFormat("%02.0f:%02.0f:%02.0f,",
r[ i ],e[ i ],n[ i ] );
fputs( ts, fh );
qs = StrFormat("%.4f,%.4f,%.4f,%.4f,%.0f\n",
O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );
fputs( qs, fh );
}
fclose( fh );
}
Buy = 0;