Setting Stop Loss and Take Profit in MT4: Essential Tips for EA Users

Setting Stop Loss and Take Profit in MT4: Essential Tips for EA Users

stop loss and take profit in MT4

Key Takeaways

  • Set stop loss and take profit as prices. Press F9 for a new order, or double click an open trade in the Trade tab, then enter the levels and click Modify.
  • Place the stop where your idea is wrong, then size the trade. Use market structure or ATR for the stop, and adjust the lot size so that distance equals the amount you are willing to risk.
  • “Invalid stops” usually means the broker’s minimum distance. Check the Stops level in the symbol’s Specification, and remember that stop losses on sell trades trigger on the Ask price, spread included.
  • Know how your EA protects you. Check whether its inputs are in pips or points, whether stops are hidden, and whether grid or multi level EAs have a basket drawdown limit.

To set a stop loss and take profit in MT4, press F9 to open the New Order window, enter your stop loss and take profit as prices in the Stop Loss and Take Profit fields, then place the trade. On an open trade, double click it in the Trade tab, enter the new levels and click Modify.

For a buy, the stop loss goes below the entry price and the take profit above it. For a sell, it is the other way round. This guide covers the manual steps, where to place each level, the broker rules behind “invalid stops” errors, and how stop loss and take profit work inside Expert Advisors.

Stop Loss and Take Profit in MT4: The Basics

A stop loss closes your trade automatically at a set price to limit the loss if the market moves against you. A take profit order closes it automatically at a set price to lock in a gain.

Trade Stop loss goes Take profit goes Level is triggered by
Buy Below entry Above entry The Bid price
Sell Above entry Below entry The Ask price

The last column catches many traders out. Because a sell position closes at the Ask price, which includes the spread, a sell stop loss can be hit even when the Bid line on your chart never touched it. If the spread widens during news, this becomes much more likely.

How to Set Stop Loss and Take Profit on a New Trade

  1. Open the order window. Press F9, or right click the chart and choose Trading, then New Order.
  2. Choose the symbol and volume. Check the lot size before anything else.
  3. Enter the stop loss and take profit. Type the exact prices, not pips. For a EUR/USD buy at 1.0850, a 30 pip stop is 1.0820 and a 60 pip target is 1.0910.
  4. Place the order. Click Sell by Market or Buy by Market, or choose Pending Order to set an entry price as well.

Some brokers with market execution do not accept a stop loss or take profit on the opening order. If yours is one of them, the fields are ignored or the order is rejected. Open the trade first, then add the levels straight away using the steps below.

How to Add or Change Stop Loss and Take Profit on an Open Trade

There are two ways to do it:

  • From the Trade tab. In the Terminal window (Ctrl+T), double click the trade, or right click it and choose Modify or Delete Order. Enter the new levels and click Modify.
  • On the chart. If trade levels are shown (Tools, then Options, then Charts, tick Show trade levels), drag the dashed stop loss or take profit line to a new price. You can also drag up or down from the entry line to create a level that is missing.

How to Use a Trailing Stop in MT4

A trailing stop moves your stop loss behind price as the trade moves in your favor. In the Trade tab, right click the trade, choose Trailing Stop and pick a distance, or choose Custom to enter your own in points.

The MT4 trailing stop runs inside your terminal, not on the broker’s server. If you close MT4 or your computer goes offline, the stop stops trailing and stays at its last level. Traders who rely on trailing stops usually run MT4 on a VPS.

Where to Place Your Stop Loss and Take Profit

A stop loss should sit where your trade idea is proven wrong, not at a round number that limits the loss to an amount you like. Then you adjust the position size so that distance equals the amount you are willing to risk.

Method How it works Best for
Market structure Stop beyond the last swing low (buy) or swing high (sell), plus a small buffer for spread Most discretionary trades
ATR based Stop at 1.5 to 2 times the current ATR from entry Adapting to volatility, and EAs
Fixed pips The same distance on every trade Simple strategies and backtesting
Take profit by risk to reward Target at a multiple of the stop, such as 2 times Keeping winners larger than losers
Take profit at a level Target just before the next resistance (buy) or support (sell) Ranging markets

A higher risk to reward ratio is not automatically better. A 1 to 3 target is hit less often than a 1 to 1 target, so what matters is the combination of win rate and ratio over many trades.

Worked example: setting levels and lot size

Say you have a $5,000 account and want to risk 1% per trade, which is $50. You buy EUR/USD at 1.0850, and the last swing low is 1.0825.

  1. Place the stop. Put it a few pips below the swing low at 1.0820, which is 30 pips from entry.
  2. Size the position. $50 ÷ 30 pips = $1.67 per pip. With a standard lot worth about $10 per pip on EUR/USD, that is about 0.16 lots after rounding down.
  3. Set the target. At 2 times the risk, the take profit is 60 pips above entry, at 1.0910.

