The great and terrible MT4 forever (or how to strategise a transition) - page 24

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
In Russian? In Spanish? In English? Which one?
of course in all languages that the terminal supports
the format does not matter - it can be an SB in the form of a class where the constructor gets the language as a parameter
or it can be a group of custom functions with language ending GetTxtErrDescription_RU()
or even a regular function like GetLastError()
if you wish
OK, forget it, I have everything, and my rank does not allow to take care of the universal well-being, let specially trained people deal with usability and userfriendly
I guessed why your position is double.))) Because you have placed two libraries in CodeBase)))
Why don't you like GetTickCount(); it doesn't slow down the whole code, unlike Sleep, you can at least add 500ms if the ping is high,
In my multisymbol, for each pair a separate counter is activated after OrderSend, the rest of the logic continues to work
Why don't you like GetTickCount(); it doesn't slow down the whole code unlike Sleep, you can use at least 500ms if the ping is high,
It's an active loop and it eats the processor. What if there are 50 Expert Advisors of this kind in the terminal? There are 8 of them on one symbol where all 8 will send orders on the hairpin.
It's an active cycle and it eats the CPU. What if there are 50 such Expert Advisors in the terminal? There are 8 of them on one pair where on the hairpin all 8 of them will send orders.
It is activated for half a second and only after the order is sent there is no command for it and then it checks for the presence of the open positions first
I optimized my code, it became faster and started to open 2 positions at a time) at first Sleep helped, but it was slowing things down, I have 7 charactersI haven't tried MT4-style myself yet. Theoretically it should work. I have not had a chance to look at it yet.
It works. It was interesting to compare two versions (with and without position waiting).
With position waiting after OrderSend.
Without waiting for the position, the result is immediate.
I was sure that the second variant was faster. It turned out to be equal in time of execution.
When waiting for position ByPass.Is(), the code returned false once, while without waiting it returned 740 times. All in all, the crutch seems to work.
Forum on trading, automated trading systems and trading strategy testing
The great and terrible MT4 forever (or how to build your migration strategy)
Igor Makanu, 2021.05.10 10:28
it seems to work:
But very slow, and the solution is so-so.
Its speed is ok. Lack of synchronisation 37 times.
Its speed is normal. Lack of synchronisation 37 times.
I checked on fx: this script opened 10 orders 5 times fast, and the last time I was fast, when I opened 10 orders for 10 seconds on the demo, the closing of orders was not fast either.
Here is a scratch on the log for order 11143290:
LL 0 11:19:31.444 Trades '20615687': order #11143290 buy 0.1 / 0.1 EURUSD at market done in 1580.643 ms
PO 0 11:19:33.621 Trades '20615687': deal #1865643 buy 0.1 EURUSD at 1.21460 done (based on order #11143290)
CL 0 11:19:33.622 Trades '20615687': market buy 0.1 EURUSD
JF 0 11:19:33.679 Trades '20615687': accepted market buy 0.1 EURUSD
QO 0 11:19:33.679 Trades '20615687': market buy 0.1 EURUSD placed for execution
KM 0 11:22:41.224 Trades '20615687': market sell 0.1 EURUSD, close #11143290 buy 0.1 EURUSD 1.21460
DR 0 11:22:41.280 Trades '20615687': accepted market sell 0.1 EURUSD, close #11143290 buy 0.1 EURUSD 1.21460
KQ 0 11:22:41.282 Trades '20615687': market sell 0.1 EURUSD, close #11143290 buy 0.1 EURUSD 1.21460 placed for execution
ON 0 11:22:43.824 Trades '20615687': market sell 0.1 EURUSD, close #11143290 buy 0.1 EURUSD 1.21460
DO 2 11:22:43.880 Trades '20615687': market sell 0.1 EURUSD, close #11143290 buy 0.1 EURUSD 1.21460 [Order to close this position already exists]
JN 0 11:22:46.280 Trades '20615687': market sell 0.1 EURUSD, close #11143290 buy 0.1 EURUSD 1.21460
OL 2 11:22:46.336 Trades '20615687': market sell 0.1 EURUSD, close #11143290 buy 0.1 EURUSD 1.21460 [Order to close this position already exists]
I just checked on the fx...n.
I'll have to have a look at that server. It would be good to check out the crutch suggested here, for whom it seems important.
To come back to this topic after a while would be very reluctant. Better to point out the bugs right away if there are any.
I'll have to have a look at this server. It would be good to check out the crutch suggested here, for whom it seems important.
I'd hate to come back to this topic after a while. Better to immediately point out the bugs, if any.
In the PM threw the server