forex software

Create and Test Forex Strategies

forex software

eas-guide:strategies-and-expert-advisors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eas-guide:strategies-and-expert-advisors [2019/02/25 17:27] – eas-guide:strategies-and-expert-advisors-strategy-properties.png vinieas-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>hfEOvEyArf8?medium}} 
  
 ===== Manual Trading ===== ===== Manual Trading =====
 ==== MetaTrader ==== ==== MetaTrader ====
  
-MetaTrader is trading platform. Normally you will get it from your broker for free. MetaTrader is developed by a company called MetaQuotes. Currently, MetaTrader 4 is the most popular trading platform among traders. Almost all brokers offer MetaTrader 4. There is also another version - MetaTrader 5. MetaTrader 5 is the latest version however, it is not as popular.+MetaTrader is the most popular trading platform in the worldMost 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.
  
-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>yYm7ENhnYe8?medium|}} 
 +\\
  
 +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. As you will notice the price is constantly moving and it is not easy to decide whether you should buy or sell and what point in time you should act. Of course, you want to trade in the proper direction since you want to make a profit.+In the image below, you can see 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.
  
-{{ :eas-guide:eurusd_market.png |}}+{{:eas-guide:eurusd_market.png?nolink&600|}}
  
 ==== 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 ("Moving Average Convergence Divergence"). You can just drag and drop the indicator from the MetaTrader **Navigator** box to the chart. (if you don't see the navigator go to **View > Navigator** to enable it)+You can add an indicator to the chart very easily. For our example, we will use one of the most popular indicators - MACD ("Moving Average Convergence Divergence"). You can just drag and drop the indicator from the MetaTrader **Navigator** box onto the chart. (if you don't see the navigator go to **View > Navigator** to enable it)
  
-{{ :eas-guide:mt4_navigator.png |}}+{{:eas-guide:mt4_navigator.png?nolink |}}
  
-For our example we will use one of the most popular indicators - MACD (Moving Average Convergence Divergence). Adding the indicator displays the **Options** window. 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. Through this, 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.
  
-{{ :eas-guide:setting_up_indicator_properties.png |}}+{{:eas-guide:setting_up_indicator_properties.png?nolink|}}
  
- As soon as you drop the indicator on 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 dialog 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.)
  
-{{ :eas-guide:macd_on_eurusd.png |}}+{{ :eas-guide:macd_on_eurusd.png?nolink |}}
  
 The grey bars here show the MACD line and the red line is called a "signal line". When the market changes this indicator's line changes and the bars also change.  The grey bars here show the MACD line and the red line is called a "signal line". When the market changes this indicator's line changes and the bars also change. 
  
-You can use these changes as they appear as **signals** for what direction to choose for trading, when to open and when to close a position. Those signals define your trading strategy. When to buy, when to sell and in what direction.+You can use these changes as they appear as **signals** to select inwhich direction to open your trade - long (buy) or short (sell)  when to open and when to close a position. These signals define your trading strategy. When to buy, when to sell and in what direction.
  
-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 could be, that 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 a significant amount of time. 
  
 ===== 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 we cannot do that with simply using indicators. MetaTrader Indicators contain no trading logic. Here come Expert Advisors.+Indicators are great for guiding us in manual trading. However, if we want to automate trading and leave MetaTrader to trade on its own while we're busy elsewhere, we cannot do that by simply using indicators. MetaTrader Indicators contain no trading logic. This is where our Expert Advisors go to work.
  
 ==== Expert Advisors ==== ==== Expert Advisors ====
  
-If you are going to go for automatic trading you need a trading strategy. More specifically in automated trading, your trading strategy is the rules when to open a position and when to close a position and in what direction.+If you are going to trade automatically, you need a trading strategy. More specifically in automated trading, your trading strategy is the rules of when to open a position and when to close a position and in which direction.
  
-Trading strategies are "only rules" compared to Expert Advisors. Expert Advisors are the implementation of the rules in code that MetaTrader can understand and execute MQL (MetaQuotes Language) code. This is why with our software you can export your trading strategy as an Expert Advisor.+Trading strategies are just the rules. Expert Advisors are the implementation of the rules in code that MetaTrader can understand and execute in MQL (MetaQuotes Language) code. This is why with our software you can export your trading strategy as an Expert Advisor.
  
