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
- Does the broker support setting an order with time?
To do this, press F9 and check if the time can be set.
Two questions about working with files.
1. There is a text file containing strings in various languages (including Japanese, Arabic etc.). Accordingly the encoding of the file is UTF8. The data in the file is written as "Alias=Translation", where the alias is always in English and the translation is any other language. I was sure that FILE_UNICODE should be used while reading. But if you open the file like this:
we get a meaningless set of hieroglyphs when reading the lines. But if you open it like this:
then it reads and subsequently outputs normally (I checked English, Russian, Ukrainian, Japanese, Arabic).
Question: why do we need to use flag FILE_ANSI? After all, ANSI is for single-byte characters and UTF8 unicode character encoding...
2. There is a class which has such a method:
File name is a property and it's given a value when initializing an object. That is, when calling the method, we open the file, read line by line, and as soon as we find the matching string, we return its substring. If the file is not opened or there is no matching string, we return the string that was fed to the input.
If we call the method once, everything works. But if you call several times in a row - it works only the first time, while the second and subsequent attempts to open the file - INVALID_HANDLE (checked with print). What could be the problem?
2. There is a class that has this method:
File name is a property and it is assigned a value during object initialization. That is, when the method is called, we open the file, read it line by line, and as soon as we find a suitable line, we return its substring. If the file is not opened or there is no matching string, we return the string that was fed to the input.
If we call the method once, everything works. But if you call several times in a row - it works only the first time, while the second and subsequent attempts to open the file - INVALID_HANDLE (checked with print). What could be the problem?
This might be the reason:
...
2. There is a class that has a method like this:
The filename is a property and is assigned a value when the object is initialized. That is, when the method is called, we open the file, read it line by line, and as soon as we find a suitable line, we return its substring. If the file is not opened or there is no matching string, we return the string that was fed to the input.
If we call the method once, everything works. But if you call several times in a row - it works only the first time, while the second and subsequent attempts to open the file - INVALID_HANDLE (checked with print). What could be the problem?
Everything works here, i.e. all pending orders are executed without errors.
maybe it works there
But does your brokerage company have a date option?
Perhaps that's the reason:
...
tol64
...
Thanks for the prompt replies!
Sorry, I overlooked it, went out for a smoke and got it.
Here it is:
It's working now. But the first question still stands.
maybe that's where it works.
but does your brokerage company have a date option?
I have not heard anything clear from my broker for a week ... rrrrrrr....
Thank you for your prompt replies!
Sorry, I overlooked it, went out for a smoke and got it.
Here it is:
It's working now. But the first question still stands.
On the first question.
If file is opened as unicode, no conversion is done (i.e. your CP_UTF8 is simply ignored), data is read "as is"
The code page works when converting to internal Unicode text ( string type data) when reading from a text file opened in ANSI mode.
I haven't heard anything clear from my broker for a week now ... rrrrrr....