add delay in seconds from sending the signal

 
hi, i would like to add a delay in seconds from the time my ea should open 

example: my expert now finds an opportunity but opens after a few seconds

Thanks
 
Sleep(1000);
 
Documentation on MQL5: Common Functions / Sleep
Documentation on MQL5: Common Functions / Sleep
  • www.mql5.com
Sleep - Common Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
  1. Sleep does not work in the tester.
  2. Remember the delay time (= current time + nSeconds) in a global/static variable. Return for a new tick, ignore those before the delay time.