
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
I wonder if this could be a mistake in the documentation.
When it outputs 2 it is really FoK. 1 is IoC and 0 Return. I would need to check various brokers to see if this is consistent.
EDIT: What I mean to say is that if it outputs 2, you need to set it to 1.
There is no error in the documentation about that.
Use the enum label, not values.
There is no error in the documentation about that.
Use the enum label, not values.
Thanks!
Unsupported filling mode was the mistake! but it was the minimum volume for BTC the mistake in my code! not the filling mode . this error 4756 is too generic!
For reference I use this function which determines from the ORDER_FILLING_TYPE from the SYMBOL_FILLING_MODE (Note the difference).
For reference I use this function which determines from the ORDER_FILLING_TYPE from the SYMBOL_FILLING_MODE (Note the difference).
Or better yet..
For reference I use this function which determines from the ORDER_FILLING_TYPE from the SYMBOL_FILLING_MODE (Note the difference).
Hello,
I can use this method to make it even simpler.
https://www.mql5.com/en/forum/428809#comment_40849827
I would like to inform both that the "SYMBOL_FILLING_MODE" does not return a single filling mode. It returns a bit flag of multiple allowed filling modes.
You can't just use "==" to find the acceptable filling mode. You have to mask out the flags by doing something like this ...
For more information please reference "Filling Modes" in the documentation.I would like to inform both that the "SYMBOL_FILLING_MODE" does not return a single filling mode. It returns a bit flag of multiple allowed filling modes.
You can't just use "==" to find the acceptable filling mode. You have to mask out the flags by doing something like this ...
For more information please reference "Filling Modes" in the documentation.@Fernando Carreiro From my tests the server fill policy flag is a long in state 1, 2 or 3(3 being combination of 2 and 1); useServerFill() then tries to be as permissive as possible based on these states. I agree that your code is more concise, though in achieving this while covering all cases (my updated code would cover operations using market orders only).
Unfortunately your updated code is still not able to detect when more then one filling mode is allowed. It can only detect when only a single filling mode is allowed.
At you own explanation, of using 3 (combination of 1 and 2), it would fail with your code, and return the "preferred_fill_type", unable to test if it is allowed or not, and subsequently cause the order to fail if it is not.
Or better yet..