
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 were correctly advised about the pause. There was already a topic on the forum that a pause of several milliseconds after sending the order is often enough to continue working with the position. You'd better not rely on OnTradeTransaction() if it is possible.
And in general, to be more reliable, try to check if there is a position after the order is sent on the next tick. If there is a position, do not send more orders.
OnTradeTransaction(), if possible, is not to be relied upon.
I wonder why?
1. It is not certain that it will come;
2. Misbehaved before in the tester. Don't know now;
Added:
3. Some order or transaction parameters (can't remember exactly) like enumeration can have "default values" that are not. I.e. MQ made not WRONG_VALUE but, for example, ORDER_TYPE_BUY. Could be misleading;
You were correctly advised about the pause. There was already a topic on the forum that a pause of several milliseconds after sending the order is often enough to continue working with the position. You'd better not rely on OnTradeTransaction() if it is possible.
And in general, to be more reliable, try to check the position availability on the next tick after the order is sent. If there is a position, do not send more orders.
This is where the additional opening may slip through .... partially solving the issue as follows, if the order is accepted, I increase the Int variable, and after the increase the conditions for opening are slightly different, so a new opening does not happen, but.... if the order is not accepted the variable does not increase, and here is the tricky part... I have not correctly identified the state and extra orders are coming in.
1. It is not certain that it will come;
2. Misbehaved before in the tester. Don't know now;
You probably didn't see the message from the developers that now, OnTradeTransaction() is guaranteed.
Что касается этой фразы.
Судя по всему - она осталась из документации к одной из начальных версий терминала с асинхронной торговли. В ближайшее время уберём. Виновные будут расстреляны.
How many seconds to pause? 1 sec 2, maybe 10?
Added
Don't forget that you are working with a CUSTOMER - SERVER (request-response) application
You probably haven't seen the message from the developers that now, OnTradeTransaction() is guaranteed.
Что касается этой фразы.
Судя по всему - она осталась из документации к одной из начальных версий терминала с асинхронной торговли. В ближайшее время уберём. Виновные будут расстреляны.
How long should we pause for? 1sec 2, maybe 10?
Yes, you're right, didn't see the phrase, neither did the corpses :)
About the pause - you gave a rather exotic case, however, of course, it's possible. I meant the case for working with liquid instruments, current contracts and for working on the current tick immediately after sending the order. In the great majority of cases several milliseconds are enough. And, of course, after the pause, it is necessary to check the presence of a position for further work with it.
In principle I do so, but in Forts the order is often accepted successfully...but on the next tick there is no position yet...
This is where the additional opening may slip .... partially solve the problem this way, if the order is accepted, I increase the int variable, and after the increase the conditions for opening are slightly different, so a new opening does not happen, but.... if the order is not accepted the variable does not increase, but here is the trick... I misjudged the state and extra orders started to appear.
Yes, you're right, I didn't see the phrase, and neither did the corpses:)
About the pause - you gave a rather exotic case, however, of course, it is possible. I meant the case for working with liquid instruments, current contracts and for working on the current tick right after order sending. In the great majority of cases several milliseconds are enough. And, of course, after the pause, it is necessary to check the presence of a position for further work with it.
Alexey!
Quite a liquid instrument :)
It's not about instrument (liquidity), it's about delay, which can occur in ANY instrument.
I've been actively trading using EAs for almost 4 years now.
In none of my EAs there are any pauses (Except pause while waiting for data to be downloaded from server in INDICATORS),
If you pause, it's a sure sign that your EA didn't do it right :(
Alexey!
I've been actively trading with EAs for almost 4 years now.
I don't have any pauses in any of my EAs (except pause for waiting for data to be downloaded from server in INDICATORS),
If you're entering a pause, it's a TRUE sign that you've wrongly created your EA's algorithm :(
Michael, if you have not seen or done something, it does not mean that it is impossible or unnecessary.
I completely agree with you!
Everyone does as they want or as they can.