They can reduce the noise, showing a smoother movement of price.Moving averages are popular for the following reasons: So, for example, a moving average of period 10 is the average price over the last 10 candles. A moving average is basically an average value of the price over the last specified number of candles. Once you have your strategy design go to the Trading Diagram Menu, click on Generate MQL5 Code to get the MQL5 Code window.Įxpert Advisor Visual Wizard allows you to open your expert advisor directly with MetaTrader or to save it as an MQL5 file.A moving average is one of the simplest indicators in technical analysis. All trading flows must end at the END block.Ĭonnecting arrows link trading blocks and define trading flow direction. Trading Block that indicates where the strategy finishes. Options in this trading block inlcude Currency Pair, Lot Size, and the pip value for Take Profit, Stop Loss, and Trailing Stop.Ĭloses all long positions for the selected currency pair.Ĭloses all short positions for the selected currency pair.Īllows you to write you own notes about the forex strategy. Options in this trading block inlcude Currency Pair, Lot Size, and the pip value for Take Profit, Stop Loss, and Trailing Stop.Įxecutes a Sell Order. Produces a value of true whenever one or more of its preceding trading blocks are true.Įxecutes a Buy Order. Produces a value of true if and only if both of its preceding trading blocks are true. To obtain the indicator value for the current bar, 0 should be used. If you want the value of the indicator for the previous bar you use a shift of 1. Shift: Shift relative to the current bar the given amount of periods ago. Most of the time indicators have one line so 0 should be used. With mode you select the line that gives you the right signal. If you have 8 lines in your graph, each one gives you a signal. Mode: It's an index used to identify one of the available indicator signals. The mode and shift concepts are widely used to get the right signals from indicators. Custom indicators must be located in the indicators directory (C:\Program Files\MetaTrader 5\MQL5\Indicators for standard installations of MT5) In a TA block, select Custom Indicators - iCustom and input the appropriate variables or use the import custom indicator button. However external indicators can be used to create trading conditions. Using Custom Indicators in a trading condition: TA icons include all the technical indicators available in a MetaTrader 5 installation. Finally select one of the comparison options and click OK. Repeat the same procedure from the list on the right. To create a trading condition, edit the Technical Analysis trading block (TA), select a technical indicator from the list on the left. When an OR icon is used, trades are executed if any of the trading conditions in the TA icons that connect to the OR is true. When an AND icon is used, trades are executed if all trading conditions in the TA icons that connect to the AND are true. Complex trading conditions include a combination of TA icons using an OR icon or an AND icon. If the condition in the TA icon is true, a trade will be executed. Simple conditions include a TA (Technical Analysis) icon that connects to a BUY or SELL icon. Buy if the fast moving average is higher than the slow moving average. Trading Conditions: A trading condition is the logic that indicates when to trade (Buy or Sell) i.e. The TA - Technical Analysis icon allows you to create trading conditions using technical indicators and price related variables (Open, Close, High, Low, Ask, Bid, User Defined). This means that each variable in the START trading block has an equivalent variable on MetaTrader 5. When the Expert Advisor code is generated, the options on the START trading block are transformed into MQL5 variables. To access the setup options simply double click on the START trading block and you will be prompted with the following screen: The START icon has two main functions: Indicates where the forex strategy starts and allows the Expert Advisor setup. Just add icons, then connect them and set their configuration parameters.Įxpert Advisor Visual Wizard Icons (Trading Blocks) To design your expert advisor for MetaTrader 5 you need to create a trading diagram that represents your EA logic.
0 Comments
Leave a Reply. |