Delete and reactivate pending order

 
My system generates pending orders. This works very well. Now I would like to delete my pending order under certain conditions and if the condition is no longer given, then I would like to use the pending order again.

The deletion of the pending order works already. But how can I save the current stop sell or stop buy price before? - I would like to query this ad hoc again live.  Probably the request is ridiculously simple. But I am not really a good programmer.... unfortunately I do not get it at the moment. 
 
Ulrich1983: But how can I save the current stop sell or stop buy price before? -
  1. Either remember them when you open the order. Or select the order and read them.

    Perhaps you should read the manual. Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
       How To Ask Questions The Smart Way. (2004)
          How To Interpret Answers.
             RTFM and STFW: How To Tell You've Seriously Screwed Up.

  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.)
    2. Don't worry about it unless you're scalping M1 or trading news.
    3. 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.