The great and terrible MT4 forever (or how to strategise a transition) - page 20
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
You can't talk with your tongue. You should teach me. Me, please.
There is a problem, and it's not just at this broker.
And the problem is not in waiting for the execution of a specific order (that is another matter), but in the fact that at the moment of order execution they temporarily disappear from all lists (open, closed, deals, positions).
We could use another crutch, of course. But we want to find a human solution. And so fxsaber works on it publicly, listening to barking of well-wishers passing by.
Personally, I hope you can understand the documentation
Personally, I hope you have enough insight into such words of documentation
And this concerns not only OnTradeTransaction() event handler , but also any part of code after OrderSend() is sent. Wait for the completion of the transaction. There are no other options and there won't be any. Just think why everything is so simple in mql4? Well, it's because these expectations are laid down far from your eyes. And in MQL5, you somehow think all checks and expectations are crutches. Why?Alexey, you are off the subject. Sorry, no time or inclination to explain it all again.
tried it this way:
5 times I ran my code, until exactly 10 positions open
tried it this way:
Run my code 5 times, until exactly 10 positions open
It looks like an error in setting the HistorySelect inputs.
Looks like an error in setting the HistorySelect inputs.
idea to reach the server and synchronise
rewrote it as a script:
ran it several times, also opens 10 positions, added the current start time of the script
the idea of reaching the server and synchronising
rewrote it as a script:
ran it a few times, also opens 10 positions, added the current start time of the script
What will this change show?
What will this change show?
2021.05.09 21:35:06.210 tst (ETHUSD,H1) Benchmark.mqh: TimeAvg[GetMicrosecondsCount()] = 0 mcs.
2021.05.09 21:35:06.211 tst (ETHUSD,H1) Benchmark.mqh is On.
2021.05.09 21:35:06.211 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 20 mcs.
2021.05.09 21:35:06.308 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 6 mcs.
2021.05.09 21:35:06.404 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 10 mcs.
2021.05.09 21:35:06.501 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 13 mcs.
2021.05.09 21:35:06.597 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 10 mcs.
2021.05.09 21:35:06.694 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 3 mcs.
2021.05.09 21:35:06.792 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 4 mcs.
2021.05.09 21:35:06.888 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 3 mcs.
2021.05.09 21:35:06.989 tst (ETHUSD,H1) Alert: Bench_Stack = 0, 1 <= Time[tst.mq5 16 in OnStart: HistorySelect(TimeCurrent(),t_start)] = 4 mcs.
Positions are still 10 pcs, no doubling yet
The execution time of HistorySelect shows well that it does not request anything from the Trade server.
Several versions.
Try the same way to get rid of the doubling here.
Forum on trading, automated trading systems and strategy testing
The Great and Powerful MT4 Forever (or how to strategize correctly to switch)
fxsaber, 2021.05.05 02:04
Run this code on an empty demo account and see if two positions open in a few seconds.
I came by chance and read it - it's a shame !
No one should be trusted !You can clearly see from the execution time of HistorySelect that it does not request anything from the Trade server.
Several versions.
Try the same way to get rid of the doubling here.
1. alas, can't survive in our business without it ))
2. I ask few days ago what build (not beta) is relevant, silence, I decided not to update, on a laptop and on a PC is hard to understand what builds are relevant - I have not worked with the terminals for a couple of months, not keep track. Now on the PC build 2903.
3. I'll pass, you are in charge of this banquet, developers are silent, my guess... thumb in the sky, I think the problem is in the network latency, and multiple sockets? terminal, no synchronization, one socket prices, another OrderSend, another where OnTrade()..... so packets are flying from where and where
4. i have robotforex + 100 mbps optical (ETTH), i had a bad mobile internet and fhopin on my laptop before
I tried it for 2 minutes, script flailed for 2 minutes, always one position, no reversals, I took the script off by hand