How to set a stop loss and take profit on MetaTrader 5

Unknown Author

01 Jan, 0001

A man in glasses sits at a desk smiling while trading on both a laptop and smartphone, with financial charts displayed on the screens.

Stop-loss (stop-loss) and take-profit levels (take-profit) help automate the trading process by establishing predetermined exit points. This ensures traders stick to their strategy and avoid emotional decisions. By setting stop-loss, traders limit potential losses, while take-profit ensures they lock in gains when the market reaches its desired target.

Let's discuss how traders can set stop-loss and take-profit levels on MT5. 

This is an example only to enhance a consumer's understanding of the strategy being described above and is not to be taken as Blueberry Markets providing personal advice.

Stepwise guide to set up stop-loss and take-profit orders

For a new trade

  1. Log into the MT5 platform

The trader begins by launching MetaTrader 5 (MT5) on their computer or mobile device. They must enter their trading account credentials to access the platform.

  1. Access the desired instrument's chart

The trader navigates to the Market Watch window and searches for the desired financial instrument. Once found, they open its chart for analysis.

  1. Right-click to open the context menu

On the chart, the trader can right-click anywhere to open the context menu. This menu provides options for trading, chart customization, and technical analysis tools.

Screenshot of the MetaTrader 5 platform showing a price chart with the right-click context menu open, highlighting trading and chart options.

image source 

  1. Select 'trading' from the menu

The trader selects the 'Trading' option from the context menu. This reveals additional trading-related actions.

MetaTrader 5 screenshot showing the right-click trading menu with options to set Sell Limit, Buy Stop, Take Profit, Alert, and New Order.

image source

  1. Choose 'new order'

The trader selects 'New Order' from the submenu to open the order window. Here, trade details are entered.

MetaTrader 5 Market Watch window with EURUSD highlighted and the right-click menu open, showing the ‘New Order’ option selected.

image source 

  1. Enter trade details

The trader specifies the trade volume (number of lots) and selects the order type based on their trading strategy.

MetaTrader 5 order modification window for EURUSD showing fields to set price, stop-loss, take-profit, and expiration details.

image source

  1. Specify stop-loss level

In the order window, the trader enters the desired stop-loss level to automatically close the trade if the market moves against them.

MetaTrader 5 chart with the New Order button highlighted, showing fields to set volume, price, stop-loss, and take-profit before placing a trade.

image source

  1. Activate the trailing stop option

The trader checks the 'Trailing Stop' box below the stop-loss field to activate the trailing stop feature.

MetaTrader 5 context menu showing the steps to set a trailing stop on an open trade, with the option selected at 60 points.

image source

  1. Set trailing stop distance

The trader defines the trailing stop distance in pips, indicating how far the stop-loss should trail the market price.

MetaTrader 5 platform with the Trailing Stop settings window open, allowing the trader to enter a custom trailing stop distance in points.

image source

  1. Confirm settings

To ensure accuracy, the trader reviews all the trade details, including stop-loss and trailing stop settings.

MetaTrader 5 Options window on the Charts tab, showing settings for trade levels, trade history, and chart customization options.

image source

  1. Execute trade

Once satisfied, the trader clicks 'Buy' or 'Sell' to place the trade, and the stop-loss and trailing stop settings are applied.

MetaTrader 5 order window prompting the trader to accept or reject new quotes, with fields for volume, stop-loss, and take-profit.

image source

For an existing trade

  1. Double-click on a trade in the trade window

The trader double-clicks on an open trade in the 'Trade' tab to open the modification window.

MetaTrader 5 Options window on the Trade tab, showing settings for symbol, volume, deviation, stop levels, and the One Click Trading option.

image source

  1. Modify stop-loss and take-profit

In the modification window, the trader updates the stop-loss and take-profit levels to new desired values.

MetaTrader 5 chart with the New Order button highlighted, showing the order panel where traders can set volume, price, stop-loss, and take-profit.

image source

  1. Drag the stop-loss and take-profit levels

Alternatively, the trader can drag the stop-loss and take-profit levels directly on the chart for quick adjustments.

MetaTrader 5 trading platform with the order window open, showing fields for volume, stop-loss, and take-profit before executing a market order.

image source 

  1. Right-click and select 'Modify or Delete'

The trader right-clicks on the trade in the 'Trade' tab and selects ‘Modify or Delete’ to access the modification window.

