1. **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 - **Order closing price:** 3032 (for example, the order is closed due to reaching the stop loss). ## **What the EA should do:** 1. **Following the closed order:** - The EA detects that the order is closed at the price of 3032 (Stop Loss). 2. **Checking the current price:** - The EA checks the current price of gold after closing the order. For example, the current price is now 3032. 3. **Decision to open a new pending order:** - Since the current price (3032) is **lower** than the price of the closed order (3033), the EA should open a **Buy Stop** pending order. 4. **Setting parameters for the new pending order:** - **Lot size:** 0.01 (same as the previous order).** sets the Buy Stop at the price of 3033 - **Take Profit (TP):** 3034 - **Stop Loss (SL):** 3032