The EA needs to monitor for new pending orders, once a pending order is opened it needs to change the opening price by an X amount of pips. The EA must have an input parameter for X. If stop loss of the pending order is hit, a new trade must be opened in the opposite direction (with a configurable S/L and trailing stop)