Stop loss

 

Good afternoon MetaTrader,


How are you? I'm fine. The problem that I'll announce has appeared 2 times already. I have set a stop loss way below the price of the chart is and it says it had hit my stop loss, even though it wasn't even closed and lost  much money because of this problem. This has happend on the forex market, if you could send anything or fix this problem, I would be delighted.

I hope to hear from you soon.


Kind regards,

557311 (Thomas Boersma.)

Files:
IMG_2778.jpeg  21 kb
IMG_2777.PNG  171 kb
 
Renzo Sales:

Good afternoon MetaTrader,


How are you? I'm fine. The problem that I'll announce has appeared 2 times already. I have set a stop loss way below the price of the chart is and it says it had hit my stop loss, even though it wasn't even closed and lost  much money because of this problem. This has happend on the forex market, if you could send anything or fix this problem, I would be delighted.

I hope to hear from you soon.


Kind regards,

557311 (Thomas Boersma.)

Based on your 2nd image posted, your stoploss was struck because there is no stoploss level in the image.

I suspect that increased slippage and/or spread reached out and touched your stoploss. Keep in mind that slippage and spread can constitute a large part of the average M1 bar─bars are inherently smaller on lower timeframe charts.

You buy at the ask (higher) and sell at the bid (lower). Most FX broker-dealers don't offer stop-limit orders, hence the potentially detrimental slippage.

 
Renzo Sales:

Good afternoon MetaTrader,


How are you? I'm fine. The problem that I'll announce has appeared 2 times already. I have set a stop loss way below the price of the chart is and it says it had hit my stop loss, even though it wasn't even closed and lost  much money because of this problem. This has happend on the forex market, if you could send anything or fix this problem, I would be delighted.

I hope to hear from you soon.


Kind regards,

557311 (Thomas Boersma.)

" way below" is not a quantitative metric.

Need more info and desirebly better pics.

 

I do not know your particulare case/issue but from what I know - the charts, the price on the charts, the symbols to trade, and the names of the symbols, and the time of the price on the chart - all of them are related to the brokers only. It is not related to Metatrader software sorry.

-----------------

About it is about bid/ask price (the charts show Bid prices only):

Forum on trading, automated trading systems and testing trading strategies

How to use OrderTotal value as a variable

William Roeder, 2023.07.07 13:38

  1.   ticket = OrderSend (Symbol() , OP_SELL , 0.5 , Bid , 0 , Bid + 100*Point , Bid - 250*Point , "venda" , 0, 0 , Red ); //ordersend

    Why did you post your MT4 question in the MT5 EA section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  2. You buy at the Ask and sell at the Bid. Pending Buy Stop orders become market orders when hit by the Ask.

    1. Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid / OrderClosePrice reaches it. Using Ask±n, makes your SL shorter and your TP longer, by the spread. Don't you want the specified amount used in either direction?

    2. Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask / OrderClosePrice reaches it. To trigger close at a specific Bid price, add the average spread.
                MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25

    3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)

      Most brokers with variable spreads widen considerably at end of day (5 PM ET) ± 30 minutes.
      My GBPJPY shows average spread = 26 points, average maximum spread = 134.
      My EURCHF shows average spread = 18 points, average maximum spread = 106.
      (your broker will be similar).
                Is it reasonable to have such a huge spreads (20 PIP spreads) in EURCHF? - General - MQL5 programming forum (2022)

  3. You check for the count to be zero and then open an order. Only then will your loop be run. The newly opened order will always be in loss (the spread).

 
Renzo Sales:

Good afternoon MetaTrader,


How are you? I'm fine. The problem that I'll announce has appeared 2 times already. I have set a stop loss way below the price of the chart is and it says it had hit my stop loss, even though it wasn't even closed and lost  much money because of this problem. This has happend on the forex market, if you could send anything or fix this problem, I would be delighted.

I hope to hear from you soon.


Kind regards,

557311 (Thomas Boersma.)

It’s important to remember that Buy positions are closed at the Bid price, while Sell positions are closed at the Ask price.
Usually, charts only show the Bid price by default.

In many cases, during high volatility or news events, the spread widens significantly.
Even if the candle on your chart didn't seem to touch your SL, the "Ask" line (for a Sell) or a quick spike in spread could have triggered it.
I suggest enabling the "Show Ask price line" in your chart settings to monitor this more accurately in the future.

hope this help.