Aurora XAU Momentum
- Experts
- Version: 1.70
- Activations: 20
Here is a step-by-step breakdown of how this EA works:
1. The Trap Strategy (Straddle Pending Orders) When the EA is running and there are no open positions, it immediately sets up a top-and-bottom trap (straddle):
-
The EA places a Buy Stop above the current price at a distance specified by the TrapDistance input.
-
The EA places a Sell Stop below the current price at the TrapDistance . Both of these orders come fully equipped with their respective Stop Loss (SL) and Take Profit (TP) levels. The price is left to move in the middle of this trap.
2. Automatic Execution (One-Cancels-the-Other / OCO) When a price spike occurs (for example, the price of gold suddenly shoots up):
-
The price hits the Buy Stop, converting it into an active Buy position.
-
Detecting that one position is now active, the EA immediately deletes the remaining Sell Stop pending order below.
-
This function protects your account from double entries or whipsaws (where the price spikes up to hit the Buy, then suddenly crashes to hit the Sell).
3. Smart Money Management (Auto Lot & Margin Protection) Before setting the trap, the EA calculates the safest Lot size to prevent you from getting a Margin Call:
-
Risk Calculation: The EA calculates the lot size based on a risk percentage (RiskPercent ). If you set it to 2%, the EA ensures that if the position hits the Stop Loss, you will only lose 2% of your total account Balance.
-
Margin & Volume Filter: The EA checks your remaining Free Margin and the broker's maximum volume limits. If the calculated lot size is too large (as happened previously with XAUUSD and GBPUSD), the EA automatically scales it down to a safe limit allowed by the broker. If the balance is entirely insufficient to open even the smallest lot, the EA safely cancels the order placement.
4. Profit Locking (Advanced Trailing Stop) Once a position is active and starts moving in a profitable direction, the EA employs a strict profit-locking system:
-
Trailing Stop: The SL automatically trails the running price to secure profits in case the price suddenly reverses.
-
Trailing Step: The SL won't shift every single point (which could cause broker server spam/errors). The SL will only jump forward once the price has moved by the TrailingStep distance (e.g., every 20 points).
-
Freeze Level Check: If the price gets very close to the Take Profit target, the EA pauses the Trailing Stop. This allows the price to smoothly hit the TP without triggering a "close to market" rejection from the broker's server.
-
TP Guard: The EA strictly ensures that the dynamically trailing Stop Loss will never exceed or cross the Take Profit price level.
