Create and Test Forex Strategies
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eas-guide:strategies-and-expert-advisors [2020/12/09 13:43] – [Writing Expert Advisors] Ilan Vardy | eas-guide:strategies-and-expert-advisors [2021/01/14 05:23] (current) – [Backtesting in MetaTrader] Ilan Vardy | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Expert Advisors ====== | ====== Expert Advisors ====== | ||
- | {{youtube> | ||
===== Manual Trading ===== | ===== Manual Trading ===== | ||
Line 7: | Line 6: | ||
MetaTrader is the most popular trading platform in the world. Most regulated brokers provide it free of charge. MetaTrader is developed by a company called MetaQuotes. Currently, MetaTrader **4** is the preferred trading platform among traders. There is also a newer version - MetaTrader 5. MetaTrader 5 is the latest version however, it is not as popular. | MetaTrader is the most popular trading platform in the world. Most regulated brokers provide it free of charge. MetaTrader is developed by a company called MetaQuotes. Currently, MetaTrader **4** is the preferred trading platform among traders. There is also a newer version - MetaTrader 5. MetaTrader 5 is the latest version however, it is not as popular. | ||
+ | |||
+ | {{youtube> | ||
+ | \\ | ||
The main purposes of a trading platform is to deliver data from the broker to your screen and to allow you to trade. MetaTrader allows you to trade manually as well as automatically. | The main purposes of a trading platform is to deliver data from the broker to your screen and to allow you to trade. MetaTrader allows you to trade manually as well as automatically. | ||
Line 12: | Line 14: | ||
In the image below, you can see a price chart of the EURUSD market. You can trade manually - buy and sell on the market. You can also see the current (latest) price on the far right of the chart. The price constantly changes and it is not always easy to decide whether you should buy or sell and what point in time you should execute your trade. Of course, you want to trade in the correct direction because you want to make a profit. | In the image below, you can see a price chart of the EURUSD market. You can trade manually - buy and sell on the market. You can also see the current (latest) price on the far right of the chart. The price constantly changes and it is not always easy to decide whether you should buy or sell and what point in time you should execute your trade. Of course, you want to trade in the correct direction because you want to make a profit. | ||
- | {{ : | + | {{: |
==== Indicators ==== | ==== Indicators ==== | ||
Line 20: | Line 22: | ||
You can add an indicator to the chart very easily. For our example, we will use one of the most popular indicators - MACD (" | You can add an indicator to the chart very easily. For our example, we will use one of the most popular indicators - MACD (" | ||
- | {{ : | + | {{: |
Once we add the indicator, a window displaying the **Options** appears. Since indicators are based on mathematical formulas we can choose the **Inputs** tab and choose values for some of the variables in the mathematical formula of the indicator. By changing the variables, you can change how the indicator is drawn out on the chart. | Once we add the indicator, a window displaying the **Options** appears. Since indicators are based on mathematical formulas we can choose the **Inputs** tab and choose values for some of the variables in the mathematical formula of the indicator. By changing the variables, you can change how the indicator is drawn out on the chart. | ||
- | {{ : | + | {{: |
As soon as you drop the indicator onto the chart you will see red lines appear on the chart. You will also notice bars appear below the chart. (If the indicator opens a dialogue window, just press OK.) | As soon as you drop the indicator onto the chart you will see red lines appear on the chart. You will also notice bars appear below the chart. (If the indicator opens a dialogue window, just press OK.) | ||
Line 56: | Line 58: | ||
==== Backtesting in MetaTrader ==== | ==== Backtesting in MetaTrader ==== | ||
- | Backtesting is the process of executing your trading strategy (or your Expert Advisor) on the historical data from your broker. | + | Backtesting is the process of executing your trading strategy (or your Expert Advisor) on the historical data from your broker. |
- | To backtest your strategy you can use MetaTrader' | + | To backtest your strategy you can use MetaTrader' |
However, there is a better way. | However, there is a better way. | ||
Line 64: | Line 66: | ||
=== Automatically Creating Expert Adivsors === | === Automatically Creating Expert Adivsors === | ||
- | There are tools that allow you to generate Expert Advisors without coding. | + | There are tools that allow you to generate Expert Advisors without coding. |
- | Expert Advisor Studio is designed to help you analyze, generate and test strategies. It also lets you easily export those strategies as Expert Advisors so you can autotrade them in MetaTrader. | + | Expert Advisor Studio is designed to help you analyze, generate and test strategies. It also lets you easily export those strategies as Expert Advisors so you can autotrade |
- | {{ : | + | {{: |
=== Strategy Overview === | === Strategy Overview === | ||
- | In Expert Advisor Studio you can specify the strategy logic manually | + | In Expert Advisor Studio you can specify the strategy logic manually |
- | {{ : | + | {{: |
- | In the image above you can see EA Studio' | + | In the image above you can see EA Studio' |
- | {{ : | + | {{: |
- | The boxes below the **Strategy Properties** box are the **Entry Rules**. Each entry rule is based on an indicator behaviour. For example in our case when **Force Index** changes its direction to downward we will enter a long position. | + | The boxes below the **Strategy Properties** box are the **Entry Rules**. Each entry rule is based on an indicator' |
- | {{ : | + | {{: |
- | If you click on an **Entry Rule** box you can see more data and specify different logical conditions for when to act. | + | If you click on an **Entry Rule** box you can see more data and specify different logical conditions for when it should |
- | {{ : | + | {{: |
Line 106: | Line 108: | ||
- | {{ : | + | {{: |
~~DISQUS~~ | ~~DISQUS~~ |