MetaTrader 5 Tutorials - Trading Heroes https://www.tradingheroes.com/tag/metatrader-5-tutorials/ Discover Your Grail Trading Strategy Wed, 30 Jul 2025 07:33:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://www.tradingheroes.com/wp-content/uploads/cropped-white-color-32x32.jpg MetaTrader 5 Tutorials - Trading Heroes https://www.tradingheroes.com/tag/metatrader-5-tutorials/ 32 32 How to Get MT5 One-Cancels-the-Other (OCO) Orders https://www.tradingheroes.com/one-cancels-the-other-oco-mt5/ Wed, 14 May 2025 01:09:01 +0000 https://www.tradingheroes.com/?p=1026204 Learn how to add the OCO or One Cancels the Other order type in MetaTrader 5. This can be done very quickly with the help of ChatGPT.

The post How to Get MT5 One-Cancels-the-Other (OCO) Orders appeared first on Trading Heroes.

]]>

When you buy something through one of the links on our site, we may earn an affiliate commission.

I started using MetaTrader back in about 2008.

Unfortunately, it hasn't changed much, even with the launch of MT5.

That means it still doesn't have the “One Cancels the Other” order function. Some people, including myself, prefer to call this “Order Cancels Order.”

Whatever you call it, now we can now easily add this order type to MT5 with the help of AI.

You don't need to know how to code. 

In this tutorial, I'll show why OCO is so useful and how to use ChatGPT to easily create your own OCO EA for MetaTrader 5.

How OCO Works

“One Cancels the Other” (OCO) trading orders are a type of conditional order where two pending orders are placed simultaneously, but only one can be executed.

When one of the orders is triggered and filled, the other is automatically canceled.

This can be very useful for taking advantage of different trading opportunities.

OCO Example

Here's an example where you can use an OCO order to take advantage of a potentially profitable situation.

AUDCAD chart

This Pin Bar is also an Engulfing Bar, which could signal a top.

The previous bar had very high volume, showing that this trend could be coming to an end because traders appear to be bailing out.

Now I could enter this trade now, but there is no guarantee that price will drop as expected.

So I can set up 2 pending orders, one sell limit above the current price (higher blue line) and a sell stop below the current price (lower blue line).

The first thing that could happen is price could retrace before moving back down.

If price does retrace, I will enter the trade at a slightly better price and make a little more money. The second trade will be cancelled and I won't take a duplicate trade.

Even if price retraces and hits a stop loss above the candle, the loss will be smaller than if I entered at the close of the current candle.

Another thing that could happen is price could just head straight down, as expected. In this case, the sell stop (lower blue line) will be hit and the retracement trade will be cancelled.

This pending order will get me into the market if goes in the direction that I expect, but doesn't retrace. It's the best of both worlds.

If price doesn't go as I planned, I'll lose less money because the sell limit will get hit instead of this sell stop.

As you can see, using a OCO order can be extremely useful.

The amount of money I save by doing this can really add up over time.

MT5 EA Design

Before we talk to ChatGPT, we have to put a little thought into how we will design this MT5 EA.

There are only 2 things that we have to account for.

First, there might be other pending trades in the same market, so we would have to account for that and only cancel orders that we mark for cancellation, and not any others.

Second, we only want to cancel trades in the same market of the chart that the EA is attached to.

This will rule out any trades in other markets that happen to have the same marker.

In MetaTrader 5, we can use the comment field to easily mark trades that we want to apply the OCO logic to.

It takes a little getting used to because in order to use the comment field, the order has to be entered via the right-click menu and not the one-click button.

But it's not a big deal.

The ChatGPT Prompt to Get OCO in MT5

So for this EA, I'm going to prompt ChatGPT with the following:

Please create an EA for MetaTrader 5 that looks for open orders with a comment in the market of the chart that the EA is attached to. When an open order with a comment is found, cancel all pending orders with a matching comment, in the same market on the next tick. Do not provide any inputs, everything should be done without user input. Automatically match the comment fields.

Feel free to copy and paste that prompt and use it for yourself.

But remember that I'm NOT liable for whatever happens if you choose to use that prompt. 

ChatGPT or another AI might give you a different result than what I got, depending on which model you use, so you always have to test an EA thoroughly before using it in a live account. 

Keep reading to learn how to test it.

Create the Expert Advisor in MT5

Once you get the code from ChatGPT, simply hit the Copy link in the upper right corner of the code window to copy the code.

Copy link in ChatGPT

Then open MT5 and click on the IDE button at the top.

IDE button in MT5

This will open the MQL5 Editor.

Click on the New button in the upper left corner of the screen.

A window will come up with a wizard.

  • On the first screen, select: Expert Advisor (template)
  • Click Next
  • Give the EA a name
  • Keep clicking Next until you get to the end of the wizard

The rest of the settings don't matter because you're just going to copy in the code from ChatGPT anyway.

When you see the EA template that MT5 created for you, click anywhere on the screen and it Control+A to select all the text.

Then hit Backspace or Delete on your keyboard to delete everything.

Now hit Control+V to paste the ChatGPT code into the blank area.

Finally, click on the Compile button on the top of the screen to check the code.

If it compiles without errors, congratulations!

Skip down to the installation section below.

Otherwise, use the next section to fix the errors.

Troubleshooting

ChatGPT might not get it right the first time.

When you compile the code, there's a good chance that you'll get some errors or warnings like this.

MT5 errors

When that happens, simply highlight all of the error messages in MT5, by using Shift+left mouse click and right-click > copy to copy them.

Then go over to ChatGPT and ask it to fix it.

For example:

Telling ChatGPT to fix compile errors

You might have to do this a few times, but it usually figures it out eventually.

Remember that is only a syntax test.

Now you have to check the logic of the program.

Put it into a demo account and test until you're confident in the results.

If you're having problems that you cannot correct, check to see that you're using MT5.

The code for MT4 and MT5 are different, so you cannot use this EA in MT4.

How to Install the EA

Once the code compiles, go back to the main MT5 window and look in the Navigator window.

If the Navigator section is not available, then go to: View > Navigator to open the window.

Go to the Expert Advisors section and click and drag the EA you created onto the chart.

Add EA to chart

Once it is on the chart, you'll see the name of the EA in the upper right corner of the chart.

The hat icon should be blue to show that it's running.

MT5 icon

If it's not blue, then click the Algo Trading button at the top of the screen to make sure that the EA is activated.

Test the EA

Now it's time to test your new EA.

Be sure to test this in a DEMO account, just in case something goes wrong. 

To take a trade, right click on the chart you want to trade on.

Go to: Trading > New Order

Comment

In the comment field, enter anything you want to identify the order.

It could be something like “999” or whatever is easy to remember.

Enter the details for the pending order, then open a new pending order and enter the same comment text in the comment field.

To test this quickly, set 2 orders that are very close to the current price, so one of them gets executed right away.

You can also see how the EA treats multiple pending orders with the same comment.

Try every kind of weird situation you can think of to be sure that the EA is working as expected.

Test it until you are 100% confident that it's working correctly.

More Troubleshooting

If there are issues with the logic of the EA, then go back to ChatGPT to work them out.

At some point, you'll have to start understanding the code, so now is a good time to start.

You don't have to know how to code, but you should know how each part of the code works.

Luckily, you can get ChatGPT to explain it to you.

It's actually quite good at explaining.

Keep asking it questions until you understand how the program works.

Remember that ChatGPT might sound all professional, but it doesn't know as much as you think.

Tell it exactly what you want and don't let it insert logic that it thinks is good, but isn't in line with what you want. 

Like any other skill, building with ChatGPT can be a little frustrating in the beginning.

But once you get the hang of it, it's extremely powerful and help you build all the trading tools that you've always wanted.

Final Thoughts

So that's how to create an OCO EA for MT5.

But this is just the beginning.

What else can you make?

Use your creativity and let your imagination run wild.

You might just create something amazing…and super profitable.

 

 

The post How to Get MT5 One-Cancels-the-Other (OCO) Orders appeared first on Trading Heroes.

]]>
How to Download MetaTrader 5 Historical Data https://www.tradingheroes.com/download-mt5-data/ Tue, 23 Jan 2024 12:55:00 +0000 https://www.tradingheroes.com/?p=1023890 Learn how to get historical data in MetaTrader 5. This will help with your backtesting or analysis. Also learn how to upload custom data.

The post How to Download MetaTrader 5 Historical Data appeared first on Trading Heroes.

]]>

Having as much historical data as possible in MT5 is going to be extremely important for daily market analysis and backtesting.

If you don't have all of the historical data available for a market, you can miss important support and resistance levels and you won't be able to see different market cycles over time.

This can mess up your live trading and backtesting results.

So in this tutorial, I'll show you how to download all of the available historical data for any market in MetaTrader 5.

You'll also learn how to upload custom data into MT5, so you can backtest data from different brokers and use third party data sets. Data from third party providers can be more complete and in some cases cleaner.

How to Download Free MT5 Historical Data

If you're just starting out, be sure to get all of the default data from MT5 first. Once you learn how to do it for one market, you can get data for any market that you trade in MT5.

The download process in MT5 is a little different than how you download historical data in MT4. So if you already know how to download data in MT4, be sure to pay attention to the differences.

Remove Download Limits on Charts

Start by making sure that there are no limitations on how much data can be downloaded for each market.

Go to Tools > Options.

In the next window, select the Charts tab at the top, then select Unlimited under Max bars in chart.

Click the OK button to save your settings.

Now that there are no limits on the amount of data you can have on each chart, it's time to download the data.

Download the Data For Each Market

Then go to View > Symbols. You can also use Ctrl+U on your keyboard.

Select the appropriate tab at the top of the screen, either Bars or Ticks, depending on what you're going to use the data for.

If you're just going to use the data for charting, then you only need the Bars tab. If you want super detailed data for a backtest, or if you're going to be trading with tick data, then select the Ticks tab.

On the Bars tab, select the market, timeframe and the date range that you want to download.

Then click the Request button.

Once the data has been downloaded, you'll see data in the table. You'll also see the number of bars downloaded under the market dropdown.

If you're using the Ticks tab, select the market, the type of ticks you want to get and the date range you want.

Remember that tick data can be quite large, so be sure that you have enough disk space for the amount of data you're requesting. If you have any doubts about if you need tick or bar data, start with bars first.

Click the Request button and the table will populate after the data is downloaded.

You'll see the number of ticks downloaded under the market dropdown menu at the top.

That's how you download historical data in MT5.

Now let's get into how to upload custom data into MetaTrader 5.

MT5 Historical Data Alternatives

If you don't want to use the default data from your broker, then you can also upload custom data that you download from other data sources.

This data could be from another broker or a third party data provider. Here's one example of a free data download.

Start by downloading the custom data file that you want to upload.

Next, you need to create a custom symbol to upload the data to.

Go to View > Symbols in the menu at the top of the screen.

Then click the Create Custom Symbol button at the bottom of the window.

The next screen will allow you to copy an existing symbol so you can upload a custom data set to that symbol. This is very useful because you don't have to set all of the parameters from scratch.

Select the market you want to copy from in the dropdown box in the lower left corner of the window and the table will populate with the data.

Change the name of the symbol at the top of the window. It's useful to use the original market name, then a dash, then the broker or source of the uploaded data.

This will help you remember where the data came from.

From there, you can click on the OK button to add the custom symbol. You can also click on the Import button to upload the data right away.

Once you've added the symbol by clicking the OK button, it will be available on the Bars and Ticks tabs in the Symbol screen.

To upload your file, go to either the Bars or Ticks tab in View > Symbols, depending on the type of data you have in your custom file.

I'll demonstrate with the Bars tab because that's what most people will use.

After you've selected your new symbol at the top, click on the Import Bars button at the bottom.

In the next window, click on the Browse button to locate your downloaded historical data file.

Once your file is selected, you'll see a preview of the data in the window below.

You can change the column separator and skip the first X number of columns or rows, if they are blank or contain label information. This screen also allows you to shift the data by X number of hours, if you want your data displayed in specific timezone.

When everything looks good in the preview window, click the OK button and you have now created a new symbol with custom uploaded data.

Conclusion

Having all of the available historical data for a market ensures that you'll see all historical data when you're trading and get accurate backtests.

So make sure that you have the maximum amount of data available before you start using MetaTrader 5 on a regular basis.

It just takes a few minutes and you'll be all set.

The post How to Download MetaTrader 5 Historical Data appeared first on Trading Heroes.

]]>
Free Blank Chart Templates for MT4 and MT5 https://www.tradingheroes.com/blank-chart-templates-mt4-mt5/ Sat, 14 Oct 2023 02:21:37 +0000 https://www.tradingheroes.com/?p=1023610 Get free dark and light theme templates for MetaTrader 4 and MetaTrader 5. These templates can be set to the default, saving you time.

The post Free Blank Chart Templates for MT4 and MT5 appeared first on Trading Heroes.

]]>
Clean MT4 and MT5 chart templatesOne of the most annoying things about MetaTrader 4 and 5 is the default chart template. It looks like it's from 1997.

So if you want to change your default chart template to something that's more usable, then the free download below will help.

They will save you a ton of time because you won't have to redo your charts every time you open a new chart, or work with a new installation of MetaTrader. 

I'll also give you instructions on how to install and use them.

What You'll Get

The templates below are perfect for price action traders because they have no indicators and are easy to read.

Even if you aren't a pure price action trader, these templates are a great starting point for any template you want to create because they are a blank slate.

They are totally free and can only be used on the desktop versions of MT4 and MT5. The mobile apps do not allow custom templates.

In order to use the templates, unzip the file download below and you'll get both the dark and light themes for MT4 and MT5.

If you don't know how to unzip a file, look for a YouTube tutorial on how to do it. There are many out there.

Light Blank Chart Template

This is what the light chart template looks like. It features a clean white background with dark gray candles.

Light chart template for MetaTrader

The light theme is good for screenshots because the elements on the chart are easier to see.

Dark Blank Chart Template

The dark chart template has a black background and causes less eye strain. I prefer this template for everyday trading.

Dark MetaTrader template

How to Install These Templates

Click here to download the templates

These templates work in both MT4 and MT5.

To see more plugins for MT4 and MT5, go here.

The downloaded file is in .ZIP format. To unzip it, right click on the file and select Extract All.

Once you have unzipped the download folder, you'll see 3 files:

  • Dark.tpl
  • Light.tpl
  • Instructions.txt

Now add the Dark.tpl file and the Light.tpl file to MetaTrader. The process is the same in both platforms, so I'll only show you how to do it MT4.

Right-click on any chart and select: Template > Load Template…

Load MetaTrader template

The next screen will allow you to upload the .TPL files that you just downloaded. Select the file you want to upload first.

Once the template is loaded on the chart, it is not saved yet. So right-click on the chart again and go to: Template > Save Template…

Then give the template a name.

Any name.

If you want to load the second template, then do the same process a second time.

How to Set a Template as the Default Chart Template

If you want to setup one of these chart templates so they are the default template that's used every time you open a new chart, then here's how to do that.

When you go through the process above, name the file “Default.tpl“.

That will tell MetaTrader to use that template as the default whenever a new chart is opened.

Only one template can be designated as the default template, so choose either the dark or light theme.

How to Create Your Own Chart Template

If the templates above aren't quite what you were looking for, then here's how to create a custom chart template in MT4. The process is similar in MT5.

Final Thoughts

So that's all you need to do to create a clean chart template that is easy on the eyes, and reusable.

If you don't have the right templates, you can waste a lot of time changing your charts.

Using templates will save you a lot of time and make trading more enjoyable.

The post Free Blank Chart Templates for MT4 and MT5 appeared first on Trading Heroes.

]]>
How to Change or Mute the Default Sounds in MT4 and MT5 https://www.tradingheroes.com/change-mt4-mt5-sounds/ Wed, 11 Oct 2023 21:01:05 +0000 https://www.tradingheroes.com/?p=1023568 You aren't stuck with the default alerts in MetaTrader. Learn the process to change the default sounds, add your own, or mute them.

The post How to Change or Mute the Default Sounds in MT4 and MT5 appeared first on Trading Heroes.

]]>
Change or mute the default sounds in MetaTrader

The default alert sounds in MetaTrader 4 and 5 aren't the most pleasant sounds I've ever heard. If you agree with me, then here's how to change the sounds, or even mute them.

In both MetaTrader 4 and 5, traders can change the default alert sounds to an existing sound, a custom sound file, or silence all/some of the alert sounds. 

Here's the step-by-step process of how to do that in each individual platform. I'll also give you some resources on where to get custom sound files, or make your own.

Changing the alert sounds in MetaTrader can make your trading a more pleasant experience. 

Change or Mute the Default Sounds in MetaTrader 4

Change to an Existing Sound

To change the sound for a particular alert, go to: Tools > Options > Events.

MetaTrader options menu

Make sure that the Enable box is checked.

Events

Double-click the dropdown next to each Event to each to change the Action, or the sound that's played for each event.

MT alert

Click the OK button after you've selected the sound you want.

MetaTrader 4 does not allow you to actually test out the sounds, so if you want to listen to all of the sounds, read through the next section to find out where these sound files are stored.

Open that folder in File Manager and play each sound with your default audio playback program (Windows Media, Quicktime, VLC, etc.).

Add a Custom Sound

To add your own custom sound, go to: Tools > Options > Events.

Then double click the Action next to any Event.

Select: Choose other…

This will show you the list of sounds that are built into MetaTrader.

More importantly, this will show you where these files are stored on your computer.

Open File Manager and head over to this folder. Then drop any .WAV file that you want to use for alerts in this folder.

Change sounds in MT4

Restart MetaTrader 4 and the new sound will now be available for use.

Follow the instructions in the previous section to change any of your alerts to your new custom sound.

To learn where to get custom sounds, skip down to the Where to Get Custom Sounds section below.

Mute Sounds

If you want to turn off all sounds, then simply uncheck the Enable box in the Tools > Options > Events tab.

To only turn off specific sounds, double-click the bell next to the Event. When there is a red X, that means that sound is silenced.

silenced alert

Double-click the bell again to remove the X.

Click the OK button when you're done.

Change or Mute the Default Sounds in MetaTrader 5

The process is very similar in MT5, but there are small differences in layout.

So if you know how to do these things in MT4, then it will be easy in MT5. But just to be thorough, here's how to do it in MT5.

Change to an Existing Sound

To change an alert to an existing sound, go to: Tools > Options > Events. 

Then double click the Action (sound) next to the Event you want to change the sound for. Select the new sound that you want to use from the list.

Change MT5 sounds

Click OK when  you're done.

Add a Custom Sound

To add your own custom sound, go to: Tools > Options > Events. 

Then double click any Action and select Choose other… from the dropdown menu.

This will show you where all of the sounds are stored.

MT5 sounds path

Open this folder in File Manager and drop your new custom .WAV sound file into this folder, then restart MT5. Your new custom sound is now ready to use.

Use the process in the previous section to select your custom sound file.

To learn where to get custom sounds, skip down to the Where to Get Custom Sounds section below.

Mute Sounds

This process is similar to MT4.

If you want to turn off all sounds, then simply uncheck the Enable box in the Tools > Options > Events tab.

To only mute certain alerts, click the bell next to the Event you want to turn off. The bell will turn into a cancel symbol.

MT5 sound turned off

Click the cancel symbol again to turn the alert back on.

Hit the OK button when you're done.

Where to Get Custom Sounds

There are many ways to get custom sound files, you can purchase them, download them for free, or create your own.

When adding custom sounds, be sure that they are short, just 1 to 3 seconds.

If your alert sounds are too long, they might overlap with other alerts and you might miss the second alert.

To edit a sound file, use the software recommended below.

Download Free Sounds

There are sites where you can download free sound effects that other people have made.

One good site is Pixabay. They have over 90,000 royalty-free sounds that you can download and use in MetaTrader.

Download MT sounds

YouTube also provides a limited number of sound effects for free.

You might have to shorten some of these sounds, but it's easy to do. The next section will show you the free software that will help you do it.

Create Your Own Sounds

Now if you want to get a little fancier, you can make your own alert sounds.

For starters, you can simply use the voice recorder on your phone to record any sound you want.

The quality won't be spectacular, but it's easy and it works.

Most voice recorders will record in .WAV format, so you just transfer that to your computer and install it as mentioned above.

If you want to get a little more professional, you can use audio recording software.

A great free software is Audacity, but there are several paid and free ones out there.

Simply record audio from your computer or a microphone and save it in .WAV format. You could record short sound bites from YouTube videos or any other online source.

This software can also be used to edit existing sound files. 

Add your recorded file to MetaTrader and you have your own fully customized alert sound. You can do this for phone ringtones too.

Purchase Sounds

If you really want to, you can purchase sound effects and use them in MetaTrader.

I don't really recommend it because there are so many great free options out there.

But if you want the best quality sound files, consider sites like Audiojungle or Pro Sound Effects.

Conclusion

That is everything you need to know about changing the alert sounds on both MetaTrader platforms.

I used to work with a trader who used a submarine alert sound on his computer. It was a little annoying, but it did get everyone's attention.

Regardless if you want to have a loud, attention-grabbing alert…or something more Zen, the processes above allow you to decide what you want to hear.

Have fun using your own custom sounds!

The post How to Change or Mute the Default Sounds in MT4 and MT5 appeared first on Trading Heroes.

]]>
The Risk Reward Tool Already in MetaTrader 5 https://www.tradingheroes.com/risk-reward-tool-mt5/ Fri, 16 Sep 2022 23:24:55 +0000 https://www.tradingheroes.com/?p=1022116 There's a risk/reward tool already in MetaTrader 5, you don't have to buy an indicator. Learn how to unlock it and how to use it.

The post The Risk Reward Tool Already in MetaTrader 5 appeared first on Trading Heroes.

]]>
risk reward tool MT5You don't need to buy a separate indicator or EA to see the risk/reward ratio on every trade. MT5 already has a built-in measurement tool to do that.

The Fibonacci Retracement tool in MT5 can be easily altered to show the risk/reward ratio on any trade. Open the settings of the tool, then add risk multiples to the Levels tab. 

Once you know this trick, you'll probably find yourself using this tool a lot.

Here's how to do it…

Tutorial Video

Watch more of my videos on my YouTube channel.

Risk/Reward Ratio Calculation

This ratio is commonly known as the risk/reward ratio, but it should be more accurately referred to as the reward/risk ratio.

The ratio is actually calculated with the amount of reward on the top of the fraction and the risk on the bottom.

For example, if a closed trade has 500 pips of profit and had 100 pips of risk, the formula looks like this:

500 / 100 = 5

So the reward/risk ratio in this example is 5.

That's how the reward to risk ratio will be shown in the MetaTrader 5 tool.

Why Reward/Risk is Important in Trading

Knowing your reward/risk on each trade is key to figure out the long-term viability of your trading strategy. 

For example, if you have an average reward to risk ratio of 1 on your trades, this means that you should have a greater than 50% win rate in order to be profitable.

If you have a lower win rate, your average reward/risk will have to be higher to be profitable.

Then of course, you don't need to have a high reward/risk ratio if you have a high win rate.

Now that you understand how it works, let's get into how to add it to your MetaTrader 5 chart.

Add the Fibonacci Tool to a Chart

Start by adding the Fibonacci tool to your chart.

This is what it looks like on your toolbar.

Fibonacci tool

Click anywhere on the chart, then drag the tool, so the tool expands and you can see the levels.

At first, you'll see the traditional Fibonacci Retracement tool settings.

Fibo retracement

If you're going to use the tool to measure Fibonacci retracements, then keep these settings.

Otherwise, you can delete the retracement settings in the next step.

Customize the Tool

Now that you have the tool on your chart, first make sure that the squares are displayed on the diagonal line.

You'll see the squares in the screenshot below.

If the squares aren't there, then double click on the diagonal line to show the squares.

Once you see the squares, right-click on the diagonal line to show the Fibo settings menu.

Tool settings

Then select Properties…

First, delete the unnecessary levels.

remove settings Then add the first level.

Risk will be determined by the distance between the 0 and 1 levels.

Therefore, in order to create a 1 times risk measurement, we have to create a level that has the same size as the distance between 0 and 1.

So the first level will be 2 because that's 1 larger than 1.  You can put anything you want into the description.

I use 1R, or 1 times risk.

Add first level

Add as many levels as you want.

I like to go up to 10R.

Here's what it looks like on the chart.

This move had a potential 7.5R of profit.

10R on chart

You can also create fractions of a level, if that's something you use in your trading.

For example, you could set a 1.5R level.

How to Use the Reward/Risk Tool

Once you've customized the Fibonacci tool and turned it into a reward/risk tool, the settings will stick until you change the settings again.

Now that you have this set up, let's take a look at how to actually use it.

There are a couple of ways that you can use this tool…

First, it can be used to check if there's enough room for you to make the risk multiple that you want to make on a trade you're about to take.

For example, if your strategy requires a minimum 1R profit target, you can easily see where price would have to get to on your chart, in order for you to make 1R.

If that profit target seems reasonable given the current price action, then you can take the trade. Otherwise, you can pass.

Next, you can evaluate closed trades to see how much profit you could have made.

If enough of your trades have more potential profit than actual profit, then you could look for ways to trail your stop to make more profit.

Bonus: Add the Price to Each Reward/Risk Line

Now you can see your reward levels on your MT5 chart, but wouldn't it be great to see the actual price that the levels are at?

Luckily, there's an easy way to do this in MT5.

On each level, add the following to the description of each line to show the price that the line is at.

%$

While you're at it, you can also change the 0 and 100 levels to Stop Loss and Entry, respectively.

This is what my settings look like.

Risk / reward tool settings

This is what it looks like on the chart.

Tool on chart

After you select the tool, start by clicking on the entry price of your trade.

Then drag the tool to your stop loss price.

Now you can see the exact price of all the profit levels.

This makes it easy to enter take profit levels when you're trading.

Final Thoughts

This simple hack to the Fibonacci Retracement tool creates a free and easy way to measure risk vs reward.

Set it up once and you'll always have it handy.

You can also use this method on other trading platforms, when you want an easy to use reward/risk tool.

Get more MetaTrader 5 tutorials here.

The post The Risk Reward Tool Already in MetaTrader 5 appeared first on Trading Heroes.

]]>
How to Set a Stop Loss and Take Profit on MetaTrader 5 (iOS, Android, Desktop, Mobile and Web) https://www.tradingheroes.com/set-stop-loss-take-profit-mt5/ Tue, 31 May 2022 01:58:51 +0000 https://www.tradingheroes.com/?p=1021357 Learn how to set a stop loss and take profit in MT5. This tutorial covers the mobile, desktop and web versions.

The post How to Set a Stop Loss and Take Profit on MetaTrader 5 (iOS, Android, Desktop, Mobile and Web) appeared first on Trading Heroes.

]]>
set stop loss and take profitStop losses (SL) and take profits (TP) are essential tools for managing risk and maximizing profit.

But setting these orders on MT5 can be a little confusing, depending on which version you're using.

So in this tutorial, I'll show you how to set SL and TP orders in all versions of MetaTrader 5:

  • iOS mobile
  • Android mobile
  • Desktop
  • Web

[toc]

MetaTrader 5 Desktop

Once you open the desktop version of MetaTrader 5, click on the New Order button.

New Order button

The order entry screen will pop up.

Click on the crosshair button in the toolbar at the top of the MetaTrader screen. Then move the crosshair around and look at the price to the right side of the screen to determine your stop loss and take profit prices. 

Enter your stop loss and take profit prices in the order entry screen.

You could try to use the small screen on the left side of the order entry screen, but in most cases, it's too small to be useful.

So using the crosshair on the main chart is the best way to go.

Then set your order Type, double check the Symbol and set your lot size (Volume).

When everything looks good, click the Buy or Sell button.

Order entry MT5

MetaTrader 5 Mobile iOS

Entering orders on the mobile apps isn't as smooth as it could be. The process is actually different on the Android and iOS versions.

The iOS version is a little easier to use.

First go to the Charts tab at the bottom of the screen.

Then tap on the red and blue clock-looking icon in the top right corner of the screen.

A toolbar will appear at the bottom of the screen. It has buttons for SL, TP, Continue and “X,” or close toolbar.

MT5 Android chart

Tap on SL to set a stop loss. A red line will appear on the chart. Tap and drag the line to the price you want to set the stop loss at.

If you need more space, tap and drag the prices bar on the right side of the screen up and down to compress the chart vertically.

Do the same to set the take profit. Tap on the TP button and drag the line.

If you're going to set a limit order, tap and drag the Limit line.

When you're done, tap Continue.

After you tap on the Continue button, you'll see the order entry screen.

Here's where things get tricky…

MT5 Android order entry screen

If you're trading a limit order as entered on the chart screen, then you're good to go. Check the lot size (center number) and click on the Place button. The order will be entered.

However, if you want to use any other order entry type, your Stop Loss and Take Profit prices will disappear when you change the order type.

Therefore, if you're going to change the order type, be sure to write down your prices before you change the order type. Then enter them manually, after changing the order type.

After that, select lot size (middle number) and entry price (if using a pending order).

Then click the Buy, Sell or Place button at the bottom, depending on which type of order you're using.

MetaTrader 5 Mobile Android

Entering orders on the Android version is the least intuitive of all the platforms.

But if that's what you prefer to use, here's how to do it.

First tap on the Charts tab at the bottom of the screen.

MT5 charts

Then select the crosshair tool from the toolbar at the top. Tap and drag the crosshair around to get the prices for your stop loss, entry pending order and take profit. Write these down so you can use them on the next screen.

You cannot compress the chart vertically, like you can on the iOS version. So you'll either have to pinch the screen to make it smaller, or change the chart to a higher timeframe.

Crosshair on MT5 mobile

Then tap the square with the “+” symbol in the upper right corner.

This will open the order entry screen.

MT5 orders

Choose your order type and lot size (middle number) at the top of the screen. If you're using a pending order, click on the box for the entry price and manually type in your entry price.

Next, tap on the Stop Loss and Take Profit boxes and enter the prices you wrote down in the crosshair step.

Finally, click on the Buy or Sell button at the bottom of the screen, depending on which type of order you're entering.

MetaTrader 5 Web

The web version is the easiest to use when it comes to adding a stop loss and take profit.

However, there are downsides to the WebTerminal. You cannot get all of the features that are available on the desktop version, like adding custom indicators and EAs.

But it's very simple and allows you to place trades when you're on someone else's computer.

Start by going to the WebTerminal here.

Login with your existing MT5 account or setup a new demo account.

Once you've connected to your account, click the New Order button in the toolbar.

This will bring up the order entry screen on the left side of the chart.

New order button MT5 WebTerminal

Start by selecting the order type at the top of the order entry screen. In the screenshot above, it defaults to Buy Limit.

Then set the Volume (lot size) and the entry price, if you're using a limit or stop order. You can also click and drag the limit on the chart to set the entry price.

Next, click on the “+” or “-” symbol next to the Stop Loss box. This will bring up a red line on the chart. Move the line to the price that you want to set your stop loss at.

After you've set your stop loss, click on the”+” or “-” symbol next to the Take Profit box, if you're going to use a take profit. A green line will appear and you can drag it to the price that you want your take profit at.

Stop loss lines on MT5 Web

From there, set your expiration time, if you're doing a pending order, then click on the Place Order button to enter your trade. Most trades will be Good-Til-Cancelled (GTC).

How to Set a Trailing Stop Loss in MT5

A trailing stop loss can help you lock in profits, as the market moves in the direction of your trade. This is simple to set up.

To set a trailing stop loss in MetaTrader 5, right-click on an open order. Then select Trailing Stop from the menu. Select one of the default point values, or click on Custom to set your own. 

This feature is only available on the desktop version of MetaTrader 5. 

MetaTrader 4 set trailing stop loss

Once you set your trailing stop, your stop loss will lock in profits on every tick.

It's a good idea to give your trailing stop some space because if your trailing stop is too tight, you'll get stopped out too soon.

Backtesting is the best way to figure out where to set your trailing stop loss.

Why Stop Losses are Important

Stop losses are the easiest way to limit your risk on a trade.

Successful trading is about managing risk, not trying to hit home runs on every trade.

So using stop losses are vital for new traders. The easiest way to blow out your account is to not use stop losses.

At least in the beginning.

Once you're more experienced, you might consider trading without stops.

Using a stop loss also allows you to set a percent risk per trade. Knowing your exact risk per trade allows you to do advanced calculations on your trading results and optimize your trading strategies.

Where to Place a Stop Loss

Now that you know how to place a stop loss, the next question is to figure out WHERE to place your stop loss.

The best way to figure out a good place to put your stops is to backtest. Find a trading strategy that resonates with you and test it.

Then play with where you place the stop loss, to see if you can improve the results.

Your stop loss should be in a place where the normal market gyrations won't get to it easily. It should also be a place where you would be totally wrong about your hypothesis of where price is going to go.

To learn how to figure out how much to risk per trade read this tutorial.

Why Take Profits are Important

Take profits are not used by all traders, but they can be a great way to lock in your profits.

Many times, the market will move in your favor, only to snap back and either hit your entry price or your stop loss.

For example, if you didn't set the take profit (green line) at the previous support level, you would have missed out on quite a bit of profit as price bounced up off the level.

AUDCAD Forex chart

So consider testing a take profit on all or part of your position. A take profit on part of your position would allow you lock in some profits, while keeping your trade open to potentially catch a big run.

Where to Place a Take Profit

Figuring out where to set your take profit is trickier than figuring out where to put your stop loss.

It can be easy to change your take profit level during a trade, only to find that your original TP was at an ideal price.

So again, you have to backtest to find out the best place to take profits on your trades.

Putting in the time to figure out your ideal take profit will usually yield better results than trying to optimize your entry.

But not all traders use a take profit, so figure out what works best with your trading personality.

Final Thoughts

Having the discipline to set your stop loss will keep you out of trouble when a trade goes the wrong way.

A proven take profit level will allow you to take advantage of big moves, before they snap back.

Create a trading plan, then backtest your SL and TP to see which settings generate the most profit.

Be sure to track your results in a spreadsheet. That makes it easier to keep track of what you tested and play with the inputs to optimize your strategy.

 

The post How to Set a Stop Loss and Take Profit on MetaTrader 5 (iOS, Android, Desktop, Mobile and Web) appeared first on Trading Heroes.

]]>
The Best Way to Run Windows on a Mac for Trading https://www.tradingheroes.com/run-windows-on-mac-trading/ Fri, 08 Oct 2021 23:17:07 +0000 https://www.tradingheroes.com/?p=1021035 Learn the best way to run Windows on a Mac. This method will ensure that you have maximum processing power and install any trading software you want to use.

The post The Best Way to Run Windows on a Mac for Trading appeared first on Trading Heroes.

]]>
WINDOWS ON MACThere are some trading programs that only run on Windows. However, Windows has so many issues that refuse to use it as my daily operating system.

Therefore, I've experimented with many different ways to run Windows on a Mac and I'm going to share the best method with you here.

The best way to run Windows on a Mac is to purchase a dedicated mini Windows PC or tablet, then use Remote Desktop on a Mac to access the Windows PC. This method completely eliminates compatibility issues and doubles your processing power. 

But there are a lot of questions that come up when it comes to setting this up.

So in this tutorial, I'll give you the simple 2-step process to setting up your own dedicated Windows trading computer.

Step 1: Purchase and Set Up a Dedicated Windows PC

The first step is to purchase a small Windows PC. Just purchase something that you can afford and has the most recent version of Windows.

You don't need to have the most powerful computer in the world.

Any computer built in the last 3 years will work great.

The only time that you would need a top of the line computer is if you're going to run complex automated trading algorithms.

If you want more details on the specs to look for in a new trading computer, read this tutorial.

But if you simply want to run MetaTrader or Forex Tester, then any decent desktop computer will do. You can get a good used one for around $100 to $200.

If cost isn't an issue for you, then buy the best you can find.

The minimalist in me prefers to have a computer that takes up as little space as possible, so I can tuck it away in a corner somewhere or hide it behind my monitor.

These small computers also use less electricity than full-sized computers.

I would suggest getting either a small form factor (SFF) computer or a tablet that runs desktop Windows.

SFF Computers

SFF computer

A SFF computer usually measures about 9 inches squared and 2 inches high.

The best part about these computers is that they have a lot of processing power, especially if you buy a computer that was made within the last 3 years.

So you'll never have to worry about the speed of the computer because most trading programs are pretty lightweight and don't require a powerful processor. Just make sure that you have at least 8GB of memory.

You can also purchase older computers that can work just as well for your needs.

I would currently suggest looking at 2 lines of computers:

  • HP Elitedesk / Prodesk
  •  Lenovo ThinkCentre

The best SFF Windows computers will change over time, so do your own research and find something that fits your budget and needs.

You can find good deals on eBay, so keep an eye on the listings there.

If this isn't going to be your primary computer, a used computer will do a fantastic job, without having to pay full price.

Tablet Computers

Widows tablet computer

Another great option is to use a tablet that runs a desktop version of Windows.

Tablets use very little electricity, they have battery backup in case the power goes out and don't take up a lot of space.

On the downside, they can be a little underpowered and generally don't have the same storage capacity as SFF computers.

You may have to upgrade the memory and disk space.

Overall, I would recommend getting a Dell tablet. I have a Dell Venue 11 Pro and it's good enough to run any Windows-based trading programs that I want to use.

However, I did have to upgrade the disk to a 512GB SSD because the original drive was tiny.

But again, do your own research and find something that works for you. Remember to get a tablet that runs the desktop version of Windows.

Install Your Trading Software and Set Up Remote Desktop

After you've purchased your Windows-based trading computer, install the trading software that you want to use.

Then you need to setup Remote Desktop, so you can control the PC from your Mac.

Go to: Start > Settings > System > Remote Desktop 

Turn Enable Remote Desktop to On.

Turn on Remote Desktop

Once Remote Desktop is turned on, there's one more step. You'll need to find out the IP address of the PC, so you can connect to it from your Mac.

First, make sure that you're on the same network as your Mac. This could be your wireless router at home, or your router at work.

Just be sure that both your PC and your Mac are connected to the same internet connection.

Then go to: Start > Settings > Network & Internet > Properties 

Scroll down to the bottom of the page and get the IPv4 address. Write it down because you'll need it in the next step.

It should look something like: 192.168.0.101.

Step 2: Install and Configure Remote Desktop on Your Mac

Remote Desktop can be downloaded for free from the Mac App Store. Once it's installed, click on the “+” symbol, then “Add PC.”

Add a PC to Remote Desktop

From there, you'll see this screen.

Remote desktop setup on Mac

Enter the following information:

  • PC name: Enter the IP address from step 1
  • User account: Add user account (the login to the Windows computer)
  • Friendly name: Give it a name that will help you identify the PC
  • Group: Usually “WORKGROUP” for most Windows setups

After you've added the PC information, double click the new icon in your Remote Desktop window and a window will open with your Windows PC in it.

Now you're using your Windows PC on your Mac. 

Trading Mac

Final Tips

The best thing about this method is that you can have 2 processors running at the same time. So you won't slow down your Mac, while you're using your Windows programs.

You can also use Windows only when you need it. Windows 10 still has many of the same problems that it had back in Windows XP, so I use it as little as possible.

However, using a Windows PC ensures that you have maximum compatibility with Windows-based programs.

Another benefit is you only have to open your Mac, while you keep your Windows PC tucked away in a corner of your house somewhere.

Sure, there are Windows emulators for Mac like VMWare Fusion, but I've found that they don't work as well as using a separate Windows PC.

Here's what I used to recommend, but I don't anymore.

So if you want to use Windows programs on your Mac, go get yourself a PC, set it up…and leave it on a shelf somewhere.

Then you can access it only when you need it.

The post The Best Way to Run Windows on a Mac for Trading appeared first on Trading Heroes.

]]>
How to Withdraw Money From MetaTrader 5 https://www.tradingheroes.com/withdraw-money-from-mt5/ Tue, 23 Mar 2021 18:11:45 +0000 https://www.tradingheroes.com/?p=1020669 A common question that I've been getting is how to withdraw money from MT5. I thought that the answer was straightforward, but apparently it's not.

The post How to Withdraw Money From MetaTrader 5 appeared first on Trading Heroes.

]]>
Withdraw Money from MetaTrader 5 - Trading for BeginnersThis might seem like an odd tutorial, but stick with me because it might not be what you think.

A common question that I've been getting is how to withdraw money from MT5. I thought that the answer was straightforward, so I would always respond with something like the following.

To withdraw money from MT5 contact your broker and request a withdrawal. Your broker will usually send you your money back via the method you sent it to them. 

But I found another answer to this question that might surprise you.

How to Deposit Money to Trade

Since this is a tutorial for beginners, let's start with the basics.

In order to start trading Forex, or any other market, you'll need to work with a broker. 

The broker gives you the ability to trade the market you want to trade. They do this by establishing connections to trading exchanges or liquidity providers, and setting up software that will allow you to execute trades via those providers.

MetaTrader 5 is one example of software that a broker could provide their customers. Other examples are:

If you're looking for a broker, be sure to see our list of favorite brokers.

Brokers can accept money in several forms:

  • Money wire
  • Check
  • Money order
  • Credit card
  • PayPal
  • Cryptocurrency
  • And more

The method of payment that a broker accepts will be determined by their company policy and the laws of the countries they operate in.  

What Usually Happens With Your Money

When you send money to a legit broker, they will put your money into their bank account and give you access to trade that money on their chosen trading platform (MT5, MT4, TradingView, etc.).

If you want to withdraw money from your account, you simply contact the broker and request a withdrawal. 

They will usually send your money back via the payment method that you used to send it to them. In some countries, they are required to send your money back using the original funding method.

What People are REALLY Asking

Alright, that's straightforward.

So I was wondering why so many people were asking me this question and why so many of them have never heard of a broker before. 

Well, it turns out that there is more to that question than I realized. Here's what some of those people were really asking…

Some shady groups out there tell people that they will manage their money by putting the money into MetaTrader 5.

Now since you already know that you need a broker to trade, and that MT5 is nothing more than trading software, then obviously money cannot be deposited directly into MT5. 

What these groups do is they put the money into their own personal bank accounts, but tell the investors that the money is “in MT5.” 

Since the money isn't deposited with a known bank or regulated broker, the investor has nobody to complain to and the money is gone.

Something similar appears to be happening in this scam. There was another scam back in the day that gave real bank information and they got caught. So saying that the money “gets deposited to MT5,” looks like a way to get around providing any kind of identifying details.

How to Research a Broker or Money Manager

So before you hand your money over to any money manager or broker, do some basic homework:

  • What results have others had with them in the past?
  • Is that group regulated in the country they operate in?
  • Does their social media look legit?
  • Check out their website, did they use Google Translate to write it?
  • Are there any YouTube videos about the broker or money manager?

Be sure to watch the video above for more tips.

If there isn't any information on the broker or money manager, steer clear.

Remember that there will always be negative reviews about organizations/individuals in the trading space because many customers have unrealistic expectations of how much money they can make in trading. Then they blame their broker or money manager when things don't work out like they thought it would. 

But that aside, does it seem like the organization operates with integrity…or not?

Test Them Out First

Even after you've done a lot of research, never put all of your money in at once. Put in a small amount, then try to withdraw some of it. 

This is the best way to test to see how easy the withdrawal process is and if you can actually get your money back.

Final Thoughts

So those are some things to think about when you first start out in trading.

Withdrawing money from a broker is usually a very straightforward process. But if shady individuals tell you that they will deposit your money directly into MetaTrader 5, always be sure to get clarification.

The post How to Withdraw Money From MetaTrader 5 appeared first on Trading Heroes.

]]>
How to Use Strategy Tester in MT5 to Backtest EAs https://www.tradingheroes.com/how-to-use-strategy-tester-mt5/ Fri, 03 Jul 2020 09:04:52 +0000 https://www.tradingheroes.com/?p=1019867 Get the step-by-step guide to using MetaTrader 5 for automated backtesting. Learn how to install EAs, adjust settings, troubleshoot problems and get reports.

The post How to Use Strategy Tester in MT5 to Backtest EAs appeared first on Trading Heroes.

]]>
Trading ComputerOne of the best parts of MetaTrader 5 is that you can program automated trading strategies, called Expert Advisors (EAs), with the MQL5 programming language. Then you can test your strategies in the MT5 Strategy Tester.

Many traders use EAs to create fully automated trading strategies. However, EAs can also be used by discretionary traders to test new ideas, or in Incremental Automation.

Regardless if you go fully or partially automated, this post will show you how to get started with the MT5 Strategy Tester.

I'll show you how to install .ex5 and .mq5 files, how to do your first test, and how to find a MT5 programmer, if you don't know how to code.

Trading Computer

The Difference Between .MQ5 and .EX5 Files

Let's start by taking a look at the two types of files that can you can install in MT5.

There are two different types of files because there is one file that humans can read and one file that that MetaTrader can read.

The file that human programmers can read (the .mq5 file) is not very efficient, so it's converted into a version that the computer can use efficiently (the .ex5 file). These files are also known by the following names:

  • .ex5 = compiled, program or executable file
  • .mq5 = source code file

When you add a .mq5 file to MT5, it will automatically be converted to a .ex5 file, when you open MT5. 

If you purchase an EA on the internet, it will usually come in .ex5 format. This is because EA developers want to protect their hard work.

The .ex5 file hides their programming and doesn't allow others to see how it works.

However, if you create an EA yourself, or you work with a programmer to create an EA from scratch, the EA will be in .mq5 format.

Before working with a programmer, be sure that they will give you the .mq5 file. Having this file will allow you to make changes to your EA in the future.

How to Install an Expert Advisor in MT5

In order to start using Strategy Tester in MetaTrader 5, open MT5, then go to: File > Open Data Folder.

You can also hit Ctrl+Shift+D on your keyboard.

Open data folder

Once the folder is open, go to: MQL5 > Experts.

Then drag your MT5 Expert Advisor into the folder. The EA can either be in .ex5 or .mq5 format.

add EA

After the file has been moved, then restart MT5. You're now ready to start testing your EA in Strategy Tester.

How to Use Strategy Tester

Set Up Your Test

When MT5 restarts, go to: View > Strategy Tester. You can also press Ctrl-R on your keyboard to open Strategy Tester.

It will appear in a window at the bottom of your screen.

Strategy Tester MT5

Here's what the settings do. They are listed in the order that they appear on the screen.

  • Expert: Select the Expert Advisor you want to test from the dropdown.
  • Symbol: Select the symbol you want to backtest.
  • Timeframe: Select the timeframe you want to backtest.
  • Dollar sign icon: Click on this icon to get details of the symbol selected.
  • Date: Select the preset date ranges.
    • Entire history
    • Last month
    • Last year
    • Custom period
  • First date dropdown: If you select Custom period, select the starting date of your test.
  • Second date dropdown: If you select Custom period, select the ending date of your test.
  • Forward: This allows you to do forward testing of your trading strategy. MT5 will split your data into 2 parts and only do optimization on the first part. Then it will test the optimized settings on the second part of the data. If you get similar results with both sets of data, then there's a higher probability that the settings are reliable and not subject to curve fitting. When forward testing is activated, you will see an additional tab that shows the forward testing results.
    • No: Forward testing not used.
    • 1/2: Half of the time period is used for the forward test.
    • 1/3: One third of the time period is used for the forward test.
    • 1/4: One fourth of the time period is used for the forward test.
    • Custom: Use the dropdown to specify the first date of the forward test.
  • Delays: You can select from several delay times to simulate delays between the time that MT5 gets a trade signal and the time the trade actually gets executed. This is useful if the connection to your broker is slow.
  • “Select delay…” Button: This can be used to include other factors that might affect profitability like slippage, non-tradable time periods, margin and commissions.
  • Modeling: You can select how ticks are generated. You can find more information on that here (it's pretty complex).
  • Deposit: Adjust your initial deposit and deposit currency.
  • Leverage: Choose the leverage you'll be using in live trading.
  • Optimization: Choose the algorithm type you want to use. There are different ways that you can optimize your EA by having MT5 run through a series of values for each of your settings until it finds the best setting. Select the inputs you would like to optimize on the Inputs tab. You can read more about optimization here.

Start Your First Test

Once you've setup the test, click the green Start button. If you've checked the “visual mode…” box, the Strategy Tester Visualization window will open and show you the backtesting trades on the chart.

Use the slider to increase or decrease the speed of the test. This will allow you to watch your trades and see if your EA is working as you expected.

Visualization

If you didn't check the “visual mode…” box then the test will run without seeing the trades on a chart. The best way to see the progress of your backtest is to flip to the Graph tab.

That will allow you to see live update of your equity and account balance.

Equity graph

Review Your Results

Once your test has completed, it's time to review your results. Go to the Backtest tab to see the stats on your test.

Backtest results

Where to Get MetaTrader 5 Expert Advisors

There are many ways to get a MT5 EA, but here are a few good places to start.

There are also many other websites that sell EAs and some offer free EAs for download.

If you have an idea for a trading system or EA, you can also create your own EAs.

How to Find a MT5 Programmer

The good news is that you don't have to learn programming…if you don't want to. You simply have to explain your strategy to a programmer and have them create the EA for you. 

I created a list of Forex programmers here. Talk to them and see if any of them are a good fit.

Be sure to read the guide in the beginning to find the best programmer for you.

Learn to Program Yourself

If you would like to learn MQL5 programming, then start with the official MQL5 docs.

The best way to learn programming is to choose a simple project, then learn through trial and error.

For example, you could start off by programming a simple EA that opens a long trade when price closes above a moving average and closes the trade when price closes below the moving average.

…and the opposite for short trades.

It also helps to find free code on the internet, study how it works and make simple changes to the code. You might have to spend a couple of weeks learning how to code, but it can really pay off.

When you can code for yourself, you can test trading ideas, without paying for a developer to create the EA for you.

Conclusion

A final word of caution. Be sure to check, and double check every EA you install.

There can be bugs in the programming, which can have disastrous results. Even if you run an EA through the Strategy Tester, the results in live trading can be different.

So even if an EA does well in backtesting, always test it in a demo account for a few months before you put it into live trading. 

But all of that testing can be worth it, if you can find an EA that will help you make profits while you're away from your computer.

The post How to Use Strategy Tester in MT5 to Backtest EAs appeared first on Trading Heroes.

]]>
How to Do MetaTrader 5 Manual Backtesting https://www.tradingheroes.com/how-to-do-mt5-manual-backtesting/ Wed, 08 Apr 2020 06:58:48 +0000 https://www.tradingheroes.com/?p=1019515 MetaTrader 5 is a good automated backtesting platform, but did you know that it's also a good manual backtesting option? Learn how to get started with MT5 manual backtesting here.

The post How to Do MetaTrader 5 Manual Backtesting appeared first on Trading Heroes.

]]>
Backtesting with MT5

MetaTrader 5 is a solid automated backtesting platform.

But did you know that it's also a pretty good manual backtesting platform?

In this post, I'll show you how to use this free software to manually backtest your strategies.

This is a great option if you don't want to purchase software like NakedMarkets.

I'll give you all the tools that you need and the exact steps on how to do it.

If your broker only has MT4 available, then It will work in a very similar way.

Why You Should Backtest

Backtesting is an excellent first step in helping you determine if a strategy has an edge or not. Since you can run through historical data very quickly in backtesting, this gives you a lot more data than if you only traded in a demo or live account.  

Testing that might take months or years in demo trading, can be completed in a matter of days or weeks with backtesting.

You can also practice a strategy when the markets are closed, making it an ideal training tool.

So it's extremely beneficial to learn this skill and MT5 is a good software to start with because it's free.

This is the beginning of the roadmap to successful trading. To get a copy of the Trading Success Roadmap, read this post.

Here we go…

Download MetaTrader 5

The first step is to download MetaTrader 5.

You can get the software from your broker or you can download it directly from the MetaTrader website.

It's usually best to get it from your broker, but if you don't have a broker yet, the MetaTrader version will do just fine.

Once you have a broker, you can connect to your broker through the MetaTrader version.

When you get the software from your broker, it's automatically setup for that broker, so it can be a little easier to get started.

Either way, you can get the complete MT5 installation instructions here.

Download Your Data

In order to do a valid backtest, you should have as much historical data as possible.

Over the years, I've tried several backtesting solutions that only allow you to test a couple of years of data.

That's totally useless because you won't have enough trades to make a valid decision about a trading strategy.

So get as much data as you can. To download additional data, go to: View > Symbols

MT5 menu - symbols settings

Then select the currency pair that you want to download data for.

After you've selected the pair, click on the Bars Tab.

In this example, I'm going to download the USDCAD currency pair.

MT5 download bars

On the Bars tab, select the timeframe of data you want to download, then the starting and ending dates of the historical data.

Finally, click the Request button to do the download. I found that I had to click the button several times to get the data.

So if you don't get it on the first try, keep trying.

Download data

If you have your own data, then you can upload it with this button.

Import MT5 data

Once the data is downloaded, you will see it in the window. You can scroll through the data to see how far back it goes.

Forex data in MT5

That will give you the data you to do your backtesting.

You can also find third party companies that provide market data for you to upload into MT5.

Open Your Spreadsheets

Trade Tracker Spreadsheet

Before you get started, you'll need a spreadsheet to record your results. One of the biggest benefits of other software is all of this information is automatically recorded for you.

But if you would like to continue using MT5, then create a spreadsheet with the following columns:

  • Open date
  • Open time (if day trading)
  • Currency pair
  • Long or short
  • Open price
  • Close price
  • Stop loss price
  • Take profit price
  • Pips result
  • Pips risk
  • Pips to profit target
  • % Risk on trade
  • Risk multiple result
  • $ P/L
  • Running balance
  • Wins/losses
  • Win %

Manual backtesting spreadsheet

Once you've built your spreadsheet, then move on to the next step.

Backtesting Results Spreadsheet

Next, you should keep a spreadsheet that tracks the results of each of your individual tests.

Be sure to track the following for each currency pair:

  • System name
  • System notes
  • Chart timeframe
  • Version
  • Test number
  • Return
  • Win Rate
  • Trades

Then create a sum and average in the last two columns.

Backtesting tracking sheet

Keep Your Trading Plan in Front of You

When you're backtesting, it can be easy to deviate from the plan. If you're like most people, you'll start tweaking the strategy in the middle of the test.

I've done this before too, so that's why I keep my trading plan in front of me while I'm testing.

It will keep you on track and ensure that you are sticking to the plan.

You can get a free PDF download of the Trading Plan Worksheet I use here.

Once you have your plan in front of you, it's time to begin your testing.

Start Testing

How to use MT5 for manual backtesting

Now it's time to get started!

First select the pair and timeframe that you want to test.

Next, add any indicators that you'll be using to your chart.

Then scroll your charts back to a point in time that you want to start from.

If you are testing the H4 chart or higher, I would recommend going back as far as possible.

You can usually test all of the data for a Forex pair on a H4 chart or higher.

When testing lower timeframes, you should pick a few timeframes and test on those timeframes only. Pick a good mix of timeframes that have the following characteristics:

  • Strongly trending market
  • Strongly ranging market
  • Neither strongly ranging or trending

That will give you a good idea of how your strategy will perform in different market conditions.

Do the following to scroll back quickly on your chart:

1. Turn off Autoscroll. This will stop the chart from moving to the most recent candle every time price changes.

Turn off autoscroll

2. Hit Enter on your keyboard to specify a start date. A small box will appear in the lower left corner.

Enter the date that you want to scroll back to on the chart in dd.mm.yyyy format, then hit Enter again.

You can also manually scroll back to the date on the chart that you want to start from.

MT5 chart start date

Once you have scrolled back to the historical data that you want to start at, then hit F12 on your keyboard to move the chart forward, one candle at a time.

Record Your Results

Every time your setup fires off, place a trade and record it in the spreadsheet.

You don't have to take screenshots at this point because you don't even know if the strategy works or not.

So just keep testing as fast as you can, so you can get as much data as possible.

Creating screenshots will only slow you down.

Review Your Results

Now take a look at your spreadsheet and calculate the following:

This is enough data for now.

It will help you understand if you want to pursue this strategy or not.

If you want to be extra sure, do another round of testing to verify your results.

Sometimes you might be distracted or not in the right mindset when you do a test.

So if you get the same result with a second test, that will give you much more confidence that a strategy has an edge and you should move forward to the next step in your testing.

Test Another Pair

If you're satisfied with the results of a currency pair, then move on to testing another currency pair.

Not all currency pairs behave in the same way, so you can't assume that it will work on other pairs too. 

Some pairs are more volatile than others. Each individual currency is influenced by different economic factors.

You might be surprised at how differently a strategy performs with different strategies.

This is why you need to test each pair individually.

Be sure to record all of your rounds of backtesting on a separate spreadsheet.

Things to Avoid

Backtesting with MT5

Here are a few things to be aware of when doing backtesting with MetaTrader 5.

These tips will help you get the most out of your MT5 testing sessions.

Moving Too Fast Through the Charts

When you move too quickly through a chart, there's the tendency to move past an entry point on the chart.

That leads to hindsight bias because you already know what's going to happen.

If you already know how a trade will turn out, then you'll have biased data.

So find the testing speed that will allow you to get a lot of testing in, but also won't give you advanced knowledge of each trade. 

Changing Your Strategy in the Middle of a Test

It's really tempting to start tweaking your strategy in the middle of a test because you see a  new advantage.

But stick with the strategy, or you won't have a valid test.

When you change a strategy in the middle of the test, you won't know how good the original rules really are.

You also won't know how good the new rules are either because you are only doing a partial test with them.

So finish a test with one set of rules. Then create a new test with your new testing idea. 

Otherwise, your testing data is useless.

Stopping Too Early

If you win 10 trades in a row in the beginning of a test, you might be tempted to stop the test and call it a success.

Don't. 

The strategy may have just hit a really profitable streak that isn't normal for that strategy.

Stopping early won't allow you to see the entire picture and can lead to losses later.

Giving Up on a Low Return Strategy

It can be tempting to give up on a test if it's only returning 1% per year.

However, consider what would happen if you compounded that return with multiple pairs or timeframes.

If the strategy has a high win rate, it's certainly worth considering.

You might give up on an otherwise profitable strategy and find yourself jumping from strategy to strategy, when the first strategy would have met your goals.

Don't Keep Testing if the Results are Obvious

On the other hand, if it's obvious that the system doesn't work, then quit and save your time.

For example, if your strategy has lost 80% of the account, then it's probably time to stop.

There's no way you would continue with that strategy in real life.

Forcing the Strategy to Work

People also tend to be too optimistic about a trading strategy.

So they will subconsciously pass on losing trades and only take the winning trades, just to prove that the strategy works.

I was guilty of this when I first started backtesting.

When I reflect back on this, I did this partially because I wanted to get the backtesting process over with (and trade live) and I didn't like being wrong.

I'm not sure why others do it, but those were my reasons. They're very odd reasons in hindsight, because they didn't help me become a better trader.

But our actions aren't always logical and we need to continually reflect on our behavior to progress. 

Conclusion

Although backtesting can be very beneficial, not all strategies can be backtested. Learn more about this limitations of manual backtesting in this blog post.

But if you can backtest a strategy, it's a great way to test a trading idea, get hard data and build confidence in your skills. 

This tutorial will give you a good starting point, be sure to read the Complete Backtesting Guide for more details.

Once a strategy tests well, the Forward Testing Guide will show you how to take your trading strategy into the next phase of testing.

 

The post How to Do MetaTrader 5 Manual Backtesting appeared first on Trading Heroes.

]]>
MT5 Pending Order Types Explained https://www.tradingheroes.com/mt5-pending-order-types/ Thu, 19 Mar 2020 11:44:02 +0000 https://www.tradingheroes.com/?p=1019241 Market orders in MT5 are straightforward. But of you are confused about pending orders, this tutorial will help you out.

The post MT5 Pending Order Types Explained appeared first on Trading Heroes.

]]>
MT5 pending orders explainedThere are six types of pending orders in MetaTrader 5. This post will show you how each of them work and when you should use them.

These order types work on both the desktop and mobile versions of MT5.

Watch this video to see the different pending order types in action, or if you prefer the text version, it's provided after the video.

The 6 Types of MT5 Pending Orders

Here are the six types of MetaTrader 5 pending orders.

  1. Buy Stop
  2. Sell Stop
  3. Buy Limit
  4. Sell Limit
  5. Buy Stop Limit
  6. Sell Stop Limit

Now let's take a look at each pending order individually.

Buy Stop

The first type of pending order is a buy stop. Use a buy stop if you expect price to go higher and break through the buy stop level.

This type of entry is perfect for a trader who is looking for a break above a previous candle or breakout of an important resistance level.

When price hits the buy stop level, your order turns into a market order and is executed at the market.

In this example, a trader might be looking for price to break the top of the range at 1.29858. So the trader would set a buy stop at that price.

Buy stop example

When price hits that level, the buy stop pending order becomes a market order a long position is executed. In this case, price moved in the expected direction and the trade is now profitable.

buy stop triggered

Sell Stop

A sell stop pending order is just the opposite. You are expecting price to go lower and drop below the sell stop level.

Sell stop

Buy Limit

Now let's take a look at limit orders. These are for traders who don't want to pay too much for a trade. It's called a limit order because you limit the amount you pay for a trade.

When you use a buy limit order, you are expecting price to go in the opposite direction from the limit order price. Once price hits this level, a trade only gets executed if the price is below the buy limit price. 

buy limit pending order

Sell Limit

On the sell side, it's the same idea…but turned upside down. Traders use this order to be sure that they don't pay too much for a short trade.

When this price level gets hit, the short trade will only get executed if price is at this level or above. 

Sell limit pending order

Buy Stop Limit

As you have probably guessed, a buy stop limit combines characteristics of the stop and limit orders. Stop limit orders are the least used types of pending orders.

Basically, this is for traders who want all the of the benefits of a limit order, but also want to take advantage of price moving in the anticipated direction.

When price hits the buy stop limit level, the order turns into a buy limit order. From there, the trade won't be executed unless price is at the stop limit level or below.

It's worth noting that there's the possibility that this order might not get executed if price gaps above the stop limit price. This can happen in fast moving markets.

So if you're trading in a fast moving market and absolutely need to get in, then consider using a market order or a buy stop order. 

Sell Stop Limit

A sell stop limit allows you to get in as price is moving down, but it won't allow the trade to be executed unless price is at or above the stop limit price.

Your trade might not executed if price gaps down quickly.

Frequently Asked Questions About Pending Orders

Now I'll answer a few questions about pending orders.

Why does my order not execute in some cases, when price has hit my pending order level on the chart?

MT5 pending orders explained

There are several reasons why this could happen…

First, the spread could have been very narrow. Sometimes the spread is unusually narrow and price actually missed your pending order by a fraction of pip.

Second, your chart will either graph the bid or ask price. Therefore, maybe the bid price on your chart hit your pending order level, but the ask price needed to hit it, in order for the order to trigger.

The volatility of the market can play a role. In a fast moving market, price can “skip” over orders. This happens when computer systems don't have enough time to execute an order, as price moves quickly through it.

What about trailing stops or Order Cancels Order (OCO) in MT5?

MetaTrader 5 does not have these order types available. Trailing stops aren't that useful anyway, at least in the way that most software platforms implement them.

However, it can be useful to trail your stop loss by risk multiple or R. You can do that by using this EA.

If you would like to have the ability to do OCO, then you would have to program an EA yourself, or find a programmer to create one for you. Get a list of programmers here.

Why did price hit my pending order price at another broker, but not my broker?

Forex is a decentralized market. So there's no central exchange that sets the quotes for the currency pairs, like with most stock markets.

Price quotes at the different brokers are very similar because Forex is a very efficient market. When there is too big of a difference in price between liquidity providers, arbitragers come in and close that gap.

Therefore, there will always be slight difference in the quotes from various brokers and liquidity providers, but they usually don't get too far out of line.

Conclusion

So those are the 6 order types that you can use in MT5. They are available in both the desktop and mobile version of the software.

If you are just getting started with MT5 mobile, read this tutorial on how to use all of the features.

Each of these order types fills a specific purpose and will help you get into different types of trades. Don't be afraid to use them to help you get in at the right price.

The post MT5 Pending Order Types Explained appeared first on Trading Heroes.

]]>
How to Install Indicators on MT5 https://www.tradingheroes.com/how-to-add-indicators-to-mt5/ Tue, 11 Feb 2020 09:48:17 +0000 https://www.tradingheroes.com/?p=1018797 Learn how to install custom MT5 indicators and get answers to frequently asked questions.

The post How to Install Indicators on MT5 appeared first on Trading Heroes.

]]>
how to install indicators on mt5Installing new MetaTrader 5 indicators allows you to expand your analysis and trade any indicator-based trading strategy.

But adding new MT5 indicators isn't as easy as it should be. So if you are wondering how to do it, don't worry…you're not alone.

Others find it a little confusing too.

This post will teach you how to add indicators to MT5 and will also provide answers to commonly asked questions about installing custom MT5 indicators.

We also provide resources on where to get free MT5 indicators and how to find reliable programmers to have custom indicators created for you.

You can either watch the video tutorial, or the written version is provided below the video.

[toc]

MT5 Indicator Installation Video Tutorial

How to Install a MT5 Indicator

Adding a MT5 indicator to the platform is a simple 3-step process.

Step 1: Download the Indicator

First, download the indicator to your computer. The indicator can be in either .mq5 or .ex5 format.

Both will work.

For this example, I selected a random free indicator from the MQL5 library. If you don't have an indicator at the moment and you want to follow along with this tutorial, feel free to download one from here.

To be clear, I don't recommend that you actually use any of the indicators in the MQL5 library for live trading, unless you know how to code in MQL5 and understand the source code 100%. 

You don't know who created these indicators and how well the indicators actually work.

Using one of these indicators is like asking any random person off the street to fix your car. 

That said, I chose to download the Pip Chart indicator. I don't know what this indicator does, but I'm just going to use it to show you how to install a MT5 indicator.

indicator download

In this example, I clicked on the link circled above to download the indicator in .mq5 format.

Locate the download in and keep that window open for the next step.

file downloaded

Step 2: Launch MetaTrader 5 and Install the Indicator

Open MT5 and go to: File > Open Data Folder

Open data folder

Then go to: MQL5 > Indicators

Folders

Now to back to the window with your downloaded file and click and drag the file to your MT5 Indicators folder.

Drag file

Step 3: Setup and Test the Indicator

Once the indicator is installed, close and restart MT5. If you downloaded a .mq5 file, MT5 will automatically convert it into a .ex5 file when you restart MT5.

Compiled program

Once MT5 has restarted, go to: Insert > Indicators > Custom > Your indicator name (should be at the bottom of the list)

Indicator at bottom of screen

If you want to add the indicator to multiple charts, setup a chart template and include the indicator in the template. To do this, right-click on the chart, then click on Save Template.

Test the indicator to be sure that it works.

Once you are finished testing, that's it!

You have just installed your first MT5 indicator!

Uninstalling an Indicator

We aren't quite done yet…

What if you want to uninstall an indicator?

It's easy…

Just go to: Files > Open Data Folder again and delete the indicator files that you added to the folder. If you downloaded a .mq5 file, be sure to delete both the .mq5 and the .ex5 files.

Delete files

Then restart MT5 and the indicator will be gone.

Frequently Asked Questions About MT5 Indicators

Here are some frequently asked questions about installing and working with MT5 indicators.

If you don't see your question listed below, feel free to ask your question in the comments at the bottom of this page.

Where Can I Download Free MT5 Indicators?

There are a ton of sites out there that provide free MT5 indicators.

However, if you don't know who programmed these indicators, it's almost impossible to tell if they are 100% accurate. It also takes a lot of time to download free indicators and test them throughly.

From my experience, it's best to pay for a ready-made indicator or have one custom-made for you.

This saves a lot of time and headache.

…and I mean A LOT of time!

If you don't know how to code then it's best to hire a programmer. You can see our list of programmers here (including who we recommend).

That said, here are a couple of places that you can you can find free MT5 indicators:

Warning: Again, remember to test free indicators extensively. You usually get what you pay for. 

What's the Difference Between .ex5 and .mq5 Files?

  • .mq5 files contain the programming code that humans understand
  • .ex5 files contain the programming code that MT5 understands

So MT5 developers write indicators in .mq5 format, using MetaEditor.

But when it's time for MT5 to actually use the indicator, it has to be “translated” to .ex5 format.

MetaTrader 5 does this automatically.

When you add a .mq5 file to MT5 and restart the terminal, a .ex5 file will automatically be created from your .mq5 file and your indicator will be ready to use.

Can I Edit an .ex5 File Before I Install It?

No.

There are services/software out there that claim to be able to decompile or convert .ex5 files to mq5 files.

But I haven't seen one that actually works.

If you want to change how a custom indicator works and you don't have the .mq5 file, then it's best to have an entirely new indicator custom made for you. This will ensure that you are getting an indicator that actually works.

…and since you are in control of this file, you can make any changes you want in the future.

To get our list of MT5 programmers, go here.

Can I Use MT4 Indicators in MT5?

No.

MT4 and MT5 use completely different programming languages, so you cannot install a MT4 indicator in MT5.

The indicator would have to be rewritten for MT5, or you would have to find a similar indicator that is designed for MT5.

Can Custom Indicators be Installed on the Mobile Version of MT5?

No.

The next best thing is to use alert indicators on a desktop computer and send the alerts to your mobile phone. You can learn how to do that in this blog post.

You can also push out MT4/MT5 alerts to multiple devices by using this method.

Of course, an alert won't be useful with all indicators. But if you have a trading strategy that uses something like a RSI overbought/oversold condition, then an alert works really well for that.

Conclusion

So that's how you install new MT5 indicators. It's not the most user-friendly process, but it's easy once you go through it.

Installing new MT5 indicators allows you to expand your analysis and trade any strategy that uses indicators. This is one of the most powerful features of Metatrader 5.

If you have any questions about this process, leave a comment below.

The post How to Install Indicators on MT5 appeared first on Trading Heroes.

]]>