Gapping below stop loss: automatic close?

 

Hello

A thought has crossed my mind, in those circumstances where high impact news causes a massive gap in the market/chart, if I have an open long near neither stop or take profit, and the gap changes the price down to below my stop loss, would the trade server automatically close the trade, or would it be down to the EA to check that the trade should be closed and send a separate close or could it be down to the broker who acts differently per broker.


What do you do?

 
If the trade has been sent to the broker with a Stop loss, then the broker will close the trade. If the price has gapped beyond your stop loss, the trade will be closed at the price, not your stop loss.
 
If the gap develops during a trading session, the position gets closed at any price after the SL line has been crossed. When the gap appeared between trading sessions, then the position remains open, and the SL is active, and needs price to cross it the other way round.
 
Ovo:
If the gap develops during a trading session, the position gets closed at any price after the SL line has been crossed. When the gap appeared between trading sessions, then the position remains open, and the SL is active, and needs price to cross it the other way round.
That kind of stinks.  So if the price gaps below the in-place SL when the market is closed, and it keeps heading the wrong way from your SL, your account can get wiped out?
 
JD4:
That kind of stinks.  So if the price gaps below the in-place SL when the market is closed, and it keeps heading the wrong way from your SL, your account can get wiped out?
Yes. This rule is not specific to forex, it is applied to stocks or futures exchange as well.
 
That can be an issue, well, something to pay attention to when I finally get a program going.  On market open, do a test against current price, and compare to SL.  So many little details we have to watch out for.  This is another one to add to the list.
 
JD4:
That kind of stinks.  So if the price gaps below the in-place SL when the market is closed, and it keeps heading the wrong way from your SL, your account can get wiped out?

No - that's not correct.  I've confirmed with the broker (FXCM) that GumRai is correct - the server will see that price is below (long) your SL and close the trade *ASAP*.  If price 'keeps heading the wrong way" it won't matter as the server *should* have closed the trade. 

The only time I can expect the situation to 'get worse' is if there are so many trade closures to do, further price changes come in before the servers have had a chance to close your trade.  Its basically a best endeavours business.  Look what happened to Alpari UK when they tried that in JAn 2015 when the Swiss National Bank unexpectedly removed the franc's ceiling against the euro (https://en.wikipedia.org/wiki/Alpari_Group).

Better ensure your robots are very profitable in the mean time then!

 
TY for the update Dog, that is good to hear.  But I think it is still a good idea to have the program watch out for it, just in case, because you never can tell what might happen.  You might have one of the few brokers that actually looks out for their customers like that.
 
JD4:
You might have one of the few brokers that actually looks out for their customers like that.

There is no need for conspiration theories here. Stop Loss is just a (limit) stop order in the opposite direction of your position. How else should it work than the way GumRai explained in the first place?

Some brokers offer a stop level and a limit price, under/over which the order will not be executed regardless of crossing the stop level (stop limit order, unknown to MQL afaik). This would allow a bad position to at least reach again a predefined stop loss limit although the SL was activated already.

Something like that could be programmed in an EA. In fact, there are a some programmers who try keep their EAs order management hidden from the broker. They check for SL conditions inside their EAs and don't use 'hard' SL. This can get quite dangerous if for any reason you loose connection to the trade server and that is why many of them place an emergency SL very far away from the current price action anyway.

I know a programmer who doesn't let the EA run on the connected MT4 platform out of mistrust towards his broker. He thinks it would be too easy for the broker to learn EAs' strategy if it was left trading on the brokers server just like that. So they program one MT4 instance on a different server, which only forwards the trade operations to the MT4 that actually places the trades.

 
PomeGranate:

There is no need for conspiration theories here. Stop Loss is just a (limit) stop order in the opposite direction of your position. How else should it work than the way GumRai explained in the first place?

Some brokers offer a stop level and a limit price, under/over which the order will not be executed regardless of crossing the stop level (stop limit order, unknown to MQL afaik). This would allow a bad position to at least reach again a predefined stop loss limit although the SL was activated already.

Something like that could be programmed in an EA. In fact, there are a some programmers who try keep their EAs order management hidden from the broker. They check for SL conditions inside their EAs and don't use 'hard' SL. This can get quite dangerous if for any reason you loose connection to the trade server and that is why many of them place an emergency SL very far away from the current price action anyway.

I know a programmer who doesn't let the EA run on the connected MT4 platform out of mistrust towards his broker. He thinks it would be too easy for the broker to learn EAs' strategy if it was left trading on the brokers server just like that. So they program one MT4 instance on a different server, which only forwards the trade operations to the MT4 that actually places the trades.


Not saying conspiracy, just saying, to misquote a borrowed phrase, "slip happens."  Some brokers might not have the same protection for their customers in place as others do is all, not that they are intentionally trying to screw their customers over, just that might be how their system works.  Computers are designed to do exactly what they are told, even if they are told to do something incorrectly, including the possibility that someone coded it to activate if the stop loss was hit, but, if it was hit during the time when the market was closed, as in normal trading times, the code might not recognize that it happened.