Categories: ForexMT4 Tutorials

Amazing Way to “Partial Close” Trades Automatically in MT4

Let’s talk Partial Close (a.k.a. scaling out of position). I will explain how you can close position partially in MetaTrader 4 platform and give you an opportunity to have automated Partial Close option.

I am sure you already know what Partial Close is, but in case you haven’t heard of it before let me explain.

Partial Close is when you close a fraction of your position to lock in profit and leave a portion running to take advantage of any further price runs. Often Partial Close comes in a combination with Break Even. This means that you move stop loss to an open price or a few pips in profit.

A simple example would be if you hold a 1.0 lot trade and then once it reaches +50 pips in profit you close 25% of it (which would be 0.25 lot) leaving the rest of 0.75 lot to run. At this point you can move stop loss to an open price so if the price reverses you will get stopped out of that 0.75 trade with zero profit, but in overall you end up in profit because you closed 0.25 trade at +50 pips previously. And if the price continues to move in your favor obviously you can scale out again and again.

In this picture we see 75% of the EURUSD trade is still running while 25% of that trade was scaled out (Partially closed).

I should note that Partial Close not always benefit the trader. It might not work on some strategies and some might even produce worse results. Obviously, you need to test Partial Close well on each of your strategies to see if it improves the strategy. And when you are closing the trades note that Longs are closed at BID price and Shorts are closed at ASK price.

More detailed explanation about Partial Close can be found on Tradimo.

Partially Closing Positions in MetaTrader 4

The process is fairly very easy, however after speaking with a lot of traders I’ve found out that only few of them know about this option.

In the picture below you see my list of trades running in the “Trade” tab of my MT4 platform.

List of open positions in the Trade tab of MT4 terminal.

To partially close that EURUSD short position I need to double click on any column (except for the S/L and T/P columns) of that trade which would open a window like this.

Order Close window in the MT4 platform from where I can scale out from a trade.

Note that “Volume” field shows “1.00” value, which is the size of my EURUSD order. If I click the yellow “Close” button the whole order would be closed completely.

To close only part of my order I need to enter lot size of how much I want to close (scale out) in the “Volume” field. In the picture below you see I have entered 0.5 lot size.

Closing half of the position in MT4 client terminal.

Now when I click the yellow “Close” button it would close only half of my position, because 0.5 is half of my original 1.0 lot size. If I entered 0.25 lot size to close, this would mean I am closing 25% of my initial 1.0 lot size order. As you might already understand, you cannot close orders partially if they are lower than 0.02 size. I mean you cannot close part of the 0.01 lot size trade, unless your broker supports lots lower than 0.01.

Let’s see what happens when I click the yellow “Close” button now.

Partially closed order still running on MT4 account.

My order was partially closed and I have the remaining 0.5 lots still running. You can see in the picture above the trade “Comment” column says “from #16785957” which means this trade was scaled out from a trade #16785957. And if we look at the list of closed orders in the “Account History” tab we will find this closed trade (0.5 lot) and it has a trade comment which says “to #16799089“. It means that this order was scaled out to a trade #16799089. This is how you can recognize if a trade was closed partially or not.

Partially closed order in the Account History tab on MT4 client terminal.

Another way to close orders partially

Instead of double-clicking, you can click right mouse button on the order you want to close partially. When you do this a contextual menu will appear.

You can close trade partially from the contextual menu of a selected trade in the MT4 client terminal.

In this pop-up menu you need to select the “Modify or Delete Order” option which would open another window which looks like this.

Order Modify window in MetaTtrader 4 client terminal from where you can perform Partial Close as well.

In order to close a trade partially you will have to choose another “Type” which should be “Market Execution” or “Instant Execution” (depending on your account type). Once you set proper “Type“, that window will turn into the exact same window with the yellow “Close” button as you saw before, where it allows you to enter the lot size you want to close in the “Volume” field. Enter a lot size you want to close and then click the yellow “Close” button to close a portion of your trade.

Automated Partial Close

Closing orders partially on MT4 is a manual process, but it can be automated with the help of a special tools like Expert Advisors. Quite a lot of people been asking me for years if I have such EA, so I have decided to create one and make it affordable nearly to every currency trader.

My other intention is to add Partial Close feature to the Trader On Chart app and I am working on this as well. But even without this option integrated into TOC app you can still use both TOC and Partial Close EA in the same MT4. You just need to open additional chart for each EA.

Downloading Partial Close EA from the MT4 App Market

So here’s how you can get the Partial Close EA in 5 simple steps.

1. Login to MQL5 Community from your MT4 client terminal

If you are not logged into MQL5 Community you need to do this to download the EA. In your MT4 client terminal navigate to Tools -> Options in the top menu.

In the “Options” window that will appear, open the “Community” tab.

Login or create a new user to access the MT4 app market from the Community tab of the Options window in the MT4 client terminal.

If you do not have an account at the MQL5 Community (a.k.a. MT4 and MT5 app market) then you can create it there by entering your login (create something you can remember) and e-mail address. If you do have an account at MQL5 Community you should click the “If you have an account, please login” link below the “Register” button and enter your username and password.

Note: Even though it is named MQL5 Community, you will find apps and indicators for both, MT4 and MT5 trading platforms. And NO, I do not think MT4 will be gone anytime soon.

Logging into the MQL5 Community from the MT4 client terminal.

When you click OK your MT4 client terminal will log-in to the MQL5 Community and you will be able to download MT4 Apps. You can check “Journal” tab to see if you were logged in or not.

MT4 client terminal successfully logged into the MQL5 Community.

If you enter wrong login or password or you do not have an account on MT4 app market you will see an error in the “Journal” tab.

Error logging into MQL5 market. Authorization failed because of wrong password.

2. Find Partial Close EA on the app market

When you are logged into the MQL5 Community on your MT4 client terminal you need to switch to the “Market” tab at the bottom in order to download the Partial Close EA.

Locating Partial Close EA application on the MT4 app market.

Once you switch to the “Market” tab (1) you then select the “Applications” tab (2). Then type “partial close ea” in the search field (3) and my Partial Close EA should appear in the search results (4). Click on the EA to open its page.

Note: You can also type my name “Rimantas” in the search field to find my apps.

3. Installing Partial Close EA to your MT4 terminal

To install Partial Close EA to your MT4 client terminal you need to click the “Download” button in the right-top corner. This will download the EA and install it for you.

Partial Close EA product page on the MT4 app market.

Once EA is downloaded and installed, it will appear in the “Navigator” window under the “Expert Advisors -> Market“.

Partial Close EA in the Navigator window on MT4 platform.

4. Running Partial Close EA

To run Partial Close EA you need to double-click it or drag-and-drop it to the currency chart of your choice. Note that EA will apply partial close function only to the trades of the same currency pair. This means if you attach EA to the EURUSD chart then it will apply partial close function only to the orders of EURUSD pair.

Please make sure to read the instructions on the MQL5 Community to learn how to use this EA. I am really very busy already answering hundreds of email messages each week, so any questions that are already explained and answered on my website or this product website might be unanswered.

Click here for Partial Close EA detailed instructions.

5. Leave a review on MQL5 Community

After few weeks of using my Partial Close EA, please go to the product page on MT4 app market and leave a review.

Leave a review for my Partial Close EA on MT4 App Market.

This is a very simple process. All you need to do is to open a “Review” tab, click the “Add review” link and write a review 🙂 Thank You.

Conclusion

This blog post will definitely help you learn how to close your positions partially (scale out) in the MetaTrader 4 platform. It also explains how you can program your MT4 to apply Partial Close function automatically for you.

Now tell me in the comments below, was this helpful?

Would you be interested to learn how you can implement partial close function into almost any Expert Advisor MQ4 file that you have?

Rimantas Petrauskas

First I am a father, a husband and then the author of the book “How to Start Your Own Forex Signals Service”. I am also a Forex trader, a programmer, an entrepreneur, and the founder of ea-coder.com Forex blog. I have created two of the most popular trade copiers and other trading tools for MT4 that are already used world wide by hundreds of currency traders.

View Comments

  • Rimantas,
    Not sure what I am doing wrong, but followed the above instructions a few times and can't seem to access the market tab at the bottom of the MQL5 community. Just can't see it when I log in. This is an EA I could use so pretty keen to get my hands on it. Thanks. Jim

    • Dear James,

      my friend had this problem. It was solved when he upgraded Internet Explorer to version 8 on his computer (I think it was on VPS server).
      Basically for the Market tab to appear you need to have at least Internet Explorer 8 on your computer.

  • Nice Tool. Great.
    Just downloaded from MQL5 Community. One thing I can not but mention that you are excellent to instruct anything you post. You always show every possible options with even screenshots which make things understandable. ;-)
    Will definitely leave a review on MQL community within weeks.
    Take Care.
    Thanks much!

    • Dear Alvi, thanks for your feedback. Doing my best. Hope my small Partial Close EA gift will serve you well.

      Regards,
      Rimantas Petrauskas

  • Is there a ETA on when its on Trader on chart? Please add more features! It's definitely your best EA in my opinion with so much potential.

    • Chris, I am doing my best to add Partial Close option to the TOC, but I think this won't happen in the next 2 months. Maybe I will be able to release this this summer.

  • Hi,

    I have tried to download this tool a few times, but it tells me installation is failed?? I am fairly new, so not sure if I am doing something wrong, or its MT4. If you have any suggestions, would be much appreciated.
    Thanks,
    Felix

    • Hi,

      I've seen some people having trouble with MQL4 Market on older VPS or computers. After they installed latest .NET framework from Microsoft website things start to work.

  • This is pretty much exactly what I need - however I do need to move the stoploss at the same time ?
    I assume that is not in there ?

    Is it feasible to put it in as a feature request ;)

    Thanks
    Kim

  • Hi Rimantas I miss you. I notice you are no Eml'ing more trading tips those are very good, and I like to thank you for the time you expend in that, may be your are to busy now. I like your page and your sincerity in trading, blessings and thanks again

    • Dear Miguel, thanks for your feedback. Yes, I am really busy this year with my new projects. I am about to launch the Forex Signals Academy in September, an online training on how to create your business and sell products and services online.

      Also, I am about to launch Autotrading Academy training program as well, were me and my partner Justin will teach what we believe is the best way to create, test and launch strategies for trading.

      I do my best to find time for new blog posts, and still try to post at least one detailed and helpful post every other month.

      Regards,
      Rimantas Petrauskas

  • Your style is very unique in comparison to other folks I have read stuff from.
    Many thanks for posting when you have the opportunity, Guess I will just book
    mark this web site.

  • What I find annoying about closing partially is that it removes the "original comment" in the order that I set at the openning (and are very important to trace strategy results). Do you know a way to avoid that so that the original comment remains??

  • Does using this EA require a VPS? Or do I have to leave MT4 up and running on my computer all day?

    • Thank you for your comment.
      It is not necessary to have a VPS Server to use Partial Close EA, but VPS is a better solution because without a VPS you will need to keep your computer and MT4 platform always ON.
      With VPS you can turn off your pc and EA will still work on the VPS where you'll have your MT4 with the Partial Close EA running.

Recent Posts

What is Metatrader 4 and Why Beginner Forex Traders Love It

What is Metatrader 4? MetaTrader 4 is one of the leading platforms in the world…

3 years ago

How To Download MT4 and Open Forex Demo Account Without a Broker

In this MT4 tutorial, Rimantas explains how to download MetaTrader 4 and open Forex demo…

3 years ago

Equity Sentry Video Tutorials

There you'll find video tutorials for the Equity Sentry software for MT4. (more…)

4 years ago

Trader On Chart Video Tutorials

There you'll find video tutorials on how to install and use the Trader On Chart…

4 years ago

Trendline Trader EA Video Tutorials

There you'll find video tutorials on how to install and use the Trendline Trader EA…

4 years ago

Best Way to Install Many MT4s on the Same Computer [or VPS]

Installing and running multiple MT4 client terminal instances on the same machine is easier than…

4 years ago