How to Set a Stop Loss in an EA: Fixed, ATR and Basket/Equity Stops
An EA sets its stop loss in one of three ways: a fixed distance on every trade, a distance taken from volatility (for example 2x ATR), or a basket/equity stop that closes all open positions when their combined floating loss reaches a limit. Fixed stops are simple but ignore volatility, ATR stops adapt but change your lot size with every trade (through position sizing), and a basket stop is the only hard cap a grid EA can have. Golden Viper EA uses none of them: no stop loss and no equity stop, so a basket's loss is limited only by your balance and the broker's stop-out, by the Friday close, or by you stepping in.
Think of a stop loss as insurance on a trade: it caps what that trade can lose, and you pay for it with more frequent small losses. Leaving it out is a design choice with a price, not a free upgrade. A grid EA such as Golden Viper EA runs with no stop loss at all, and in exchange accepts that a deep basket can end in a large loss at the weekend close or in a margin call. This guide walks through stop loss configuration for EA trading on gold, from basic placement to the more advanced volatility-adjusted methods.
In This Guide
What a Stop Loss Does, and What Going Without Costs
- Flash crash protection. Gold can move 500+ points in minutes during an unexpected event, and without a stop, that one event can wipe out your account
- Weekend gap protection: markets can gap open Monday 200+ points from Friday's close, and a stop is what caps the damage
- It defines your risk -- skip the stop and your maximum loss is set by your balance and the broker's stop-out rather than by you
- It enables proper position sizing, since you can't calculate lot size without first knowing where your stop sits
- It preserves capital for recovery. A stopped-out trade costs you 1-2%; a trade with no stop can cost 50-100%
There's a mathematical reason a hard stop matters more than most new traders assume: losses and gains aren't symmetrical. A 10% loss only needs an 11% gain to break even, but a 50% loss needs a 100% gain just to get back to where you started, and a 90% loss needs a 900% gain. That curve is why unprotected trades are so dangerous -- they're the mechanism by which a manageable drawdown turns into an unrecoverable one. Our guide to drawdown walks through that math in more detail, and it's worth reading alongside this one because stop loss discipline and drawdown control are really the same conversation viewed from two angles: one caps the damage on a single trade, the other tracks the cumulative effect across a whole sequence of them.
It's also worth being precise about what a stop loss actually protects against, because "risk" for a gold EA isn't one single thing. A stop protects you from a single bad trade running away from you. It does not, by itself, protect you from a bad run of several trades in a row, from over-leveraging the account, or from running multiple EAs on correlated pairs that all lose at once. Those are separate risk controls -- daily loss limits, maximum open positions, and equity-based lot sizing -- that sit alongside a stop loss on a stop-based system. Regulators that oversee leveraged retail trading, including the CFTC in the US, consistently flag undefined risk as one of the most common reasons retail accounts fail, which is exactly the gap a stop loss is meant to close.
None of this makes a stop loss compulsory for every design, but it makes the trade-off plain. A system without stops, such as an averaging grid, has no per-trade cap: its losses are rare, and when one comes it can take most of an undersized account. Avoid a no-stop system if you need a known maximum loss on every trade, if you would run it on a standard account when it was built for a cent account, or if you cannot sit through a deep floating loss. If you do run one, the account size is your risk control, so size it for the deepest basket, not the average one.
Types of Stop Losses for EAs
Fixed Stop Loss
Every trade uses the same point distance, 200 points for example. It's simple and consistent, but it doesn't adapt to market conditions. That works fine in a stable market, but the same stop can end up too tight during a volatility spike or too wide once things go quiet.
ATR-Based (Volatility-Adjusted) Stop Loss
This method uses the Average True Range indicator to size the stop to current volatility, for example Stop = 2x ATR(14). When volatility rises, the stop widens automatically so you're less likely to get knocked out early. When the market goes quiet, it tightens back down for better risk control. It's the approach most professional traders lean on.
Structure-Based Stop Loss
Stops go behind support/resistance levels, swing highs and lows, or other key price structure. It's arguably the most logical placement method, though it's harder to automate. A handful of advanced EAs do incorporate structure analysis.
Trailing Stop Loss
The stop moves in the direction of profit as the trade develops, locking in gains while still giving the position room to run. It can trail at a fixed distance or follow ATR. Our guide to trailing stops covers the mechanics in more detail, including why trailing too aggressively on gold can cut winning trades short before they've had room to develop.
Breakeven Stop Loss
Once a trade moves a set distance in your favor, the stop is pulled up (or down, on a sell) to the entry price, sometimes plus a few points to cover the spread. From that point on, the worst-case outcome for the trade is a scratch rather than a loss. It's less about maximizing profit and more about removing risk from a position that has already proven itself, and it's a common building block inside EAs that also trail further as the trade extends.
None of these four approaches is universally "best" -- each trades off simplicity, adaptability, and how much the stop moves once it's placed. The table below lines them up side by side.
| Stop Type | Adapts to Volatility | Ease of Automation | Best Suited To |
|---|---|---|---|
| Fixed | No | Very easy | Stable, range-bound conditions |
| ATR-based | Yes | Easy | Most EA-driven trading, including gold |
| Structure-based | Partially | Harder | Discretionary or hybrid strategies |
| Trailing | Depends on method | Easy | Trend-following once a trade is in profit |
| Breakeven | No | Very easy | Protecting an already-profitable trade |
Basket and Equity Stops, and What "No Stop Loss" Means
Grid and averaging EAs hold several positions on one symbol at once, so a separate stop on each level makes little sense. Their options are a basket stop (close every position when the basket's combined floating loss reaches a dollar amount), an equity stop (close everything when account equity falls a set percentage), or no stop at all.
| Stop | What it caps | Trade-off |
|---|---|---|
| Fixed per trade | Each trade's loss in points | Ignores volatility |
| ATR per trade | Each trade's loss, scaled to volatility | Lot size must change with every stop |
| Basket stop | One basket's combined loss | Turns a basket that might have recovered into a realized loss |
| Equity stop | The account's floating loss | Closes everything at the worst point of a drawdown |
| No stop (grid) | Nothing; the balance and the broker's stop-out are the limit | Many small wins, rare but very large losses |
Worked example (illustrative): an equity stop at 20% on a $5,000 account closes every position when the floating loss reaches $1,000. Without it, the same basket can keep falling until the margin level reaches the broker's stop-out, which on a small account can mean losing most of the balance. Golden Viper EA has no stop loss and no equity stop, so its risk is set by the account size you fund, by its Friday close (everything closes before the weekend, even at a loss), and by you: turning off Algo Trading stops new levels, and you can close positions manually from the Trade tab. Size the account with our max drawdown guide and the EA risk management checklist.
Stop Loss and Risk-Reward Ratio
A stop loss never exists in isolation -- it's always one half of a ratio against your take-profit distance. If your stop is 200 points and your target is 200 points, that's a 1:1 risk-reward ratio: you need to win more than half your trades just to come out ahead once spread and commission are factored in. Widen the target to 400 points against the same 200-point stop and the ratio becomes 1:2, meaning a strategy that wins only 40% of the time can still be profitable overall.
This is why two EAs can use an identical stop loss size and end up with completely different risk profiles depending on how far the take-profit sits, or whether the exit is managed dynamically instead of at a fixed target. A tighter stop isn't automatically "safer" if it also comes with a target that's proportionally even tighter -- what matters is the relationship between the two, combined with the underlying win rate. See our breakdown of risk per trade for how this ties into how much of the account you put behind each position.
Stop Loss Sizes for Gold (XAUUSD) by Timeframe
Gold's volatility isn't constant throughout the trading day. It tends to pick up during the London and New York session overlap and around scheduled US economic releases, then quiet down during the Asian session. A stop sized for a calm Asian-session range can be far too tight for the same pair a few hours later once London opens, which is one more argument for volatility-adjusted sizing over a single fixed number applied around the clock. For context on typical intraday ranges and how they shift with the trading calendar, see our guide to gold volatility and best times to trade gold. Futures market data from CME Group's gold contract page is also a useful cross-check on where institutional volatility and volume are concentrated during the trading day.
| Timeframe | Typical Stop Range | Recommended Method |
|---|---|---|
| M1-M5 (Scalping) | 30-100 points | Fixed or tight ATR |
| M15-H1 (Day Trading) | 100-300 points | ATR-based (1.5-2x ATR) |
| H4 (Medium-term) | 200-500 points | ATR-based or structure |
| D1 (Swing) | 500-1000 points | Structure-based |
Stop Loss Placement Strategies
Strategy 1: Below/Above Recent Swing
On buy trades, the stop goes below the most recent swing low plus a small buffer; on sell trades, above the recent swing high. That gives the position room to develop while still keeping the stop at the point where the original trade thesis is actually invalidated.
Strategy 2: ATR Multiplier
Calculate it as Stop Distance = ATR(14) x Multiplier (1.5-3.0). A lower multiplier means a tighter stop: you'll get stopped out more often, but each loss is smaller. A higher multiplier means a wider stop, so premature exits are rarer while any individual loss runs bigger. Finding the right balance matters more than chasing a "correct" number.
Strategy 3: Percentage of Price
Stop distance = Current Price x Percentage (0.5-2%). For gold at $2,000, 1% works out to 200 points. It's a simple method, and it scales automatically as the price moves over time.
Strategy 4: News Event Buffers
Around high-impact releases -- US CPI, Non-Farm Payrolls, FOMC rate decisions -- gold's typical trading range can expand well beyond what an ATR reading calculated a few hours earlier would suggest. Some traders and EAs widen the stop distance specifically around these windows, or avoid opening new positions in the minutes immediately before and after the release altogether. Either approach is aimed at the same problem: a stop that was perfectly reasonable in a calm market can be far too tight the moment volatility spikes. Our guide on how economic news moves gold prices covers which releases tend to matter most for XAUUSD specifically.
How Broker Execution Affects Your Stop Loss
The stop distance you calculate on a chart is only half the picture. What actually happens when that stop is hit depends on your broker's execution model, and for gold in particular, the gap between the two can be meaningful.
Slippage
A standard stop loss is not a guarantee that you'll exit at the exact price you set. It's an instruction to close the position once price reaches that level, and the fill happens at the next available price. In calm conditions the difference is usually a fraction of a point. During a fast move -- a surprise headline, a liquidity gap around rollover, or the first seconds after a major data release -- price can jump past your stop level before the order fills, and the exit lands a few points worse than planned. This is covered in more depth in our slippage guide, but the short version is that execution quality and average spread during volatile windows matter as much as the stop distance you chose in the first place.
Server-Side vs. Client-Side Stops
A server-side stop is registered with the broker's server the moment the trade opens. A client-side stop only exists inside your EA's own logic and has to actively send a close order when price reaches the level, which means it depends on your platform staying connected. If your VPS drops offline, loses power, or your internet connection cuts out, a client-side stop simply doesn't fire. This is one of the more overlooked risk points in EA trading, and it's worth confirming directly with any EA vendor or checking the platform documentation on how stop orders are handled at the trade-server level before assuming your protection is always active.
Guaranteed Stops
Some brokers offer guaranteed stop losses, usually on a subset of instruments and typically at an extra cost through a wider spread or a flat fee. A guaranteed stop fills at the exact price regardless of gaps or slippage, which removes the execution risk described above entirely. For most day-to-day EA trading a standard stop combined with reasonable position sizing is sufficient, but a guaranteed stop is worth considering if you routinely hold positions through scheduled high-impact news.
Common Stop Loss Mistakes
- No stop loss on a system designed to use one. On a stop-based EA, an unprotected trade is the most dangerous mistake you can make, because one trade can end the account. A grid built without stops, such as Golden Viper EA, carries the same risk by design at the basket level, which is why it needs a cent account sized for its deepest basket
- Moving stops away from price. Widening a stop to "give the trade room" just increases your risk and breaks the plan you started with
- Stops set too tight for the timeframe -- a 50-point stop on H4 gold gets hit by ordinary noise constantly
- Round-number stops, placed at exactly 2000.00 or 1950.00 where everyone else puts theirs, which makes them an easy target for stop hunting
- Removing stops during news events -- exactly when you need protection most is exactly when some traders take it off
- Ignoring the spread when sizing the stop -- on a wider-spread account, a stop measured from the bid on a buy trade can effectively be tighter than intended once the spread is accounted for
- Copying someone else's stop size verbatim -- a stop distance that works for one account's timeframe, broker, and risk tolerance won't necessarily suit another
Some of these mistakes are easier to catch when they're laid out against what actually goes wrong and how to fix them:
| Mistake | Why It Hurts | Fix |
|---|---|---|
| No stop loss (stop-based system) | A single bad trade can end the account | Every trade gets a stop before it's placed; if you run a no-stop grid instead, size the account for its deepest basket |
| Widening a losing stop | Turns a defined loss into an undefined one | Set the stop once at entry and leave it, or only tighten it |
| Stop too tight for the timeframe | Gets hit by normal noise, not a real reversal | Match stop size to the timeframe (see table above) |
| Stop at a round number | Sits exactly where stop-hunting liquidity clusters | Offset by 10-20 points from the obvious level |
| Stop removed before news | Removes protection right when volatility risk is highest | Widen the stop or reduce size instead of removing it |
Pro tip: Add 10-20 points of buffer beyond the obvious stop level. If support sits at 1980.00, place your stop at 1978.00 rather than right on the line. That extra buffer helps you avoid stop hunting at the levels everyone else is watching, and professional stop placement always accounts for this kind of market microstructure.
Testing and Validating Your Stop Loss Settings
Before committing real capital to a particular stop loss method, it's worth confirming it actually holds up against historical price action. A backtest run across several years of gold data, covering both trending and choppy periods, will show whether a given ATR multiplier or fixed distance produces a reasonable win rate and drawdown profile, or whether it's tuned so tightly to one stretch of data that it falls apart outside it -- a problem generally known as curve fitting. Testing across multiple gold market regimes, not just the most recent few months, gives a far more honest picture.
A demo account is the next checkpoint. Running the same settings on live price feeds, even without real money behind them, exposes execution details a backtest can miss entirely -- how the broker's actual spread behaves around news, how the stop level compares to the platform's minimum stop distance, and whether the EA is placing and modifying stops the way you expect. Only after both stages line up does it make sense to move to a small live position, then scale up gradually. Golden Viper EA has no stop settings to test, and the version customers buy does not run in the Strategy Tester, so for it the demo step, with the free 3-day trial, is the one that applies. A verified public track record, like the kind published on Myfxbook, is one of the few ways to confirm a strategy's stop loss approach has actually held up under real market conditions rather than just a backtest.
How Golden Viper EA Handles Stop Losses
- No stop loss on individual trades -- Golden Viper EA is an averaging-down grid, and a basket closes at one shared take-profit
- No equity stop -- there is no floating-loss limit either, so the account balance has to absorb a deep basket as gold market conditions change
- Fixed lot ladder: lot size is not calculated from a stop distance or a risk percentage; it starts at a small fixed lot and rises by a fixed step per level (no doubling), with no cap on the number of levels
- Weekend close-all -- everything closes before the weekend, even at a loss, and a new week starts fresh
- Runs inside the EA -- basket management runs on your terminal, not on the broker's server, so keep the EA on a VPS or an always-on PC
Our installation guide walks through the full setup, and this resource is a solid add-on read if you want more background on stop loss fundamentals.
Frequently Asked Questions
What is a good stop loss for gold?
Somewhere in the 100-500 point range depending on your timeframe: scalping runs 50-150, day trading 100-300, and swing (H4) 200-500. Base the number on volatility rather than picking one out of the air.
Fixed or dynamic stop loss?
Dynamic, ATR-based stops are the better choice for most traders. They adapt to volatility, widening in choppy markets and tightening once things calm down. Fixed stops really only hold up in stable conditions.
Should I ever trade without a stop?
Only if you understand what replaces it. A single unprotected trade can wipe out an account during a flash crash or a gap opening, which is why stop-based traders put a stop on every position. A grid with no stop loss, such as Golden Viper EA, takes that risk at the basket level: most baskets close at a small profit, but a deep one can end in a large loss at the weekend close or in a margin call. If you need a known maximum loss per trade, avoid no-stop systems.
Can a stop loss be too tight?
Yes. A stop that sits inside normal market noise gets triggered before the trade even has a chance to develop. If your stops keep getting hit before price proves you right or wrong, that's usually a sign the stop is too close.
Does Golden Viper EA use stop losses?
No. Golden Viper EA does not place a stop loss on its trades. A basket closes at its shared take-profit, and everything closes at the Friday close before the weekend even at a loss; there is no equity stop either. Basket management runs inside the EA on your terminal, so keep the EA on a VPS or an always-on PC.
What's the difference between stop loss distance and risk-reward ratio?
Stop loss distance is how far price can move against you before the trade closes. Risk-reward ratio compares that distance to your take-profit distance -- a 200-point stop with a 400-point target is a 1:2 ratio. The stop defines what you risk; the ratio tells you whether the potential reward justifies taking that risk in the first place.
How does slippage affect a stop loss on gold?
Slippage happens when your order fills at a worse price than the stop level, usually during fast moves or thin liquidity around news releases. Standard stops on gold aren't guaranteed fills, so during a spike the exit can land a few points beyond where the stop was set. Tighter broker execution and smaller size during major news both reduce the impact.
Should I use a guaranteed stop loss for gold EA trading?
Guaranteed stops fill at the exact price regardless of gaps or slippage, but they usually cost more through a wider spread or a fixed fee. For most day-to-day EA trading, a standard stop combined with sensible position sizing is enough. A guaranteed stop is worth considering mainly if you routinely hold through scheduled high-impact news.
Can I set a stop loss based on account percentage instead of points?
Yes, and many EAs work this way internally. You choose the percentage of equity you're willing to risk, and the position-sizing logic works backward from your stop distance to a lot size that matches that percentage. The stop still needs a real point distance on the chart; the percentage controls position size, not where the stop sits.
What is a basket or equity stop in an EA?
A basket stop closes every position in a basket when their combined floating loss reaches a set amount; an equity stop closes all positions when account equity falls a set percentage, for example 20%. Grid EAs use them instead of per-trade stops because their positions share one exit. Golden Viper EA has neither.
What does it mean for risk if an EA has no stop loss?
The loss on an open basket has no preset limit: it can grow until price returns to the take-profit, the EA closes positions on its own schedule, you close them, or the broker stop-out closes them. With Golden Viper EA that means sizing the account for a deep basket, knowing that everything closes at the Friday close even at a loss, and deciding in advance when you would switch off Algo Trading or close positions manually.
Let Golden Viper EA trade gold for you
Automated XAUUSD grid trading for MT5 cent accounts, verified live on Myfxbook. One-time $299, lifetime access.
Get Lifetime Access — $299