I have an afl script output my exploration result to a csv file. However, when I am compare the exploration results and file output, the file output consistently has missing record. The missing record happens randomly. This problem is fixed when I restrict to single thread i.e. #pragma maxthreads 1
Here is the file output script in my AFL.
if ( Status( "stocknum" ) == 0 )
//Write lable once at the first line.
fh = fopen( "c:\\Users\\Peter\\Desktop\\Amibroker_Output_file\\"+file_name, "w",shared=True);
//Append subsequent line to the output file.
fh = fopen( "c:\\Users\\Peter\\Desktop\\Amibroker_Output_file\\"+file_name, "a",shared=True);