-MQL is not easy to writeIt is actually harder than normal programming because besides programming you need to know how MetaTrader works internally. +MQL is not easy to code withIn fact it is more difficult than normal programming because aside from programmingyou need to have a clear understanding of how MetaTrader works internally. 
  
 ==== 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 create a potentially profitable Expert Advisor. You need to know how the market works and how the indicators work.+To program Experts, you need to know how MetaTrader works but this is just the start. You need additional knowledge to create a potentially profitable Expert Advisor. You need to know how the market works and how the indicators work.
  
-After you are done programming you will want to test your Expert Advisor. Then if you are not happy with the results you need go back, change the code and test it again until you are happy with the EA's performance on historical data. This is the most tedious part and many people get stuck on it because it takes a ton of time.+After you have completed the programming portion, you will want to test your Expert Advisor. If you are not happy with the results you need go back, change the code and test it again until you are happy with the EA's performance on historical data. This is the most tedious part and many people get stuck at this point because it takes a huge amount of time.
  
 ==== 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. Then you can see how it would have performed if it was trading on this market.+Backtesting is the process of executing your trading strategy (or your Expert Advisor) on the historical data from your broker. Only then can you can see how it would have performed if it was trading on this market during this time.
  
-To backtest your strategy you can use MetaTrader's Strategy Tester. Since MetaTrader downloads historical data from the broker you can use the data and the Strategy Tester to test your Expert Advisors.+To backtest your strategy you can use MetaTrader's Strategy Tester. Because MetaTrader downloads historical data from the broker you can use the data and the Strategy Tester to test your Expert Advisors.
  
 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. Here is where we can actually help you a real lot. Instead of spending countless hours on coding, testing, changing and optimizing your Expert Advisors we can offer you a tool that does that for you.+There are tools that allow you to generate Expert Advisors without coding. ANd this is where we are able to really assist you. Instead of spending countless hours on coding, testing, changing and optimizing your Expert Advisors we can offer you a tool that does all of that for you.
  
-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 with them in MetaTrader.
  
  
-{{ :eas-guide:export.png |}}+{{:eas-guide:export.png?nolink|}}
  
 === Strategy Overview === === Strategy Overview ===
  
-In Expert Advisor Studio you can specify the strategy logic manually as well+In Expert Advisor Studio you can specify the strategy logic manually too
  
-{{ :eas-guide:strategies-and-expert-advisors-strategy-properties.png |}}+{{:eas-guide:strategies-and-expert-advisors-strategy-properties.png?nolink|}}
  
-In the image above you can see EA Studio's [[eas-guide:editor|Strategy Editor]]. In the middle column, there are some coloured boxes. The box at the top is the **Strategy Properties**. If you click on it you can set the entry lots for the strategy as well as the protections such as Stop Los and Take Profit (see below).+In the image above you can see EA Studio's [[eas-guide:editor|Strategy Editor]]. In the middle column, there are some coloured boxes. The box at the top is the **Strategy Properties**. If you click on it you can set the entry lots for the strategy as well as the protections and profit levels, known as your Stop Loss and Take Profit (see below).
  
-{{ :eas-guide:strategy_properties_clicked_.png |}}+{{:eas-guide:strategy_properties_clicked_.png?nolink|}}
  
-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'behaviour. For example in our case when **Force Index** changes its direction to downward we will enter a long position.
  
-{{ :eas-guide:force_index.png |}}+{{:eas-guide:force_index.png?nolink|}}
  
-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 act. 
  
-{{ :eas-guide:force_index_clicked_.png |}}+{{:eas-guide:force_index_clicked_.png?nolink|}}
  
  
Line 107: Line 108:
  
  
-{{ :eas-guide:close_new_entry_rules.png |}}+{{:eas-guide:close_new_entry_rules.png?nolink|}}
  
 ~~DISQUS~~ ~~DISQUS~~