Sorry but this is unclear. Can you post some logs and/or screenshot to illustrate your issue ?
Sorry, my EA doesn't generate any logs and a screenshot wouldn't show the action happening.
This is what happens, for example the BuyStop is set to trigger at 14624 exactly. When the Bid price goes above it, the BuyStop is triggered and it becomes an active order, but opened at 14624.10.
Another BuyStop is set to trigger at 14677 exactly. When the Bid price goes above it, the BuyStop is triggered and it becomes an active order, but opened at 14677.40.
In one broker, the enter price never changes. Never. In the other, most prices change from integer to a double, i.e. a fraction above the intended integer price. It's like it's overshooting a little.
I would be willing to accept this as normal, but it never happens in one of my two brokers, and that accuracy is very welcome. I'm just not pleased that I can't have the same accuracy in the other broker.
The relevance of it is that my EA places orders at a very regular interval and checks if the order already exists before placing it. If it does, it won't place another order at the same price. But, for example, it checks for 14677, not for 14677.40 so I end up with two orders that are way too close to one another.
Sorry, my EA doesn't generate any logs and a screenshot wouldn't show the action happening.
This is what happens, for example the BuyStop is set to trigger at 14624 exactly. When the Bid price goes above it, the BuyStop is triggered and it becomes an active order, but opened at 14624.10.
Another BuyStop is set to trigger at 14677 exactly. When the Bid price goes above it, the BuyStop is triggered and it becomes an active order, but opened at 14677.40.
In one broker, the enter price never changes. Never. In the other, most prices change from integer to a double, i.e. a fraction above the intended integer price. It's like it's overshooting a little.
I would be willing to accept this as normal, but it never happens in one of my two brokers, and that accuracy is very welcome. I'm just not pleased that I can't have the same accuracy in the other broker.
The relevance of it is that my EA places orders at a very regular interval and checks if the order already exists before placing it. If it does, it won't place another order at the same price. But, for example, it checks for 14677, not for 14677.40 so I end up with two orders that are way too close to one another.
Any EA is generating logs output about trading in the Journal tab. Anyway, it's now clear.
This is called slippage and it's normal for stop orders, a pending order price is never guarantee.
Is it on a demo or real account ? If one broker has never any slippage I would say it's a market maker broker. It's certainly easier to manage but less trustworthy (in my opinion).
I see. Thank you.
Both are demo accounts.
So I suppose that setting slippage to '0' on OrderSend has no effect.
I see. Thank you.
Both are demo accounts.
So I suppose that setting slippage to '0' on OrderSend has no effect.
Oh, I also have questions that interest me about this:
- Is slippage of pending orders on accounts with Instant Execution possible? Or does Instant Execution only apply to market orders?
- Is there a way to limit the maximum allowable slippage for pending orders, similar to how it can be done for market orders using:
If I am right, setting slippage/deviation to 0 means, you accept anything.
If you are right, it turns out that it is technically impossible to request the execution of a market order strictly on Ask/Bid (without slippage)
[Added]:
I never thought about it because I always put slippage in the settings. And the user himself decides what value to specify😄
Forum on trading, automated trading systems and testing trading strategies
How to avoid the bad slippage?
Alain Verleyen, 2014.04.10 08:32
You are thinking such things because you don't fully understand the process of placing an order. There is nothing wrong from the broker part.
An ECN broker is only an intermediate, it takes your order and try to execute it directly from the market. Usually such brokers provide low spread. (If a broker is a true ECN or not is an other discussion).
Broker which provides Instant Execution with possibility to use a slippage are dealing desk broker, they don't place your order directly to the market but are the counter part of you trade and this is why they can control the trade and eventually cancel it if slippage is too high.
This is very short explanation, but I hope it can help.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have an EA that only places orders of the BuyStop/SellStop type and only integer values.
Of course the variable type has to be double, but the value is always an integer.
When the price is touched, the order goes live.
In one of my brokers, that has been working flawlessly for days.
In the other broker, most of the order prices are not the intended integers after they become active.
They are placed as integer BuyStops and SellStops, but they become fractional when active.
Is that normal? Is there some way to avoid that?