### **Initial conditions:** Bay trade opens at 3033 - **Symbol:** Gold (XAUUSD) - **Current price:** 3033 - **Lot size:** 0.01 - **Take Profit (TP):** 3034 - **Stop Loss (SL):** 3032 - **Price at account closing:** 3034(for example, the account is closed due to reaching Take Profit). --- ### **What the EA should do:** 1. **Monitoring the closed account:** - The EA detects that the account is closed at the price of 3034 (Take Profit). 2. **Checking the current price:** - The EA checks the current price of gold after closing the account. For example, the current price is now 3034. 3. **Decision to open a new pending order:** - Since the current price (3034) is **higher** than the price of the closed order (3033), the EA should open a **Buy ** pending order. - **Price:** 3033 - **Lot Size:** 0.01 - **Take Profit (TP):** 3034 - **Stop Loss (SL):** 3032