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
Next revisionBoth sides next revision
eas-guide:strategies-and-expert-advisors [2019/02/18 08:13] Miroslav Popoveas-guide:strategies-and-expert-advisors [2019/04/06 14:31] – ?nolink in image tags vini
Line 6: Line 6:
 ==== MetaTrader ==== ==== MetaTrader ====
  
-MetaTrader is a 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 versionhowever it is not as popular.+MetaTrader is a trading platform. Normally you will get it from your broker for free. MetaTrader is developed by a company called MetaQuotes. CurrentlyMetaTrader 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 howeverit 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.  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. 
  
-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. 
  
-{{ :eas-guide:eurusd_market.png |}}+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. 
 + 
 +{{ :eas-guide:eurusd_market.png?nolink |}}
  
 ==== Indicators ==== ==== Indicators ====
Line 18: Line 19:
 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 examplewe 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)
  
-{{ :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.+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 thisyou 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 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.)
  
-{{ :eas-guide:macd_on_eurusd.png |}}+{{ :eas-guide:macd_on_eurusd.png?nolink |}}
  
-The gray 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** 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.
  
-We could say if you see the gray 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. +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. Howeverhow 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. 
  
 ===== 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. Howeverif 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.
  
 ==== 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 go for automatic trading you need a trading strategy. More specifically in automated tradingyour trading strategy is the rules when to open a position and when to close a position and in what 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 "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.
Line 50: Line 51:
 ==== 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 Expertsyou 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.
  
 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 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.
Line 60: Line 61:
 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. Since 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.+Howeverthere is a better way.
  
 === Automatically Creating Expert Adivsors === === Automatically Creating Expert Adivsors ===
Line 69: Line 70:
  
  
-{{ :eas-guide:export.png |}}+{{ :eas-guide:export.png?nolink |}}
  
 === Strategy Overview === === Strategy Overview ===
Line 75: Line 76:
 In Expert Advisor Studio you can specify the strategy logic manually as well.  In Expert Advisor Studio you can specify the strategy logic manually as well. 
  
-{{ :eas-guide: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 colored 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 columnthere 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).
  
-{{ :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 behavior. 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 to act. 
  
-{{ :eas-guide:force_index_clicked_.png |}}+{{ :eas-guide:force_index_clicked_.png?nolink |}}
  
  
Line 106: Line 107:
  
  
-{{ :eas-guide:close_new_entry_rules.png |}}+{{ :eas-guide:close_new_entry_rules.png?nolink |}}
  
 ~~DISQUS~~ ~~DISQUS~~