- Ask and bid price in BUY and SELL order
- A futures trade opens at Last price, not at Bid or Ask. Is this normal?
- Question about Ticket numbers
Hi,
A buy/sell stop/limit is just a type of pending order. As far as I know the only limitation is given by your broker, and it includes both market execution orders and pending orders. If you reach the limit, you'll get an error, but if you're below I can't imagine why you can't set a second (or more) pending order. Any particular reason you're asking? Are you getting some sort of error?
Hi,
A buy/sell stop/limit is just a type of pending order. As far as I know the only limitation is given by your broker, and it includes both market execution orders and pending orders. If you reach the limit, you'll get an error, but if you're below I can't imagine why you can't set a second (or more) pending order. Any particular reason you're asking? Are you getting some sort of error?
Hey! Thanks for the response. Yes I am facing this problem in my MT5 platform and I am using a broker named 'Deriv'. From what you tell me that might be a limitation set by the broker and not something that is happening in all the cases.
I can set a new order(when the previous one has been triggered) but when the price reaches the limit price the order just disappears and I do not see any additional position opened.
Hey! Thanks for the response. Yes I am facing this problem in my MT5 platform and I am using a broker named 'Deriv'. From what you tell me that might be a limitation set by the broker and not something that is happening in all the cases.
I can set a new order(when the previous one has been triggered) but when the price reaches the limit price the order just disappears and I do not see any additional position opened.
OK, a couple of things: first off I recommend you check the broker order limit before calling OrderSend, if you're not doing it already. The following code is MQL4, so you might need to review it, but the idea remains the same: checking the limit before placing an order and control the error:
// Account order limit int accMaxOrders = int(AccountInfoInteger(ACCOUNT_LIMIT_ORDERS)); if(totOrders >= accMaxOrders) // ...where "totOrders" is the count of both your open and pending orders return(ERR_TRADE_TOO_MANY_ORDERS); // RC#148 // OTHERWISE return no error return(ERR_NO_ERROR);
Now, the second thing is that you should check where the price is before placing an order. I mean, if you're sending a BUY LIMIT request, that means that the ASK is above the opening price. As soon as it falls down, it triggers your PO. Now, if the price is dropping very fast and you're trying to set another BUY LIMIT close to the first, but the ASK is already below, I believe you should get an error since that's no longer a BUY LIMIT but a BUY STOP (ASK below your open price for a Buy operation). Does it make sense? Try to check the error you're getting after OrderSend, if not yet done.
Again, sorry, I'm talking in terms of MQL4, never done anything in MQL5, but besides the syntax, the ideas are the same.
OK, a couple of things: first off I recommend you check the broker order limit before calling OrderSend, if you're not doing it already. The following code is MQL4, so you might need to review it, but the idea remains the same: checking the limit before placing an order and control the error:
Now, the second thing is that you should check where the price is before placing an order. I mean, if you're sending a BUY LIMIT request, that means that the ASK is above the opening price. As soon as it falls down, it triggers your PO. Now, if the price is dropping very fast and you're trying to set another BUY LIMIT close to the first, but the ASK is already below, I believe you should get an error since that's no longer a BUY LIMIT but a BUY STOP (ASK below your open price for a Buy operation). Does it make sense? Try to check the error you're getting after OrderSend, if not yet done.
Again, sorry, I'm talking in terms of MQL4, never done anything in MQL5, but besides the syntax, the ideas are the same.
I am not using a EA to do the trading. I do it manually. This is not the right place/forum to ask questions regarding MT4/MT5 in general?
I am not using a EA to do the trading. I do it manually. This is not the right place/forum to ask questions regarding MT4/MT5 in general?
Yes, it is. Sorry, I thought you were talking about an EA. Anyway, if the price is dropping fast after your BUY LIMIT is triggered, you should definitely get an error when placing another BUY LIMIT manually if the Ask is below your open price. Changing the type to BUY STOP would solve that.
Yes, it is. Sorry, I thought you were talking about an EA. Anyway, if the price is dropping fast after your BUY LIMIT is triggered, you should definitely get an error when placing another BUY LIMIT manually if the Ask is below your open price. Changing the type to BUY STOP would solve that.
I see. Yes you are right I am aware of that. For some reason when I was placing some orders (in a demo environment), I was facing the problem that I am mentioning in this thread. But now it works fine, as it should have in the first place. I don't know what was going wrong before but I managed to solve it. Anyway, thannk you again for your time. Have a good one!
![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