MetaTrader 5 context menu with the ‘Modify or Delete’ option highlighted, used to adjust stop-loss and take-profit levels on an existing trade.

image source

  1. Enter new stop-loss and take-profit levels

The trader inputs the new stop-loss and take-profit levels in their respective fields in the modification window.

 TradingView chart of GBP/USD with a visible stop-loss and take-profit zone highlighted, showing trade setup on a 15-minute timeframe.

image source

  1. Click ‘Modify’ to confirm

After entering the new levels, the trader clicks 'Modify' to apply the updated stop-loss and take-profit settings.

 MetaTrader 5 modification window for an open EURUSD sell trade, showing fields to set stop-loss and take-profit levels with current trade details below.

image source 

How to create a custom trailing stop-loss indicator on MT5?

  1. Open MetaEditor

The trader opens MetaEditor, the development environment for creating custom indicators in MT5.

 MetaEditor development environment in MetaTrader 5 showing code and indicator files, used to create or customize trading indicators.

image source

  1. Navigate to File > New > Indicator

The trader selects 'New Indicator' from the File menu to start creating a custom trailing stop indicator.

Windows File Explorer showing how to copy a custom MQL5 indicator file from the Downloads folder into the MetaTrader 5 Indicators directory.

image source

  1. Define indicator properties

Based on their strategy, the trader sets the calculation methods and displays settings for the new trailing stop indicator.

MQL5 Wizard window in MetaTrader 5 showing drawing properties for a custom indicator, with options to set label, type, and color.

image source

  1. Implement trailing stop logic

The trader writes code to track market highs and lows, adjusting the stop distance according to predefined conditions.

  1. Include initialization code

The trader adds initialization code for variables and buffers that store trailing stop values.

 MetaTrader 5 Journal tab showing system log details with a highlighted entry and keyboard shortcut instructions to copy text using Ctrl + Shift + C.

image source

  1. Draw trailing stop levels on the chart

The trader uses graphical objects to display trailing stop levels on the price chart.

 MetaTrader 5 order panel with stop-loss and take-profit levels set, displayed as red and green lines on the EURUSD H1 chart.

image source

  1. Compile the indicator

The trader compiles the custom indicator in MetaEditor to check for errors and generate a usable .ex5 file.

 MetaTrader 5 platform with the File menu open and the ‘Open Data Folder’ option highlighted, used to access platform files and indicators.

image source

  1. Test the indicator

The trader tests the custom indicator on historical data to ensure it functions correctly.

  1. Deploy the indicator

The trader copies the compiled .ex5 file to the 'Indicators' folder in MT5.

  1. Apply the indicator to the chart

The trader drags and drops the custom trailing stop-loss indicator onto the price chart via the Navigator panel.

Common mistakes to avoid while setting custom stop-loss/take-profit orders

Failing to account for market volatility

Ignoring market conditions leads to poor stop levels. Volatility impacts price movements, affecting stop-loss effectiveness. Hence, traders must adapt stop levels accordingly, considering fluctuations in price to avoid premature exits or missed opportunities.

Over-tightening stop-loss or take-profit

Setting excessively tight stop-loss levels increases the risk of being stopped out prematurely. Tight take-profit targets limit profit potential, often leading to missed opportunities. Proper distance ensures trades have room to develop and reach gain targets.

Not adjusting stop-loss and take-profit after entering the trade

Failing to modify stop-loss or take-profit can leave a trade exposed to risk. As market conditions change, traders must adapt their levels. Regularly adjusting ensures better risk management and prevents losses due to unchanged parameters.

Placing stop-loss and take-profit too close to each other

Setting stop-loss and take-profit too close results in frequent stop-outs. This approach limits trade opportunities, as price movements may not reach the target before hitting the stop-loss. Proper distance between stop-loss and take-profit allows for proper trade development.

Set stop-loss and take-profit with confidence

By using trailing stop-losses in MT5, traders can adapt to market movements and reduce the risk of large losses. As the market price moves in their favor, the stop-loss moves with it. This approach helps traders manage their trades better, providing a disciplined strategy to navigate volatile forex markets. 


Disclaimer: All material published on our website is intended for informational purposes only and should not be considered personal advice or recommendation. As margin FX/CFDs are highly leveraged products, your gains and losses are magnified, and you could lose substantially more than your initial deposit. Investing in margin FX/CFDs does not give you any entitlements or rights to the underlying assets (e.g. the right to receive dividend payments). CFDs carry a high risk of investment loss.