![How to Develop an Expert Advisor using UML Tools](https://c.mql5.com/2/0/MQL5_UML_modelling.png)
![How to Develop an Expert Advisor using UML Tools](https://c.mql5.com/i/articles/overlay.png)
How to Develop an Expert Advisor using UML Tools
This article discusses creation of Expert Advisors using the UML graphical language, which is used for visual modeling of object-oriented software systems. The main advantage of this approach is the visualization of the modeling process. The article contains an example that shows modeling of the structure and properties of an Expert Advisor using the Software Ideas Modeler.
![A DLL for MQL5 in 10 Minutes (Part II): Creating with Visual Studio 2017](https://c.mql5.com/2/35/logo__2.png)
![A DLL for MQL5 in 10 Minutes (Part II): Creating with Visual Studio 2017](https://c.mql5.com/i/articles/overlay.png)
A DLL for MQL5 in 10 Minutes (Part II): Creating with Visual Studio 2017
The original basic article has not lost its relevance and thus if you are interested in this topic, be sure to read the first article. However much time has passed since then, so the current Visual Studio 2017 features an updated interface. The MetaTrader 5 platform has also acquired new features. The article provides a description of dll project development stages, as well as DLL setup and interaction with MetaTrader 5 tools.
![Money-Making Algorithms Employing Trailing Stop](https://c.mql5.com/2/0/Profitable_Strategy_Trailing_Stop_MQL5.png)
![Money-Making Algorithms Employing Trailing Stop](https://c.mql5.com/i/articles/overlay.png)
Money-Making Algorithms Employing Trailing Stop
This article's objective is to study profitability of algorithms with different entries into trades and exits using trailing stop. Entry types to be used are random entry and reverse entry. Stop orders to be used are trailing stop and trailing take. The article demonstrates money-making algorithms with a profitability of about 30% per annum.
![Processing of trade events in Expert Advisor using the OnTrade() function](https://c.mql5.com/2/0/function_ontrade_MQL5.png)
![Processing of trade events in Expert Advisor using the OnTrade() function](https://c.mql5.com/i/articles/overlay.png)
Processing of trade events in Expert Advisor using the OnTrade() function
MQL5 gave a mass of innovations, including work with events of various types (timer events, trade events, custom events, etc.). Ability to handle events allows you to create completely new type of programs for automatic and semi-automatic trading. In this article we will consider trade events and write some code for the OnTrade() function, that will process the Trade event.
![Controlled optimization: Simulated annealing](https://c.mql5.com/2/31/icon__1.png)
![Controlled optimization: Simulated annealing](https://c.mql5.com/i/articles/overlay.png)
Controlled optimization: Simulated annealing
The Strategy Tester in the MetaTrader 5 trading platform provides only two optimization options: complete search of parameters and genetic algorithm. This article proposes a new method for optimizing trading strategies — Simulated annealing. The method's algorithm, its implementation and integration into any Expert Advisor are considered. The developed algorithm is tested on the Moving Average EA.
![Continuous Walk-Forward Optimization (Part 2): Mechanism for creating an optimization report for any robot](https://c.mql5.com/2/49/Continuous-Walk-Forward-Optimization_002_600x314.jpg)
Continuous Walk-Forward Optimization (Part 2): Mechanism for creating an optimization report for any robot
The first article within the Walk-Through Optimization series described the creation of a DLL to be used in our auto optimizer. This continuation is entirely devoted to the MQL5 language.
![Universal Expert Advisor: Trading Modes of Strategies (Part 1)](https://c.mql5.com/2/21/gu84ttj7g7r_klt2.png)
![Universal Expert Advisor: Trading Modes of Strategies (Part 1)](https://c.mql5.com/i/articles/overlay.png)
Universal Expert Advisor: Trading Modes of Strategies (Part 1)
Any Expert Advisor developer, regardless of programming skills, is daily confronted with the same trading tasks and algorithmic problems, which should be solved to organize a reliable trading process. The article describes the possibilities of the CStrategy trading engine that can undertake the solution of these tasks and provide a user with convenient mechanism for describing a custom trading idea.
![A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment](https://c.mql5.com/2/0/virtual__1.png)
![A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment](https://c.mql5.com/i/articles/overlay.png)
A Virtual Order Manager to track orders within the position-centric MetaTrader 5 environment
This class library can be added to an MetaTrader 5 Expert Advisor to enable it to be written with an order-centric approach broadly similar to MetaTrader 4, in comparison to the position-based approach of MetaTrader 5. It does this by keeping track of virtual orders at the MetaTrader 5 client terminal, while maintaining a protective broker stop for each position for disaster protection.
![Library for easy and quick development of MetaTrader programs (part XIV): Symbol object](https://c.mql5.com/2/36/MQL5-avatar-doeasy__9.png)
![Library for easy and quick development of MetaTrader programs (part XIV): Symbol object](https://c.mql5.com/i/articles/overlay.png)
Library for easy and quick development of MetaTrader programs (part XIV): Symbol object
In this article, we will create the class of a symbol object that is to be the basic object for creating the symbol collection. The class will allow us to obtain data on the necessary symbols for their further analysis and comparison.
![How to copy signals using an EA by your rules?](https://c.mql5.com/2/23/ava__1.png)
![How to copy signals using an EA by your rules?](https://c.mql5.com/i/articles/overlay.png)
How to copy signals using an EA by your rules?
When you subscribe to signals, such situation may occur: your trade account has a leverage of 1:100, the provider has a leverage of 1:500 and trades using the minimal lot, and your trade balances are virtually equal — but the copy ratio will comprise only 10% to 15%. This article describes how to increase the copy rate in such cases.
![The Drawing Styles in MQL5](https://c.mql5.com/2/0/180x180LoongIndicator.png)
![The Drawing Styles in MQL5](https://c.mql5.com/i/articles/overlay.png)
The Drawing Styles in MQL5
There are 6 drawing styles in MQL4 and 18 drawing styles in MQL5. Therefore, it may be worth writing an article to introduce MQL5's drawing styles. In this article, we will consider the details of drawing styles in MQL5. In addition, we will create an indicator to demonstrate how to use these drawing styles, and refine the plotting.
![The Implementation of a Multi-currency Mode in MetaTrader 5](https://c.mql5.com/2/0/Multicurrency_Expert_Advisor.png)
![The Implementation of a Multi-currency Mode in MetaTrader 5](https://c.mql5.com/i/articles/overlay.png)
The Implementation of a Multi-currency Mode in MetaTrader 5
For a long time multi-currency analysis and multi-currency trading has been of interest to people. The opportunity to implement a full fledged multi-currency regime became possible only with the public release of MetaTrader 5 and the MQL5 programming language. In this article we propose a way to analyze and process all incoming ticks for several symbols. As an illustration, let's consider a multi-currency RSI indicator of the USDx dollar index.
![Combinatorics and probability theory for trading (Part I): The basics](https://c.mql5.com/2/49/Combinatorics-and-probability-theory-for-trading_001_The_basics_600x314.jpg)
Combinatorics and probability theory for trading (Part I): The basics
In this series of article, we will try to find a practical application of probability theory to describe trading and pricing processes. In the first article, we will look into the basics of combinatorics and probability, and will analyze the first example of how to apply fractals in the framework of the probability theory.
![Bid/Ask spread analysis in MetaTrader 5](https://c.mql5.com/2/49/Bid_Ask_spread_analysis_in_MetaTrader-5_600x314.jpg)
Bid/Ask spread analysis in MetaTrader 5
An indicator to report your brokers Bid/Ask spread levels. Now we can use MT5s tick data to analyze what the historic true average Bid/Ask spread actually have recently been. You shouldn't need to look at the current spread because that is available if you show both bid and ask price lines.
![Color optimization of trading strategies](https://c.mql5.com/2/35/avatar-colorful.png)
![Color optimization of trading strategies](https://c.mql5.com/i/articles/overlay.png)
Color optimization of trading strategies
In this article we will perform an experiment: we will color optimization results. The color is determined by three parameters: the levels of red, green and blue (RGB). There are other color coding methods, which also use three parameters. Thus, three testing parameters can be converted to one color, which visually represents the values. Read this article to find out if such a representation can be useful.
![Applying Monte Carlo method in reinforcement learning](https://c.mql5.com/2/32/family-eco.png)
![Applying Monte Carlo method in reinforcement learning](https://c.mql5.com/i/articles/overlay.png)
Applying Monte Carlo method in reinforcement learning
In the article, we will apply Reinforcement learning to develop self-learning Expert Advisors. In the previous article, we considered the Random Decision Forest algorithm and wrote a simple self-learning EA based on Reinforcement learning. The main advantages of such an approach (trading algorithm development simplicity and high "training" speed) were outlined. Reinforcement learning (RL) is easily incorporated into any trading EA and speeds up its optimization.
![Use of Resources in MQL5](https://c.mql5.com/2/72/resources_600x314.jpg)
Use of Resources in MQL5
MQL5 programs not only automate routine calculations, but also can create a full-featured graphical environment. The functions for creating truly interactive controls are now virtually the same rich, as those in classical programming languages. If you want to write a full-fledged stand-alone program in MQL5, use resources in them. Programs with resources are easier to maintain and distribute.
![Cross-Platform Expert Advisor: Signals](https://c.mql5.com/2/28/Cross_Platform_Expert_Advisor.png)
![Cross-Platform Expert Advisor: Signals](https://c.mql5.com/i/articles/overlay.png)
Cross-Platform Expert Advisor: Signals
This article discusses the CSignal and CSignals classes which will be used in cross-platform expert advisors. It examines the differences between MQL4 and MQL5 on how particular data needed for evaluation of trade signals are accessed to ensure that the code written will be compatible with both compilers.
![Mini Market Emulator or Manual Strategy Tester](https://c.mql5.com/2/30/swe6uqp1p_kql9_szi4cg0v.png)
![Mini Market Emulator or Manual Strategy Tester](https://c.mql5.com/i/articles/overlay.png)
Mini Market Emulator or Manual Strategy Tester
Mini Market Emulator is an indicator designed for partial emulation of work in the terminal. Presumably, it can be used to test "manual" strategies of market analysis and trading.
![Continuous Walk-Forward Optimization (Part 7): Binding Auto Optimizer's logical part with graphics and controlling graphics from the program](https://c.mql5.com/2/49/Continuous-Walk-Forward-Optimization_007_600x314.jpg)
Continuous Walk-Forward Optimization (Part 7): Binding Auto Optimizer's logical part with graphics and controlling graphics from the program
This article describes the connection of the graphical part of the auto optimizer program with its logical part. It considers the optimization launch process, from a button click to task redirection to the optimization manager.
![Timeseries in DoEasy library (part 38): Timeseries collection - real-time updates and accessing data from the program](https://c.mql5.com/2/38/MQL5-avatar-doeasy-library__3.png)
![Timeseries in DoEasy library (part 38): Timeseries collection - real-time updates and accessing data from the program](https://c.mql5.com/i/articles/overlay.png)
Timeseries in DoEasy library (part 38): Timeseries collection - real-time updates and accessing data from the program
The article considers real-time update of timeseries data and sending messages about the "New bar" event to the control program chart from all timeseries of all symbols for the ability to handle these events in custom programs. The "New tick" class is used to determine the need to update timeseries for the non-current chart symbol and periods.
![Multicurrency monitoring of trading signals (Part 2): Implementation of the visual part of the application](https://c.mql5.com/2/37/Article_Logo__3.png)
![Multicurrency monitoring of trading signals (Part 2): Implementation of the visual part of the application](https://c.mql5.com/i/articles/overlay.png)
Multicurrency monitoring of trading signals (Part 2): Implementation of the visual part of the application
In the previous article, we created the application framework, which we will use as the basis for all further work. In this part, we will proceed with the development: we will create the visual part of the application and will configure basic interaction of interface elements.
![Practical application of neural networks in trading. Python (Part I)](https://c.mql5.com/2/49/Practical_application_of_neural_networks_in_trading_003_600x314.jpg)
Practical application of neural networks in trading. Python (Part I)
In this article, we will analyze the step-by-step implementation of a trading system based on the programming of deep neural networks in Python. This will be performed using the TensorFlow machine learning library developed by Google. We will also use the Keras library for describing neural networks.
![Using the Object Pointers in MQL5](https://c.mql5.com/2/0/pointer_small.png)
![Using the Object Pointers in MQL5](https://c.mql5.com/i/articles/overlay.png)
Using the Object Pointers in MQL5
By default, all objects in MQL5 are passed by reference, but there is a possibility to use the object pointers. However it's necessary to perform the pointer checking, because the object may be not initialized. In this case, the MQL5 program will be terminated with critical error and unloaded. The objects, created automatically, doesn't cause such an error, so in this sence, they are quite safe. In this article, we will try to understand the difference between the object reference and object pointer, and consider how to write secure code, that uses the pointers.
![Manual charting and trading toolkit (Part I). Preparation: structure description and helper class](https://c.mql5.com/2/39/MQL5-set_of_tools.png)
![Manual charting and trading toolkit (Part I). Preparation: structure description and helper class](https://c.mql5.com/i/articles/overlay.png)
Manual charting and trading toolkit (Part I). Preparation: structure description and helper class
This is the first article in a series, in which I am going to describe a toolkit which enables manual application of chart graphics by utilizing keyboard shortcuts. It is very convenient: you press one key and a trendline appears, you press another key — this will create a Fibonacci fan with the necessary parameters. It will also be possible to switch timeframes, to rearrange layers or to delete all objects from the chart.
![Developing a cross-platform Expert Advisor to set StopLoss and TakeProfit based on risk settings](https://c.mql5.com/2/36/fix_open_200.png)
![Developing a cross-platform Expert Advisor to set StopLoss and TakeProfit based on risk settings](https://c.mql5.com/i/articles/overlay.png)
Developing a cross-platform Expert Advisor to set StopLoss and TakeProfit based on risk settings
In this article, we will create an Expert Advisor for automated entry lot calculation based on risk values. Also the Expert Advisor will be able to automatically place Take Profit with the select ratio to Stop Loss. That is, it can calculate Take Profit based on any selected ratio, such as 3 to 1, 4 to 1 or any other selected value.
![Graphical Interfaces I: Form for Controls (Chapter 2)](https://c.mql5.com/2/21/Graphic-interface__1.png)
![Graphical Interfaces I: Form for Controls (Chapter 2)](https://c.mql5.com/i/articles/overlay.png)
Graphical Interfaces I: Form for Controls (Chapter 2)
In this article we will create the first and main element of the graphical interface - a form for controls. Multiple controls can be attached to this form anywhere and in any combination.
![Multiple Regression Analysis. Strategy Generator and Tester in One](https://c.mql5.com/2/0/Multiple_Regression_Analysis_MQL5.png)
![Multiple Regression Analysis. Strategy Generator and Tester in One](https://c.mql5.com/i/articles/overlay.png)
Multiple Regression Analysis. Strategy Generator and Tester in One
The article gives a description of ways of use of the multiple regression analysis for development of trading systems. It demonstrates the use of the regression analysis for strategy search automation. A regression equation generated and integrated in an EA without requiring high proficiency in programming is given as an example.
![Advanced EA constructor for MetaTrader - botbrains.app](https://c.mql5.com/2/43/avatar.png)
![Advanced EA constructor for MetaTrader - botbrains.app](https://c.mql5.com/i/articles/overlay.png)
Advanced EA constructor for MetaTrader - botbrains.app
In this article, we demonstrate features of botbrains.app - a no-code platform for trading robots development. To create a trading robot you don't need to write any code - just drag and drop the necessary blocks onto the scheme, set their parameters, and establish connections between them.
![How to Make Money from MetaTrader AppStore and Trading Signals Services If You Are Not a Seller or a Provider](https://c.mql5.com/2/0/mql5_share_avatar.png)
![How to Make Money from MetaTrader AppStore and Trading Signals Services If You Are Not a Seller or a Provider](https://c.mql5.com/i/articles/overlay.png)
How to Make Money from MetaTrader AppStore and Trading Signals Services If You Are Not a Seller or a Provider
It is possible to start making money on MQL5.com right now without having to be a seller of Market applications or a profitable signals provider. Select the products you like and post links to them on various web resources. Attract potential customers and the profit is yours!
![Developing a cross-platform grid EA (Last part): Diversification as a way to increase profitability](https://c.mql5.com/2/37/mql5_ea_adviser_grid.png)
![Developing a cross-platform grid EA (Last part): Diversification as a way to increase profitability](https://c.mql5.com/i/articles/overlay.png)
Developing a cross-platform grid EA (Last part): Diversification as a way to increase profitability
In previous articles within this series, we tried various methods for creating a more or less profitable grid Expert Advisor. Now we will try to increase the EA profitability through diversification. Our ultimate goal is to reach 100% profit per year with the maximum balance drawdown no more than 20%.
![Patterns available when trading currency baskets. Part II](https://c.mql5.com/2/26/articles_234.png)
![Patterns available when trading currency baskets. Part II](https://c.mql5.com/i/articles/overlay.png)
Patterns available when trading currency baskets. Part II
We continue our discussion of the patterns traders can come across while trading currency baskets. In this part, we will consider the patterns formed when using combined trend indicators. Indicators based on a currency index are to be used as the analytical tool.
![Parsing HTML with curl](https://c.mql5.com/2/37/logo.png)
![Parsing HTML with curl](https://c.mql5.com/i/articles/overlay.png)
Parsing HTML with curl
The article provides the description of a simple HTML code parsing library using third-party components. In particular, it covers the possibilities of accessing data which cannot be retrieved using GET and POST requests. We will select a website with not too large pages and will try to obtain interesting data from this site.
![Selection and navigation utility in MQL5 and MQL4: Adding data to charts](https://c.mql5.com/2/35/Select_Symbols_Utility_MQL5__2.png)
![Selection and navigation utility in MQL5 and MQL4: Adding data to charts](https://c.mql5.com/i/articles/overlay.png)
Selection and navigation utility in MQL5 and MQL4: Adding data to charts
In this article, we will continue expanding the functionality of the utility. This time, we will add the ability to display data that simplifies our trading. In particular, we are going to add High and Low prices of the previous day, round levels, High and Low prices of the year, session start time, etc.
![Bi-Directional Trading and Hedging of Positions in MetaTrader 5 Using the HedgeTerminal Panel, Part 1](https://c.mql5.com/2/17/HedgeTerminalaArticle200x200_2.png)
![Bi-Directional Trading and Hedging of Positions in MetaTrader 5 Using the HedgeTerminal Panel, Part 1](https://c.mql5.com/i/articles/overlay.png)
Bi-Directional Trading and Hedging of Positions in MetaTrader 5 Using the HedgeTerminal Panel, Part 1
This article describes a new approach to hedging of positions and draws the line in the debates between users of MetaTrader 4 and MetaTrader 5 about this matter. The algorithms making such hedging reliable are described in layman's terms and illustrated with simple charts and diagrams. This article is dedicated to the new panel HedgeTerminal, which is essentially a fully featured trading terminal within MetaTrader 5. Using HedgeTerminal and the virtualization of the trade it offers, positions can be managed in the way similar to MetaTrader 4.
![Studying the CCanvas Class. How to Draw Transparent Objects](https://c.mql5.com/2/17/CCanvas_class_Standard_library_MetaTrader5.png)
![Studying the CCanvas Class. How to Draw Transparent Objects](https://c.mql5.com/i/articles/overlay.png)
Studying the CCanvas Class. How to Draw Transparent Objects
Do you need more than awkward graphics of moving averages? Do you want to draw something more beautiful than a simple filled rectangle in your terminal? Attractive graphics can be drawn in the terminal. This can be implemented through the CСanvas class, which is used for creating custom graphics. With this class you can implement transparency, blend colors and produce the illusion of transparency by means of overlapping and blending colors.
![Gap - a profitable strategy or 50/50?](https://c.mql5.com/2/34/GapDown.png)
![Gap - a profitable strategy or 50/50?](https://c.mql5.com/i/articles/overlay.png)
Gap - a profitable strategy or 50/50?
The article dwells on gaps — significant differences between a close price of a previous timeframe and an open price of the next one, as well as on forecasting a daily bar direction. Applying the GetOpenFileName function by the system DLL is considered as well.
![PairPlot graph based on CGraphic for analyzing correlations between data arrays (time series)](https://c.mql5.com/2/33/PairPlot_Graphic.png)
![PairPlot graph based on CGraphic for analyzing correlations between data arrays (time series)](https://c.mql5.com/i/articles/overlay.png)
PairPlot graph based on CGraphic for analyzing correlations between data arrays (time series)
Comparing several time series during a technical analysis is a quite common task that requires appropriate tools. In this article, I suggest developing a tool for graphical analysis and detecting correlations between two or more time series.
![Continuous Walk-Forward Optimization (Part 3): Adapting a Robot to Auto Optimizer](https://c.mql5.com/2/49/Continuous-Walk-Forward-Optimization_003_600x314.jpg)
Continuous Walk-Forward Optimization (Part 3): Adapting a Robot to Auto Optimizer
The third part serves as a bridge between the previous two parts: it describes the mechanism of interaction with the DLL considered in the first article and the objects for report downloading, which were described in the second article. We will analyze the process of wrapper creation for a class which is imported from DLL and which forms an XML file with the trading history. We will also consider a method for interacting with this wrapper.
![Interview with Rogério Figurelli (ATC 2012)](https://c.mql5.com/2/0/Figurelli-60v13.png)
![Interview with Rogério Figurelli (ATC 2012)](https://c.mql5.com/i/articles/overlay.png)
Interview with Rogério Figurelli (ATC 2012)
Today we are going to talk with Rogério Figurelli (figurelli), a regular participant from Brazil that has not missed any Automated Trading Championship since 2007. This year, he also began to sell his Championship's Expert Advisor in the Market along with his other products. Rogério believes that MetaTrader 5 platform certification on the largest Brazilian exchange BM&FBOVESPA will reveal new professional developers and traders, who do not yet know the full potential of robot investors.