Pendding order does not open in exact price

 

Why, when I set a sellstop trade in mql5 and Strategy Tester at the price of 1.07078, this trade becomes a sell trade at the price of 1.07070 and does not open at the exact price of 1.07078?  Where exactly is the problem?

 
re taWhy, when I set a sellstop trade in mql5 and Strategy Tester at the price of 1.07078, this trade becomes a sell trade at the price of 1.07070 and does not open at the exact price of 1.07078?  Where exactly is the problem?

You should learn the concept of bid/ask price and spread.

When you sell the opening price is the bid price, and vice versa, hence the price has a small variation (spread).

 
Miguel Angel Vico Alba #:

You should learn the concept of bid/ask price and spread.

When you sell the opening price is the bid price, and vice versa, hence the price has a small variation (spread).

Thank you.
How can I make it to sell exact 1.07078?
 
re ta: Why, when I set a sellstop trade in mql5 and Strategy Tester at the price of 1.07078, this trade becomes a sell trade at the price of 1.07070 and does not open at the exact price of 1.07078?  Where exactly is the problem?

It is called "slippage". Please do some research on it!

You are probably running the test with real tick data which can have slippage like on real accounts.

Also, if you enabled emulating "delays", that what will also emulate "slippage".

 
re ta #: Thank you. How can I make it to sell exact 1.07078?
You can't do that on real live trading. Learn to adapt to it instead. See my previous post on "slippage"!
 
re ta #: How can I make it to sell exact 1.07078?

The answer is you can't. You assume that prices only move one tick at a time, they don't. Moving multiple ticks is called slippage.

 
Fernando Carreiro #:

It is called "slippage". Please do some research on it!

You are probably running the test with real tick data which can have slippage like on real accounts.

Also, if you enabled emulating "delays", that what will also emulate "slippage".

I forgot to mention the slippage! OMG!

I have a fever (Covid). 😒

 
Miguel Angel Vico Alba #:

I forgot to mention the slippage! OMG!

I have a fever (Covid). 😒

Thank you. I was looking for a way to open an order at an exact price before it arrives, but from what you said, it is not possible.