Regarding the issue of setting stop-loss and take-profit orders

 

I currently have a PING of 2XX MS on the broker's server connection.

I would like to ask whether a high delay will cause to fail placement of stop-loss and take-profit prices, even if the trade position is opened successfully ?????

I have noticed that sometimes the orders I place seem to lack stop-loss and take-profit points, even though my EA should have these points set.

 
Chou Hei Leong:

I currently have a PING of 2XX MS on the broker's server connection.

I would like to ask whether a high delay will cause to fail placement of stop-loss and take-profit prices, even if the trade position is opened successfully ?????

I have noticed that sometimes the orders I place seem to lack stop-loss and take-profit points, even though my EA should have these points set.

it is far more likely to cause you to get delayed prices or less ticks or skipped ticks, but yes, it is possible that any delay might result in the broker inable to accept your asking price, that is, "if" your stop loss or takeprofit is too close to the current price.

However, i think it is very unlikely with 200ms. maybe 400ms or above that is a possibility.

 
Chou Hei Leong:

I currently have a PING of 2XX MS on the broker's server connection.

I would like to ask whether a high delay will cause to fail placement of stop-loss and take-profit prices, even if the trade position is opened successfully ?????

I have noticed that sometimes the orders I place seem to lack stop-loss and take-profit points, even though my EA should have these points set.

It is far more likely that your ea is not optimal. For example if the broker does not accept your asking modification to your stoploss or your takeprofit, then your ea should be able to extend the distance from the current price, and then automaticly retry to make the change with the updated asking prices.

 
Chou Hei Leong: I have noticed that sometimes the orders I place seem to lack stop-loss and take-profit points, even though my EA should have these points set.

Your EA is broken; fix it.

  1. It should have logged the error; it didn't.
  2. It should have retried on the next tick; it didn't.
  3. You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
              Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial

    On some ECN type brokers, the value might be zero (the broker doesn't know). Use a minimum of two (2) PIPs.

    The checks a trading robot must pass before publication in the Market - MQL5 Articles (2016)

Reason: