handleout=FileOpen("Teste_Out_15_st_1.csv", FILE_CSV|FILE_WRITE, ","); Print ( " 2 ");
You've just created a zero length file so the following open/read is uselesswhile(FileIsEnding(Handle)==false) // While the file pointer.. { // ..is not at the end of the file registo ++; Str_DtTm =FileReadString(Handle);// Date and time of the event (date) if(FileIsEnding(Handle)==true) // File pointer is at the end break; // Exit reading and drawing
Why don't you want to process that last item? if(true==true) is redundant, likewise while(false==false) simplify while(!FileIsEnding(Handle)) // while not ending.for (tbar=nbar15-4;tbar>=7400;tbar--)
infinite loop tbar is counting down so tbar>=7400 will always be true.- why do you need two loops. read a record, process it, loop.
1) I have a WHILE loop to read the input file
2) FOR each record it must do some processing a write an output
WHRoeder:
-
You've just created a zero length file so the following open/read is useless
-
Why don't you want to process that last item? if(true==true) is redundant, likewise while(false==false) simplify while(!FileIsEnding(Handle)) // while not ending.
-
infinite loop tbar is counting down so tbar>=7400 will always be true.
- why do you need two loops. read a record, process it, loop.
1) I have a WHILE loop to read the input file
2) FOR each record it must do some processing a write an output
infinite loop tbar is counting down so tbar>=7400 will always be true.
Exactly. Many thanks.
Why don't you want to process that last item? if(true==true) is redundant, likewise while(false==false) simplify while(!FileIsEnding(Handle)) // while not ending.
I've decided to use FileReadArray so I close that file at once. The same for the output.
Thanks

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
1) I have a WHILE loop to read the input file
2) FOR each record it must do some processing a write an output
3) When the FOR is not in the script ALL the commands are executed
4) When the FOR is there the script "jumps" to the FOR and does not execute the previous lines
please give me a hand. Thanks