If the stop is hit, you lose about $48. If the target is hit, you gain about $96. Our guide to the 1% rule in forex explains this sizing method in more detail.

Why MT4 Says “Invalid Stops” (Error 130)

This error means your stop loss or take profit breaks one of the broker’s distance rules. The most common causes are:

Cause What it means Fix
Stops level The broker sets a minimum distance between the current price and any stop loss or take profit Check Stops level in the symbol’s Specification and place levels further away
Freeze level Close to price, the broker blocks changes to existing levels Wait for price to move away, or adjust earlier
Wrong side A buy stop loss above the price, or a sell take profit above the price Check the direction table above
Points vs pips On a 5 digit broker, 30 pips is 300 points Enter distances in the unit your EA or tool expects
Unnormalized price An EA sends a price with too many decimals The EA must round prices to the symbol’s digits

To see the stops level, right click the symbol in Market Watch, choose Specification and look for Stops level, shown in points. MetaQuotes’ MQL4 reference lists the exact rules for stop and freeze levels for every order type, which is useful if you code your own EA.

Remember that a stop loss is not a guaranteed price. When the market gaps, such as at the weekly open or after major news, your stop becomes a market order and fills at the next available price, which can be worse than the level you set.

Stop Loss and Take Profit in Expert Advisors

Most EAs set their own levels from their input settings, so the main job is understanding what those inputs mean.

EA setting What to check
Stop loss and take profit inputs Are they in pips, points or price? A value of 30 means very different things in each
Trailing stop Does it trail from the first pip of profit, or only after a set profit?
Breakeven At what profit does the stop move to entry, and does it add a few pips to cover costs?
Basket or equity stop For grid and multi level EAs, is there a total loss level that closes every trade?
Hidden (stealth) stops Are the levels sent to the broker, or kept inside the EA?

Hidden stops deserve a warning. Some EAs keep the stop loss inside the terminal instead of sending it to the broker, which is often promoted as protection against stop hunting. The trade-off is serious: if MT4 closes, freezes or loses connection, the trade has no stop at all. If you use hidden stops, run the EA on a reliable VPS and keep a wider emergency stop on the broker’s side.

Grid and multi level EAs often do not use a stop loss on each trade. They manage the whole basket instead, closing all trades at a combined profit or at a drawdown limit. If an EA has neither a per trade stop nor a basket stop, losses are open ended.

Whatever the EA, test its stop loss and take profit settings in the Strategy Tester before trading live. Our guide on how to backtest your expert advisor shows how.

XAUBOT, our own platform, lets you set these protections when you customize your bot: stop loss and take profit for Scalp setups, a breakeven option, a daily loss limit, and a maximum drawdown that closes all trades for Multi Level setups. You can download the bot for MT4 from our MetaTrader 4 page and test it free on a demo account first.

Common Stop Loss and Take Profit Mistakes

  • Stops inside normal noise. A 5 pip stop on a pair that moves 80 pips a day will be hit by ordinary movement. Use ATR or market structure instead.
  • Ignoring the spread. Stop losses on sell trades trigger on the Ask, so a stop placed exactly at a level can be hit by the spread alone. Add a buffer.
  • Moving the stop further away. Widening a stop to avoid a loss turns a planned small loss into an unplanned large one.
  • Mixing up points and pips. On 5 digit brokers, an EA input of 30 points is only 3 pips.
  • No stop at all. One large move against an unprotected position can wipe out months of gains.
  • Over tuning on past data. Stop and target values that look perfect in a backtest often fail live. Forward test on a demo account first.

Stop Loss and Take Profit Questions

Why was my stop loss hit before price reached it?

Usually because of the spread. A stop loss on a sell trade is triggered by the Ask price, and one on a buy trade by the Bid price, while your chart shows Bid by default. In MT4, turn on Show Ask line under Tools, then Options, then Charts to see both.

Why did my stop loss close at a worse price?

This is slippage. In fast markets or when price gaps, a stop loss becomes a market order and fills at the next available price.

Can I set stop loss and take profit in money instead of price?

Not directly in MT4’s order window, which only accepts prices. Work out the price from your chosen pip distance, or use an EA or script that converts a money amount into a price.

Does the trailing stop work when MT4 is closed?

No. MT4’s built in trailing stop needs the terminal to be open and connected. The last stop level stays on the server, but it no longer moves.

Final Word

A good stop loss sits where your trade idea is proven wrong, and your lot size makes that loss an amount you can accept. A good take profit gives winners room to outweigh losers. Check the broker’s stops level, watch the spread, and test any EA’s settings before trading live.

Trading forex and CFDs with leverage carries a high risk of loss. Only trade with money you can afford to lose.

5/5 - (1 vote)

Further Reading

Leave a Reply

Your email address will not be published. Required fields are marked *

Share Post

Contents