_section_begin("NTexport");
fmkdir( "C:\\SaveData" );
Buy = Status( "barinrange" );
for( i = 0; i < BarCount; i++ )
if( Buy[i] )
{
fh = fopen( "C:\\SaveData\\"+Name()+".txt", "a");
if( fh )
{
y = Year();
m = Month();
d = Day();
r = Hour();
e = Minute();
n = Second ();
for( i = 0; i < BarCount; i++ )
if( Buy[i] )
{
ds = StrFormat("%02.0f%02.0f%02.0f %02.0f%02.0f%02.0f;",
y[ i ],m[ i ],d[ i ],r[ i ],e[ i ],n[ i ] );
fputs( ds, fh );
qs = StrFormat("%g,%g,%g,%g,%1.0f\n",
O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );
fputs( qs, fh );
}
fclose( fh );
}
}
_section_end();