Pending order

 

I'm trying to set a pending order, and want the order to expire at the end of the 4hr candle, however when I set everything up it flashed up with 'invalid expiration'. Not sure why this is happening? 

 
Robert: I'm trying to set a pending order, and want the order to expire at the end of the 4hr candle, however when I set everything up it flashed up with 'invalid expiration'. Not sure why this is happening? 

If you want help, then show us what you are doing. We cannot read your mind or see your computer.

 
  1. Not all brokers allow expiration. Ask yours.
  2. There is no need to create pending orders in code.

    1. The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)

      Don't worry about it unless you're scalping M1 or trading news.

    2. Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.