OnInit works strangely in the indicator. If terminal is started after long inactivity (several hours), EventSetTimer returns false, error 4102. If I restart the terminal or just change timeframe, it starts working. How do I fight it?
OnInit works strangely in the indicator. If terminal is started after long inactivity (several hours), EventSetTimer returns false, error 4102. If I restart the terminal or just change timeframe, it starts working. How do I fight it?
Multiple attempts to set the timer (e.g. in a loop) since ERR_CHART_NO_REPLY(4102) is possible, especially on terminal upswing.
Question for the developers. Previously, in the properties of the indicator in the "Apply to" menu, in addition to everything else listed, you could select "data of the first indicator". Now it is not possible to do this:
Can you please tell me how FileReadString() function moves file pointer when reading from .csv file ? When I read one character, the pointer is shifted 142 characters to the right - beyond the end of the file. If you need, I can lay out the code.
OnInit works strangely in the indicator. If terminal is started after long inactivity (several hours), EventSetTimer returns false, error 4102. If I restart the terminal or just change timeframe, it starts working. How do I fight it?
OnInit works strangely in the indicator. If terminal is started after long inactivity (several hours), EventSetTimer returns false, error 4102. If I restart the terminal or just change timeframe, it starts working. How do I fight it?
Question for the developers. Previously, in the properties of the indicator in the "Apply to" menu, in addition to everything else listed, you could select "data of the first indicator". Now it is not possible to do this:
Is it removed for some reason?
Please tell me how FileReadString() moves the file pointer when reading from a .csv file
When reading any file with any function, the pointer is moved to the number of bytes read.
when reading any file with any function, the pointer moves by the number of bytes read.
Then tell me what I'm doing wrong, the pointer is shifted wrong, here is the code
The following lines appear in the log
2011.05.24 21:44:06 read_test (EURUSD,M1) 1 142
2011.05.24 21:44:06 read_test (EURUSD,M1) 0 286
file01.csv file contents:
1;2;3;5;1.41299999;1.41250002;1.41199994;1.41149998;2011.05.24 17:23;5
add FILE_ANSI
added:
the result has changed, but still not the one you expect - the second line has only changed
2011.05.24 22:01:32 read_test (EURUSD,M1) 1 142
2011.05.24 22:01:32 read_test (EURUSD,M1) 0 288
added:
the result has changed, but it's still not what it looks like - the second line has only changed
You didn't set delimiter. It defaults to '\t'.
and you're looking for ';'.
You didn't set a delimiter. The default delimiter is '\t'.
and I see you need ';'.
Added delimiter, without FILE_ANSI it seems to work, thanks for the help.