Stoploss doesn't work as expected

 

Hi,

to all the experts on this forum. I am quite new to metatrader and mql4 but i have some programming and trading knowledge on other platforms. I made some sample EAs which uses stoplosses but they wont be executed as expected in the strategy analyzer. The execution will be done at the exact stoploss price even if the open price of the new bar is way lower because of a bigger gap and even if there is never a price which meet the stoploss price, it will also be executed at the given stoploss price. Are there any settings from either the broker or in metatrader it self which i can change to make it a real stoploss (execution at the next price after the stoploss limit has been reached?) I tried all 3 simulation modes but all with the same result.

Thanks

Tom

 
Tommykn:

Hi Tom,

I've just come across this rather troubling behaviour myself and was hoping to find a solution online. Only thing I could think of trying was to use a larger value for the allowable slippage, but since this can only be set at OrderSend it is not practical since the slippage would then affect our initial buy/sell price. Unless I'm doing something wrong / missing something, then I believe this is a very serious shortcoming in MT4. This has really shaken my confidence in this platform. It is far too risky to trade automatically when you don't know whether your stoploss will actually be executed!

I guess the other option is to periodically cycle through your open positions and check the current price against your stop. Shouldn't have to go to that trouble but it might be the only way we can have any confidence that we wont be caught in a trade running away in the wrong direction. :-(

Karen

 
True, but the OP states that the tester closes the order at the SL not the first gap price.
The execution will be done at the exact stoploss price even if the open price of the new bar is way lower because of a bigger gap
Reason: