2 Easy Ways to Add a Trailing Stop Loss in MetaTrader 4

Trailing Stop MetaTrader 4

Do you need to add a trailing stop loss to your orders as a MetaTrader 4 user? If so, you’re in luck! In this article, I’m going to show you two easy ways to add an MT4 trailing stop.

A trailing stop loss is an essential part of many trading systems. It can help protect you from unnecessary losses, and it can help you capture big moves in price when the market is volatile.

Using a trailing stop loss doesn’t work for every trading technique. It tends to work better with scalping techniques, but many traders prefer to add a trailing stop where they would normally take profits.

How to Use the Built-In MT4 Trailing Stop Loss

The first technique is to use the built-in MT4 trailing stop feature. To do this, simply right-click on the order that you want to add a trailing stop loss to, in the “Terminal” window (Ctrl+T). Navigate to “Trailing Stop”. Select your desired amount of trailing stop points from the preset menu, or select “Custom” to enter a custom number.

Note: Each point is worth 1/10th of a pip, so in order to add a 10 pip trailing stop to your order, you would need to enter a custom value of 100 points.

Built-In MT4 Trailing Stop Loss

Using the built-in MT4 trailing stop, when price moves in your favor by the amount of pips that you set, your stop loss is basically moved to break even. From there, when price moves in your favor, your stop loss moves by the same amount.

Example: You set a custom trailing stop value of 200 points, giving you a 20 pip trailing stop. If price moves in your favor by 20 pips, your stop loss will moved to break even.

If no new points are gained, your stop loss will not move. If price continues to move in your favor, your stop loss will continue to trail behind price by 20 pips.

If price eventually moves 400 points (40 pips) in your favor, your stop loss would be at +20 pips (40 total pips in your favor, minus your 20 pip trailing stop).

Custom Value Built-In Method

When using this method, you cannot move your stop loss to true break even, because you can’t lock in a set amount of pips (say 2 or 3) to cover your trading costs. It’s also important to note that the built-in MT4 trailing stop relies on your trading platform being open. It’s not handled by your broker’s server like a regular stop loss.

Add a Trailing Stop Loss to MetaTrader 4 with an EA

EAs are a slightly better way to add an MT4 trailing stop loss, in my opinion. There are many different trade management Expert Advisors (EAs) that can handle trailing stops and more for you. The one I’ve chosen to upload here is relatively simple, compared to other trade management EAs, but simple can be good.

The EA that I’ve uploaded adds a simple trailing stop feature, with a few more options than the built-in MT4 trailing stop. There is also a feature to move your stop loss to break even while locking in a set amount of pips (which can be useful for covering your spread cost and/or commission).

Allow Automated Trading

In order to use any EA that adjusts your trading levels, you have to allow automated trading. For this EA to work, and most others, you also need to allow DLL imports. Your MetaTrader 4 platform should be set this way by default.

To check your settings go to your “Options” (Ctrl+O or Tools > Options). Under the “Expert Advisors” tab, make sure “Allow automated trading” and “Allow DLL imports” are checked (see the image above).

Note: You can also allow these settings under the “Common” tab of the EA, but setting them through the EA has to be done each time the EA is applied to a chart.

How to Use the FPA=TrailingStop EA

Metatrader 4 Trailing Stop EA Settings

Variable: Break_Even_Trigger_in_Pips
Function: Set this to the number of pips you require the market to move in your favor before your break even is triggered. Set this to 0 or a negative number to deactivate the break even function.

Variable: Break_Even_in_Pips
Function: This is where your actual break-even level will go. The default value of 1 means, when/if your break even is triggered, your stop loss will move to your entry level +1 pip (useful for moving to true break even).

Variable: Trailing_Stop_in_Pips
Function: This is the amount of pips you want as a trailing stop loss. If “Trail_before_break_even” (below) is set to “false”, this function will not be activated until your break even trigger is hit.

Variable: Trail_before_break_even
Function: When set to “true”, your trailing stop will begin trailing price right away. When set to “false”, your break even value must be triggered before this function is activated. If you disabled the break even feature (by setting Break_Even_Trigger_in_Pips to 0 or a negative number), you can manually activate this function by moving your stop loss to break even or better.

Variable: Apply_to_all_symbols
Function: Set to “true” if you want all of your trades to be managed by applying this EA to only one chart. You would only use this feature if none of the values above need to be changed from trade to trade.

Installation Instructions:

  1. Download and extract the FPA=TrailingStop EA.
  2. Move it to your “Experts” folder (MetaTrader 4 > MQL4 > Experts).
  3. Start or restart MT4.
  4. Open your “Navigtor” window, if it’s not already open (Ctrl+N).
  5. Drag the FPA=TrailingStop EA onto your chart.
  6. Adjust your desired settings and hit the “OK” button.

There are other free trade management EAs available, but I like this simple solution for adding a trailing stop loss in MetaTrader 4. If your trading system requires a simple trailing stop, and the built-in MT4 trailing stop can’t get the job done, the FPA=TrailingStop EA might be just what you’re looking for. Have any questions? Let me know in the comments below.

32 thoughts on “2 Easy Ways to Add a Trailing Stop Loss in MetaTrader 4”

  1. So with this indicator it doesn’t close out until there is a reversal and it hits the last trail stop met. correct?

    Reply
  2. Hi Chris,

    Upon using FPA, can I still set my desired SL and TP in the chart or the EA will cover it automatically? TIA

    Reply
    • Another question, do I still need to set my Take Profit or it would be better if not to have unlimited profit for a trending market. Thanks again.

      Reply
      • You can set your own SL and TP in the chart. Whether or not you should use a take profit depends on your trading system. Typically, if you’re using a trailing stop, you don’t use a take profit.

        Reply
    • I would suggest always setting a stop loss before entering any trade. Not only is it a good idea for the obvious reasons, it will also help to keep you from being added to your broker’s bucket shop.

      Reply
  3. I have an existing EA that has no trailing stop loss option. If I was to add yours, would the functionality of my existing EA be affected? I simply want to add the trailing stop loss to my existing EA.

    Reply
    • You can’t add more than one EA to a chart, but you could open another chart of the same currency pair and then add the other EA to that chart.

      If you’re talking about editing the code, I’m not sure. I guess it depends on the code you’re trying to add. I’m not a coder but I’m sure you could find someone to do that for you.

      Reply
  4. I successfully loaded the EA into my MT4 platform. However, after attaching the EA to one of my charts, I can’t change any of the default inputs in the EA. For example, I can’t change the Break Even trigger from 30 pips to a higher or lower value (same with the trailing stop figure). How can I edit/change the default values in the EA? I’m new to MT4…so I apologize for the dumb question in advance.

    Reply
  5. can i get to set this EA to lock in my cost of transaction(say 2pips) immediately the trade moves in my favour so i am sure of actually breaking even immediately without waiting for my target Break_Even_Trigger_in_Pips value. Thanks man

    Reply
    • Yes. However, if you don’t give the market a little breathing room, it will come back and hit your stop loss at the first minor retracement or hesitation.

      Reply
  6. Hi, I have been looking for an EA with an option to start trailing straight away, i.e. as soon as price moves in my direction. But would it be possible to add Stop Loss and Take Profit options to this EA? That would save me having to use two separate EAs for my scalping strategy.

    Reply
    • This EA isn’t mine, so I have no control over adding features. It’s just a good trailing stop EA that I found for my readers. It IS possible to start trailing your stop loss right away with this EA, though.

      Reply
  7. Hi will this allow me to engage the trailing stop loss where I want e.g I want it to begin the trailing stop by 10 pips once the trade is 50 pips in my favor?

    Reply
    • There are two methods for a trailing stop shared in this post. The FPA EA will do what you’re asking. The MT4 built-in trailing stop doesn’t give you as much control.

      Reply
  8. hello chris thank you for the information provided, i would like to ask you i have a EA-scalper that works pretty good with great gains but since it doesn’t have a stop loss when the market turrns theres no way of stopping the loses so i was wondering if the FPA=TrailingStop will work to solve the problem? thank you in advance for your response.

    Reply
    • Give it a try. See if it works for you. Do it on a demo account first if you’re unsure. Using 2 EAs, you’ll just have to put each on separate charts of the same currency pair.

      Reply
  9. Hi, Chris,
    I wonder if this EA can also “Break Even in Pips” for negative pips (like the “Break Even EA”)?
    thanks in advance.

    Reply
  10. Hi Chris. I am loving your services very much. Thanks for the good job. Chris can you help me with a pretty good EA for scalping? For the meantime i want to purchase the Steve Nison’s candle stick pattern per your recommendation. However, I will be very glad if i can get another EA that can help me to scalp, since although I am beginner, i see myself as a scalper. Thanks

    Reply
    • Sorry for the late response, Louis. I’m very busy this time of year. I’ve never used trading EAs. I only use EAs that supplement my manual trading, so I can’t help you there.

      I’d also say that scalping is not beginner friendly in my experience. If you don’t have the patience for swing trading, then you might try trading shorter time frames like the 15-minute chart.

      Reply
    • That’s going to depend on a lot of things including what trading system you’re using it with, what time frame you’re trading on, what session you’re trading in, etc… just to name a few. You have to experiment to see what works best for you and your trading plan.

      Reply
      • Thank You Sir.

        My question is:
        While up trending, I do a buy order.
        The market might go up or down.

        While market goes up, the Trailing Stop moves to a new level and so on.
        While market goes down, the Trailing Stop at latest Trailing Stop level.
        (TP should be 40 Pips at least)
        (Don’t want to trigger the BreakEven at this moment except the trend plunges)

        When the up trend is going to the end, my EA sends an Exit signal to
        close the order.

        How to set the “FPA=TrailingStop” ?

        Reply
        • As I mentioned before, you have to experiment with it to see what works best for YOU and YOUR trading system. This is just a tool. I don’t know the ins and outs of your system. You need to test to see what works for you.

          Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

30 Shares
Tweet11
Pin
Share19