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

[amibroker] Subscript out of range



PureBytes Links

Trading Reference Links

I am using code below to export RT data to a disk file, in a format that I can later import into AB.
 
The output is OK for a few bars, then I get error "subscript out of range..."
 
Thanks
 
Ara
 

//File: UTIL - Export data

//Version 1.0

//December 15, 2005

Path = "D:\\Data\\Amibroker\\AB Data\\" + Name() + ".csv";

fh = fopen(Path,"w");

if( fh )

{

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

for( i = 0; i < LastValue(BarIndex()); i++ )

{

Date_ = DateNum();

Time_ = TimeNum();

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

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

fputs( qs, fh );

}

fclose( fh );

}

 

 



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