Take Profit/Stop Loss

 

If I send and open an order with a Take Profit setting and a Stop Loss setting. Is it then guaranteed that these will be adhered to? (assuming that the SL is not closer than the STOPS level of course)

A big issue is this - I have noticed that connectivity between my metatrader and the broker server is punctuated by regular breaks and problems (eg. Old tick error messages) etc. So, I am trying to make my code robust to this fact. Now, if I send and open an order with a given Take Profit and Stop Loss setting. Is that then stored on the server? ie. - there doesnt need to be any connectivity with my metatrader for this Take Profit and Stop Loss to be exercised?

Is there any reason why a given Take Profit and Stop Loss for an order, given at the time of opening, would NOT be exercised?

 
  • TP and SL are not guarantee to be hit a the exact price, is more of a best effort.
  • If your metatrader terminal is not connected the SL and TP will not be hit because they are not stored on the Broker server.
  • you can get amazing slippage is you have an order open on friday, see image below if you had an StopLoss set to 1.34880on Firday it would have closed at 134826 on Sunday when the market open, not much this weekend but some time it can be 100 pips or more

 

I see. Does it work the other way? - if over weekend there was a massive rise and you had a Buy in over this weekend. So, on Monday if it basically started on 1000 pips over Friday close and your take profit was at 100 pips. On the Monday, would they then cash you out at 1000 pips profit and give you all the 1000 pips profit? Or only give you 100 pips profit? Because presumably slippage works both ways on TP and SL. And in the longer term should cancel out as a negative phenomenon. That is if you are treated equally with both.

 
mikey:

I see. Does it work the other way? - if over weekend there was a massive rise and you had a Buy in over this weekend. So, on Monday if it basically started on 1000 pips over Friday close and your take profit was at 100 pips. On the Monday, would they then cash you out at 1000 pips profit and give you all the 1000 pips profit? Or only give you 100 pips profit? Because presumably slippage works both ways on TP and SL. And in the longer term should cancel out as a negative phenomenon. That is if you are treated equally with both.

its not always a good idea to leave positions opened for the weeken simply because you dont have control over those positions till the market opens.
 
mikey:

I see. Does it work the other way? - if over weekend there was a massive rise and you had a Buy in over this weekend. So, on Monday if it basically started on 1000 pips over Friday close and your take profit was at 100 pips. On the Monday, would they then cash you out at 1000 pips profit and give you all the 1000 pips profit? Or only give you 100 pips profit? Because presumably slippage works both ways on TP and SL. And in the longer term should cancel out as a negative phenomenon. That is if you are treated equally with both.

That is correct, however I say good luck finding slippage in your favor. It does occur now and then (mostly with true ECN), otherwise it is a VERY rare condition, so don't hold your breathe.

 
BillyJoe:

  • If your metatrader terminal is not connected the SL and TP will not be hit because they are not stored on the Broker server.
I believe that is an incorrect statement. TP and SL are stored on the Broker server. However, trailing stops are not.
 
JPS1:
I believe that is an incorrect statement. TP and SL are stored on the Broker server. However, trailing stops are not.

If the TP and SL are stored on the Broker server, are their positions protected in the queue?  

Once the TP price is touched, would my TP turn into market order or limit order?

 
fdeguzman:
  1. If the TP and SL are stored on the Broker server, are their positions protected in the queue?  
  2. Once the TP price is touched, would my TP turn into market order or limit order?
  1. What to you mean by "positions protected in the queue"?
  2. Neither! It is already an opened market order, so when the T/P or S/L is hit, it is simply closed at that price (with slippage, be it negative or positive). Just remember that Buy/Long orders are closed at the Bid price, and Sell/Short orders are closed at the Ask price.
 
fdeguzman:

If the TP and SL are stored on the Broker server, are their positions protected in the queue?  

I am afraid we will not get relevant information on this forum which is mainly about client side (Terminal). We don't have much information about server side.

Once the TP price is touched, would my TP turn into market order or limit order?

It's a market order. (Most people on this forum are mainly experimented on Forex). That's why on other markets with less liquidity it's recommended to use limit orders.

What are you trading ?

 
Alain Verleyen:

I am afraid we will not get relevant information on this forum which is mainly about client side (Terminal). We don't have much information about server side.

It's a market order. (Most people on this forum are mainly experimented on Forex). That's why on other markets with less liquidity it's recommended to use limit orders.

What are you trading ?

Since this question was placed in the MT4/MQL4 section, the OP does not have much of a choice when it comes to the T/P or S/L being hit!

Please correct me if I am wrong, but on MT4 Servers, any Pending order is always converted into a Market order when triggered and after that, once the T/P and S/L is hit, it is simply closed with slippage (be it negative or positive). The trader simply does not have any control of how the T/P or S/L is to be treated (except on "Instant Execution" where a limited level of slippage control is possible).

 
Fernando Carreiro:
  1. What to you mean by "positions protected in the queue"?
  2. Neither! It is already an opened market order, so when the T/P or S/L is hit, it is simply closed at that price (with slippage, be it negative or positive). Just remember that Buy/Long orders are closed at the Bid price, and Sell/Short orders are closed at the Ask price.
Positions protected in the queue meant that if there are 5 orders resting at my TP price, when my TP hits the broker my order will be the sixth in line.  If the price touches my TP price, I will be the 6th order to be served.
I read somewhere that is a way of guaranteeing that your order is already in the queue even before the market hits my TP.  Once the market gets close to my TP, those with very fast latency gets in line first.  I do not have a fast connection.  So sending my TP now which is far from being hit guarantees my position in the queue.
Reason: