Is there a way to use Buy/Sell Stop Limit order type in MetaTrader 4? The broker i use doesnt have MT5, which has that order type

 

Is there a way to use Buy/Sell Stop Limit order type in MetaTrader 4? The broker i use doesnt have MT5, which has that order type.

So maybe a script or EA or something like that will do the job on MT4?

if you find a way to do it, let me know.


thanks.

 

“A stop-limit order will be executed at a specified price (or better) after a given stop price has been reached. Once the stop price is reached, the stop-limit order becomes a limit order to buy (or sell) at the limit price or better”.


Yes, it's fairly simple thing to implement in MQL4.. If you write down a more specific pseudo-code I can rewrite it in MQl4 for you here.

 
Capella:

“A stop-limit order will be executed at a specified price (or better) after a given stop price has been reached. Once the stop price is reached, the stop-limit order becomes a limit order to buy (or sell) at the limit price or better”.

Yes, it's fairly simple thing to implement in MQL4.. If you write down a more specific pseudo-code I can rewrite it in MQl4 for you here.


Capella,

Can you provide a sample script for placing a Buy/Sell Stop Limit order type in MT4? Is it possible to implement in MT4? My first thought was to set the Slippage parameter of the OrderSend() function, but my understanding is that the Slippage parameter is only used for market orders.

Thanks,

Jeff

 
moreyummy:
Is there a way to use Buy/Sell Stop Limit order type in MetaTrader 4?
So maybe a script or EA or something like that will do the job on MT4?
  1. If you mean programmatically, OrderSend() with Trade operations
  2. If you mean manual trading, open the new order window and set type to pending.
 
WHRoeder:
  1. If you mean programmatically, OrderSend() with Trade operations
  2. If you mean manual trading, open the new order window and set type to pending.


OrderSend() with OP_BUYSTOP / OP_SELLSTOP allows you to place a Buy/Sell Stop order. I need to place a Buy/Sell Stop Limit order. This order type includes a maximum slippage above / below the stop price. The OrderSend() Slppage parameter is ignored for pending order types.

The idea is to buy on a breakout to the upside but noy pay too much. I basically want to limit the slippage past the stop price.

 
moreyummy:

Is there a way to use Buy/Sell Stop Limit order type in MetaTrader 4? The broker i use doesnt have MT5, which has that order type.

So maybe a script or EA or something like that will do the job on MT4?

if you find a way to do it, let me know.


thanks.


he/she asked a very brief question but no one undrestand him/her . can anyone write an EA that works as sell/buy stop limit order?

it is when i want price passes a specific price and if return i do my sell/buy (i couldnt explain it more biriefer)

more information about sell/buy stop limit order can be found in MT5

 
Jeff_Morund:
OrderSend() with OP_BUYSTOP / OP_SELLSTOP allows you to place a Buy/Sell Stop order. I need to place a Buy/Sell Stop Limit order.
Asked and ansered: programmatically, OrderSend() with Trade operations OP_BUYLIMIT
 
WHRoeder:
Asked and ansered: programmatically, OrderSend() with Trade operations OP_BUYLIMIT
No, there's a difference between simulating things with a limit order and a true stop-limit order. As Jeff_Morund is saying, MT4 doesn't have the ORDER_TYPE_BUY_STOP_LIMIT or ORDER_TYPE_SELL_STOP_LIMIT which MT5 has: https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties#enum_order_type. The closest you can (try to) get is having an EA watch the price action and place a limit/stop order when a trigger is hit. But that's not really the same thing.
 

...But that's not really the same thing...

What are they gonna give us next. A pending order which watches if price bounces off Support & Resistance 3-times before placing the pending order... lol. I'm not picking on you JJC I just find all these cleshay order-types funny. Thats why I don't even bother much with Limit and Stop orders these days. Its almost like the pending order is taking over the job of the EA, while in actuality the EA was created in-part to take over the job of the pending order. Loosing connections and guaranteeing prices is not a good argument for these order-types IMO.

 
ubzen:

[...] all these cleshay order-types funny.

Er, stop-limit orders are a standard feature of the NYSE, the world's largest equities exchange, and the CME, the world's largest futures exchange. It's hard to argue that it's odd for MT4 not to have them. Same deal with OCO orders. There's probably no one on this forum - apart from a few people in Kazan - who are more impressed by MT4 than I am, but it's just simply a limitation that there are no native OCO orders and that they have to be synthesised through user-side code.
 

...no native OCO orders...

Yeah I remember looking for the Order-Cancel-Order command when I first downloaded MetaTrader 4. I was like "what no OCO" this platform sucks lol. Funny how spending time with someone makes you like em.

Reason: