Hi,
I use the code below and AA to extract the data from Amibroker to a
text file. Then I convert it to Metastock format using a DOS program.
Is it possible to execute this dos executable programm directly from AFL ?
the command I use to convert ohlc.txt to metastock looks like this:
"asc2ms.exe -f ohlc.txt"
I want to execute the above command from the afl code below in the
place I market with #########
Can someone help me?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Buy = ( (DateNum() >= 1081005) AND (DateNum() <= 1081013) );
for( i = 0; i < BarCount; i++ )
if( Buy[i] )
{
fh = fopen( "C:\\Metastock\\Master\\OHLC.txt", "w");
if( fh )
{
y = Year();
m = Month();
d = Day();
r = Hour();
e = Minute();
for( i = 0; i < BarCount; i++ )
if( Buy[i] )
{
fputs( Name() + "," + "I"+ ",", 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,1\n",
O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );
fputs( qs, fh );
}
fclose( fh );
}
}
####################################
fdelete( "C:\\Metastock\\Master\\Emaster" ) ;