Hi,
I am using real time feed in amibroker.
Below the AFL that I am facing issue with. When I attach the AFL to the
chart, it dumps the last candle (any timeframe) data in a file. But the value
dumped in the file is way too different from what I see on the chart for the last candle. Anyone has nay clue if my script has any issue????
_SECTION_BEGIN("Write Data");
filename = "c:\\stock.txt";
{
ttime=TimeNum();
fh = fopen( filename, "w");
if( fh )
{
m = Month();
d = Day();
y = Year();
qs = StrFormat("%.2f, %.2f, %.2f, %.2f, %.0f\n",
O[ 1], H[ 1 ], L[ 1], C[ 1],ttime );
fputs( qs, fh );
fclose( fh );
}
}
_SECTION_END();
I am using real time feed in amibroker.
Below the AFL that I am facing issue with. When I attach the AFL to the
chart, it dumps the last candle (any timeframe) data in a file. But the value
dumped in the file is way too different from what I see on the chart for the last candle. Anyone has nay clue if my script has any issue????
_SECTION_BEGIN("Write Data");
filename = "c:\\stock.txt";
{
ttime=TimeNum();
fh = fopen( filename, "w");
if( fh )
{
m = Month();
d = Day();
y = Year();
qs = StrFormat("%.2f, %.2f, %.2f, %.2f, %.0f\n",
O[ 1], H[ 1 ], L[ 1], C[ 1],ttime );
fputs( qs, fh );
fclose( fh );
}
}
_SECTION_END();
Last edited: