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 [2019/04/06 14:31] – ?nolink in image tags vini | 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 ===== | ||
==== MetaTrader ==== | ==== MetaTrader ==== | ||
- | MetaTrader is a trading platform. | + | MetaTrader is the most popular |
- | The main purposes of the trading platform are 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. | + | {{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. | ||
- | What you see on the picture below is the price chart of the EURUSD market. You can trade manually - buy and sell on the market. You can also see the current (latest) price in the right end of the chart. | + | In the image below, |
- | {{ : | + | {{: |
==== Indicators ==== | ==== Indicators ==== | ||
Line 19: | Line 20: | ||
To allow you to make a better decision MetaTrader has options to add indicators on the chart. Indicators are shown as lines or bars that will run along the price chart. Indicators are mathematically based on price history and other market parameters. | To allow you to make a better decision MetaTrader has options to add indicators on the chart. Indicators are shown as lines or bars that will run along the price chart. Indicators are mathematically based on price history and other market parameters. | ||
- | 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 (" |
- | {{ : | + | {{: |
- | For our example | + | Once we add the indicator, a window displaying |
- | {{ : | + | {{: |
- | As soon as you drop the indicator | + | As soon as you drop the indicator |
{{ : | {{ : | ||
Line 33: | Line 34: | ||
The grey bars here show the MACD line and the red line is called a " | The grey bars here show the MACD line and the red line is called a " | ||
- | You can use these changes as they appear as **signals** | + | You can use these changes as they appear as **signals** |
- | We could say if you see the grey MACD bars go above the red line this might be a good signal for entering in a long position. However, how do we know if this is a good idea or not? We can test it on a demo account but it will take lots of time. | + | One potential signal |
===== Automatic Trading ===== | ===== Automatic Trading ===== | ||
- | Indicators are great for guiding us in manual trading. However, if we want to automate trading and leave MetaTrader trade on its own while we do other things | + | Indicators are great for guiding us in manual trading. However, if we want to automate trading and leave MetaTrader |
==== Expert Advisors ==== | ==== Expert Advisors ==== | ||
- | If you are going to go for automatic trading | + | If you are going to trade automatically, |
- | Trading strategies are " | + | Trading strategies are just the rules. Expert Advisors are the implementation of the rules in code that MetaTrader can understand and execute |
- | MQL is not easy to write. It is actually harder | + | MQL is not easy to code with. In fact it is more difficult |
==== Writing Expert Advisors ==== | ==== Writing Expert Advisors ==== | ||
- | To program Experts, you need to know how MetaTrader works but things do not end here. You need several other things | + | To program Experts, you need to know how MetaTrader works but this is just the start. You need additional knowledge |
- | After you are done programming you will want to test your Expert Advisor. | + | After you have completed the programming |
==== 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 65: | 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 107: | Line 108: | ||
- | {{ : | + | {{: |
~~DISQUS~~ | ~~DISQUS~~ |