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
Is there an internal limit on the string length(string type), or how much free memory is there and how much can be crammed into the string?
// This question is related to writing programs for OpenCL.
Please also specify the correct answer in the documentation, there is no indication in the FAQ.
Is there an internal limit on the string length(string type), or how much free memory is there and how much can be crammed into the string?
// This question is related to writing programs for OpenCL.
Please also specify the correct answer in the documentation, since there is no indication in the FAQ.
Without line feed character "\r\n" is a little less than 32768, roughly speaking 32000 characters will fit in there,
And with a line feed until the memory is enough, at least I've shoved 2 000 000 in the string, my hand is tired of shoveling further :)
Without the line feed, it's a little less than 32768, roughly 32,000 characters,
but with the line feed, I've got enough memory for now, at least I've shoved 2,000,000 into the string, my arm's tired of shoving :)
Thanks a lot! Two million will be enough for me at first.
// Just puzzled: what the hell does string translation have to do with it? It's just a symbol, no worse/better than the others.
// No, I believe you, it's just that I usually understand how things work, but here it's kind of weird and surprising...
// What did you measure it with? Wasn't it a file function?
:)
Thank you, I'm glad you did! Two million will be enough for me for the first time.
// Just puzzled: what the hell does string translation have to do with it? It's just a symbol, no worse/better than the others.
// No, I believe you, it's just that I usually understand how things work, but here it's kind of weird and surprising...
// What did you measure it with? Not the file function by any chance?
:)
Most likely it's an internal representation of the string; \r\n is probably followed by allocation of a new (additional) array for storing information.
I don't know exactly, ask MQ.
SZY of course for control dumped into a file, but first the string is formed, checked its length via Len, well, I do not remember now, it was a long time ago, but everything was in order.
ZZZI And I checked the read 10 characters from the saved string, without the translation of more than ~32700 does not write in the variable.
This is most likely an internal string representation, with \r\n probably followed by a new (additional) array for storing information.
I do not know exactly, ask MQ.
Well, of course to control reset to a file, but first the string is formed, checked its length through Len, well, I do not remember now, it was a long time ago, but everything was in order.
ZZZY And read from 10 characters from the saved string, without translation more than ~32700 does not write in the variable.
All right, thanks, Nicholas. And, by the way, Happy Birthday to You...!
--
What does comrade stringo have to say?
We only need to synchronize computer time in time, otherwise we can also lose trades.
That's it, I've got it. I misunderstood you then. )) In order to always get the entire history correctly, the synchronisation can be done like this:
For the tester, there is only a crutch and not for all cases. We wait until they fix it.That's it, I've got it. I misunderstood you then. )) In order to always get the entire history correctly, the synchronisation can be done like this:
For the tester, only a crutch remains, and not for all cases. We are waiting for them to fix it.No, you got it right. The server time does not depend on the time zone of the computer, it is the same for all and is equal to the last fixed time in the 'Market Watch'.
When the market closes (trading ends) on a given server, no stops should be triggered until the next market re-opens in a new week. In your case, this does not seem to be the case. Quotes have already stopped coming into the terminal, but they are still being processed on the server and the set stops are triggered. In some brokerage companies, stops are not triggered by the market, but by the price set in the stop. This is not a market mechanism but a 'kitchen' one.
What I said about possible missing trades, well, if your clock is 2 minutes behind, then trades made in these last 2 minutes will not fall in history because server time is calculated with local time and also will be lagging for the same 2 minutes.
As for the tester, it is not clear what is bothering you, because all this is simulated there and the local time is equal to the server time.
OK, thank you Nikolai, and by the way, Happy Birthday to You...!
I dug it out,
Skype and in the middle of the night you'll be reminded of an acquaintance's birthday (as advertising :)
Thanks for the cake, it's very nice, but the candles are kind of hard to digest :o)
No, you got that right. The server time is independent of the computer's time zone, it is the same for all and equals the last recorded time in the 'Market Watch'.
When the market closes (trading ends) on a given server, no stops should be triggered until the next market re-opens in a new week. In your case, this does not seem to be the case. Quotes have already stopped coming into the terminal, but they are still being processed on the server and the set stops are triggered. In some brokerage companies, stops are not triggered by the market, but by the price set in the stop. This is not a market mechanism but a 'kitchen' one.
No, everything worked correctly there on the server ( MQ demo account). That is, the stops triggered when I wasn't connected. But when I connected, the market was already closed. In the Market Watch window the time of the last tick before my connection was cut off was recorded. When I requested the history of trades by specifying TimeCurrent() as the second value, I didn't get the entire history. Although the Help for TimeCurrent() says that:
... The time value is generated on the trade server and does not depend on time settings on user's computer.
That is, I understand that this function must return the value of last arrival of quotation of one of the instruments in the Market Watch window from the server even if the connection was cut off and the connection was made when the market was already closed. In my case, this didn't happen and I didn't get all of the history. I do not know, it is not mentioned in the help.
And what I said about possible missed trades, well, if your clock is 2 minutes behind, the deals made in these last 2 minutes will not go to history, because server's time is calculated with local time and also will be lagging by the same 2 minutes.
In this case, if you want the entire history, you can simply add a bigger number for a day ahead and it will be a guarantee that all deals will be selected. :)
As for the tester, it is not clear what do not suit you, because there it all simulated and the local is equal to the server.
But in the tester, there is a bug with the HistoryDealsTotal() function, and it appears in the visualization mode. Time is modeled correctly there. Just a crutch helps in some cases.