I was looking for a formula to export amiborker data to metastock. i was searching the net all i got is the following formula but it does not work. can some one fix this AFL. Thanks
[/CODE]
/*
Export intraday and EOD data to TXT files
One file for each stock
In the first line insert the directory you want to save them to, make sure the
directory exists
Select your charts to export with the "Apply to" filter in AA window
Select the timeframe period you want to save as using the AA "Settings"
Press Scan button
by Graham Kavanagh 05 Feb 2004
*/
fh = fopen( "d:\\newfold\\msdata.txt", "a");
if( fh )
{
fputs( "<ticker>,<name>,<per>,<date>,<open>,<high>,<low>,<close>,<vol>\n",
fh );
y = Year();
m = Month();
d = Day();
for( i = 0; i < BarCount; i++ )
{
fputs( Name() +","+ Name() +",d," , fh );
ds = StrFormat("%02.0f%02.0f%02.0f,",
y[ i ], m[ i ], d[ i ] );
fputs( ds, 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;
[/code]
[/CODE]
/*
Export intraday and EOD data to TXT files
One file for each stock
In the first line insert the directory you want to save them to, make sure the
directory exists
Select your charts to export with the "Apply to" filter in AA window
Select the timeframe period you want to save as using the AA "Settings"
Press Scan button
by Graham Kavanagh 05 Feb 2004
*/
fh = fopen( "d:\\newfold\\msdata.txt", "a");
if( fh )
{
fputs( "<ticker>,<name>,<per>,<date>,<open>,<high>,<low>,<close>,<vol>\n",
fh );
y = Year();
m = Month();
d = Day();
for( i = 0; i < BarCount; i++ )
{
fputs( Name() +","+ Name() +",d," , fh );
ds = StrFormat("%02.0f%02.0f%02.0f,",
y[ i ], m[ i ], d[ i ] );
fputs( ds, 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;
[/code]