This is a discussion on Metatrader 5 / Metatrader 4 for MQL5 / MQL4 articles preview within the General Discussion forums, part of the Trading Forum category; Table of Contents Introduction Objectives Base Class Money Management Classes and Types Container for Money Management Objects Example Conclusion more......
Deep neural network with Stacked RBM. Self-training, self-control
In preparation of data for conducting experiments, we will use variables from theprevious articleabout evaluating and selecting predictors. We will form the initial sample, clean it and select the important variables.We will consider ways of dividing the initial sample into training, testing and validation samples.
Using the "darch" package we will build a model of the DBN network, and train it on our sets of data. After testing the model, we will obtain metrics that will enable us to evaluate quality of the model. We will consider many opportunities that the package offers to configure settings of a neural network.
Also, we will see how hidden Markov models can help us improve neural network predictions.
We will develop an Expert Advisor where a model will be trained periodically on the fly without interruption in trade, based on results of continuous monitoring. The DBN model from the "darch" package will be used in the Expert Advisor. We will also incorporate the Expert Advisor built using SAE DBN from the previous article.
Furthermore, we will indicate ways and methods of improving qualitative indicators of the model.
more...Whether we like it or not, statistics plays a significant role in trading. Starting with the fundamental news full of figures and ending with trade reports or test reports, we cannot do away without statistical indicators. At the same time, the thesis on applicability of statistics in making trade decisions remains one of the most controversial topics. Is the market random, are the quotes stationary, is the probabilistic approach to their analysis applicable? This can be argued indefinitely. It is easy to find materials and discussions with various points of view, strictly scientific calculations and impressive charts on the Internet, as well as on the mql5.com site. However, traders are usually interested in the application aspect — how it all works in practice, in the trading terminal. This article is an attempt to demonstrate a pragmatic approach to the probabilistic model of making trading decisions using a set of technical indicators. Minimum of theory, maximum of practice.
The idea is to assess the potential of various indicators from the perspective of the probability theory and to test the ability of the indicator committee to increase the trading system's win rate percentage.
more...When we perform a trade, our ultimate goal is to make profit or at least find out whether that is possible if only theoretically. Trading just for the love of it is practically impossible since that would require significant and constant expenses. Almost no one is able to learn all the ins and outs of trading and start obtaining a stable result at an acceptable time interval. To get the desired result, traders need a combination of four main factors, namely Knowledge, Money, Industriousness and Favorable environment. All these factors are necessary for success.
In this article we will continue exploring deep neural networks (DNN) which I started in the previous articles (1, 2, 3).DNN are widely used and intensely developed in many areas. The most common examples of everyday use of neural networks are speech and image recognition and automatic translation from one language into another. DNN are also used in trading. Given the fast development of algorithmic trading, in-depth studying of DNN seems to be useful.
more...
more...Algorithmic trading consists not only of planning and development of trading robots but also (to a greater extent) testing and verifying the survivability of ideas and algorithms implemented in them. MetaTrader 5 provides the built-in tester for optimizing Expert Advisors on historical data.
This tool is often indispensable in everyday activity. However, its main issue is the search for parameters that remain steadily profitable over time beyond the period the optimization was performed on. One of the possible solutions is forward testing. The tester features the appropriate built-in mode. But is it enough to optimize the EA once and successfully check it on a subsequent period to ensure its reliability?
The EA's operation cycle implies that the optimization and trade stages are repeated from time to time with the chosen frequency, and traders expect positive (or at least loss-free) results over a long period of time. To ensure the system's efficiency, it is necessary to repeat the cycle stages many times in the tester launching optimization and forward testing with a constant shift of the current period from the past to the virtual future.
This is called the walk forward optimization and widely used by many traders. Unfortunately, the built-in MetaTrader tester does not allow launching it at the touch of a button. Instead, we have to automate the tester launch using external tools and stick forward test reports together. Therefore, there is a need to execute a walk forward analysis in a simpler way solely by means of MetaTrader and MQL with no routine operations.
As it tuns out, we are able to develop an MQL library that can be easily connected to any EA if necessary. You will need some programming skills since we are going to adapt the EA source code.
Table of Contents
- Introduction
- The differences between the Pennant and the Triangle
- Horizontal Pattern
- Contracting Triangle
- Expanding Triangle
- A universal indicator to search for the Horizontal Pattern and Triangles
- A universal indicator to search for the Flag, the Pennant and the Wedge
- Tester Indicator
- Conclusion
- Attachments
more...
Bookmarks