ML P Neural Network Class
Info
The ML P Neural Network Class is a Library for MetaTrader 5 that cnetmlp provides multilayer perceptron (mlp). The feature of the class is that input vector and network structure notions are separated, i.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Library works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Libraries folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use ML P Neural Network Class
1. Storage: Place library files in the MQL/Libraries directory to ensure they are accessible to your projects.
2. Implementation: Include the library in your code using the #import directive, ensuring you match the exact function names and parameters.
3. Compilation: Ensure the library is present in the directory before you compile your main EA or script, as the compiler links them during this phase.
4. Management: Keep libraries organized in sub-folders if you manage many custom functions to maintain a clean project structure.
Frequently Asked Questions
Q: What is a library file used for? A: Libraries store reusable code modules, allowing you to centralize common logic used by multiple EAs or indicators.
Q: Is a library executable? A: No, libraries are non-executable files containing functions; they must be imported into an EA, indicator, or script to function.
Q: Can I update a library while the platform is running? A: You should compile your EA or script after updating a library to ensure the latest code changes are integrated.
What this tool does
CNetMLP provides multilayer perceptron (MLP).
Typical Use Case
This Library excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Library works on MetaTrader 5. Place the file in the MQL5/Libraries folder and restart the terminal.
Description & Settings
Related: AS Q Neural Net Pure MQ L5 Neural Network Library - another powerful library for MetaTrader 5 traders.
CNetMLP provides multilayer perceptron (MLP).
Also recommended: RB F Neural Network Class - similar library with strong performance on MetaTrader 5.
The feature of the class is that input vector and network structure notions are separated, i.e. input vector and network structure descriptions are not connected to each other.The size of the input vector can have any value within reasonable limits. Input data should be normalized, i.e. the data should be within the range -1 .. 1 or 0 .. 1. Various activation functions are applied for the network depending on the type of the used data: hyperbolic tangent should be used for -1..1 data range, while sigmoid is used for 0..1 data range.
The network has a layer-by-layer structure with a direct signal transmission. The network structure is described by a one-dimensional array, where the value of the array element determines the number of neurons in the appropriate layer. The number of layers and neurons is not limited. The network may consist of a single neuron.
Each neuron has multiple inputs, defined by its place in the network, and one output. If you need the network to give out N responses, the last layer should contain N neurons. The learning algorithm is iRprop. Input and output training data are located in one-dimensional arrays vector by vector. The learning process is limited either by the number of learnnig epochs or by a permissible error.
Creation of the network is declared to be the class parametric constructor.
Network teaching is provided by calling the Learn method (the number of teaching patterns, input data array, output data array, the number of learning cycles, permissible learning error). Teaching result can be checked through the class variables: mse – the learning error and epoch – the number of accomplished learning cycles.
Calculate method (input vector array, network response array) is used for getting the network response.
Save (open the file handle with FILE_WRITE and FILE_BIN flags) and Load (open the file handle with FILE_READ and FILE_BIN flags) methods are intended for saving the network to a file and loading the network from the file respectively. Only learning errors and the weight array are saved to the file. Compliance of the created and the downloaded networks must be verified before the Load method (handle) is used.
Using of the class is shown in the attached specimen. The class and the specimen files must be placed in one folder.
You may also like: PN N Neural Network Class - excellent alternative for library users on MetaTrader 5.
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.