Yeah I believe so. However, not all brokers (example ECN) allow slippage/deviation. In case of ECN, you get the Best Price after you submit the order. Which Execution_Type allows slippage and which doesn't is something you'll need to check for before submitting the order. I cannot remember which you need .. nor have I tested them extensively.
If I have set slippage with 3 points and this still happens, what would be the cause?
doshur: If I have set slippage with 3 points and this still happens, what would be the cause?
Perhaps its an ECN broker ... Or the kind which does-not care what you specify within the Slippage parameter. In that case, you'll have to use Pending Orders. Create a small script and check the Execution Mode.
doshur: I think I have a solution if profit in pips > spread then close position. (I think I set the slippage == spread)
Wouldn't work. When you check the closing condition everything would be alright. When you try to close the order on Market_Execution you'll suffer whatever slippage the Market impose at that time.
Your best option here again is using Limit (Pending) Orders (of the Opposite_Type). Obviously, how close you can set the order depends upon your Symbols Stop_Levels.
Wouldn't work. When you check the closing condition everything would be alright. When you try to close the order on Market_Execution you'll suffer whatever slippage the Market impose at that time.
Your best option here again is using Limit (Pending) Orders (of the Opposite_Type). Obviously, how close you can set the order depends upon your Symbols Stop_Levels.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Yeah I believe so. However, not all brokers (example ECN) allow slippage/deviation. In case of ECN, you get the Best Price after you submit the order. Which Execution_Type allows slippage and which doesn't is something you'll need to check for before submitting the order. I cannot remember which you need .. nor have I tested them extensively.
It happened yesterday at US timing 9.30 when it release Non Farm. I can be 99% sure there is rapid price movements.
Perhaps its an ECN broker ... Or the kind which does-not care what you specify within the Slippage parameter. In that case, you'll have to use Pending Orders. Create a small script and check the Execution Mode.
If so, the question is: what code could protect you to really close the trade with profit > 0 in any market situation?
I think I have a solution
if profit in pips > spread then close position. (I think I set the slippage == spread)
Wouldn't work. When you check the closing condition everything would be alright. When you try to close the order on Market_Execution you'll suffer whatever slippage the Market impose at that time.
Your best option here again is using Limit (Pending) Orders (of the Opposite_Type). Obviously, how close you can set the order depends upon your Symbols Stop_Levels.
Wouldn't work. When you check the closing condition everything would be alright. When you try to close the order on Market_Execution you'll suffer whatever slippage the Market impose at that time.
Your best option here again is using Limit (Pending) Orders (of the Opposite_Type). Obviously, how close you can set the order depends upon your Symbols Stop_Levels.
It happened yesterday at US timing 9.30 when it release Non Farm. I can be 99% sure there is rapid price movements.
Hi Doshur.
I had the same problem yesterday during the "Unemployment Rate" event, we both trade at broker X.
My model should open a new trade at the purple line but the terminal freezes for 7 seconds. It was too busy in the market to process the order.
When the trade was finally executed, I got the HIGH of the BAR!!!
I was stopped out after a few seconds and then, my model opened a new trade, The second trade was correct.
If you open or close a trade during macro events, you don't have the guarantee that the trade is executed for that price.
In my case, there was a difference of 30 Pips! between the trigger price and the execution price.
the simulation server of Metaquotes did execute the trade instantly for the correct price.