// R M
// http://www.traderji.com/technical-analysis/69380-charts-day-130.html#post977652
// In the second line you have to change the required dates for data export, e.g., Buy = ( (DateNum() >= 1140601) AND (DateNum() <= 1140630) here export is from 01-06-2014 to 30-06-2014.
fmkdir( "C:\\OHLC" );
Buy = ( (DateNum() >= 1010101) AND (DateNum() <= 1150218) AND (TimeNum() > 090000) AND (TimeNum() < 170000) );
for( i = 0; i < BarCount; i++ )
if( Buy[i] )
{
fh = fopen( "C:\\OHLC\\"+Name()+".txt", "a");
if( fh )
{
y = Year();
m = Month();
d = Day();
r = Hour();
e = Minute();
for( i = 0; i < BarCount; i++ )
if( Buy[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,",
r[ i ],e[ 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 );
}
}
// R M
// http://www.traderji.com/technical-analysis/69380-charts-day-130.html#post977652
// In the second line you have to change the required dates for data export, e.g., Buy = ( (DateNum() >= 1140601) AND (DateNum() <= 1140630) here export is from 01-06-2014 to 30-06-2014.
fmkdir( "C:\\OHLC" );
Buy = ( (DateNum() >= 1010101) AND (DateNum() <= 1150218) AND (TimeNum() > 090000) AND (TimeNum() < 170000) );
for( i = 0; i < BarCount; i++ )
if( Buy[i] )
{
fh = fopen( "C:\\OHLC\\"+Name()+".txt", "a");
if( fh )
{
y = Year();
m = Month();
d = Day();
r = Hour();
e = Minute();
for( i = 0; i < BarCount; i++ )
if( Buy[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,",
r[ i ],e[ 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 );
}
}