@rrsch#: Hm. I'm only using order types OP_BUY and OP_SELL. These are market orders, right? I got error #138 (Off quotes). I see in the documentation "If the requested open price is fully out of date, the error 138 (ERR_REQUOTE) will be generated independently on the slippage parameter. If the requested price is out of date, but present in the thread, the order will be opened at the current price and only if the current price lies within the range of price+-slippage." I have no idea what that's trying to tell me, I can't tell if that's relevant to my case or not?
If you are getting "Off Quotes" error, then it is most probably "Instant" execution policy where the slippage/deviation parameter is taken into consideration.
@rrsch#: Those are in use elsewhere in the EA, but the OrderSend function specifically seems to want a "point" value for the slippage parameter... previous comments in this thread clarify what this is for forex pairs, but what that means for indices I'm unsure.
Irrespective of the symbol type, the slippage parameter is always in "points", not "Points". Look at the symbol's contact specifications to see the number of "digits" which indirectly tells you the "point size".
For example, for the following index, the point size is 0.1, given that number of digits is 1 for the symbol.
Irrespective of the symbol type, the slippage parameter is always in "points", not "Points". Look at the symbol's contact specifications to see the number of "digits" which indirectly tells you the "point size".
For example, for the following index, the point size is 0.1, given that number of digits is 1 for the symbol.
What is this distinction you made between "points" and "Points" ?
If you are getting "Off Quotes" error, then it is most probably "Instant" execution policy where the slippage/deviation parameter is taken into consideration.
Got it.
The execution type with this broker does appear to be Market.
In that case, any ideas where this error message might have come from? It did occur at a high volatility moment just after US open, and price was jumping around real quick right at my moment of entry, so the idea that it had something to do with slippage makes logical sense, aside from you saying that the slippage parameter doesn't apply to Market executions.
The execution type with this broker does appear to be Market.
In that case, any ideas where this error message might have come from? It did occur at a high volatility moment just after US open, so the idea that it had something to do with slippage makes logical sense, aside from you saying that slippage doesn't apply to Market executions.
Please show your OrderSend() code where you get this error 138.
Well, I will stop to ask chunk of code one by one, MT4 requires a valid price for OrderSend() even on Market execution, you could have to use RefreshRates().
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.
No, I'm not talking about order types. I'm talking about execution policies — Types of Execution - Trading - MetaTrader 4 Help
If you are getting "Off Quotes" error, then it is most probably "Instant" execution policy where the slippage/deviation parameter is taken into consideration.
Irrespective of the symbol type, the slippage parameter is always in "points", not "Points". Look at the symbol's contact specifications to see the number of "digits" which indirectly tells you the "point size".
For example, for the following index, the point size is 0.1, given that number of digits is 1 for the symbol.
Irrespective of the symbol type, the slippage parameter is always in "points", not "Points". Look at the symbol's contact specifications to see the number of "digits" which indirectly tells you the "point size".
For example, for the following index, the point size is 0.1, given that number of digits is 1 for the symbol.
What is this distinction you made between "points" and "Points" ?
No, I'm not talking about order types. I'm talking about execution policies — Types of Execution - Trading - MetaTrader 4 Help
If you are getting "Off Quotes" error, then it is most probably "Instant" execution policy where the slippage/deviation parameter is taken into consideration.
Got it.
The execution type with this broker does appear to be Market.
In that case, any ideas where this error message might have come from? It did occur at a high volatility moment just after US open, and price was jumping around real quick right at my moment of entry, so the idea that it had something to do with slippage makes logical sense, aside from you saying that the slippage parameter doesn't apply to Market executions.
What is this distinction you made between "points" and "Points" ?
I think he's distinguishing from "Points" being $1 of price movement on, say, the NASDAQ, which is what I was talking about in my previous post.
Got it.
The execution type with this broker does appear to be Market.
In that case, any ideas where this error message might have come from? It did occur at a high volatility moment just after US open, so the idea that it had something to do with slippage makes logical sense, aside from you saying that slippage doesn't apply to Market executions.
Please show your OrderSend() code where you get this error 138.
Code where you set currentPrice ? It needs to be the last bid/ask depending of the order type.
Code where you set currentPrice ? It needs to be the last bid/ask depending of the order type.