Hey fellow traders! Today, I want to introduce you to a neat little tool called the BPNN MQL Predictor. Now, I should mention right off the bat that this isn’t a full-fledged indicator but rather a demo showcasing the BPNN library, which started out in C++ and has been adapted for MQL.
The demo is all about training and testing a neural network aimed at predicting time series data. If you're keen to dive deeper into the nitty-gritty of the neural network itself, check out the comprehensive details available on the BPNN Predictor indicator page, which utilizes a DLL library.
What’s cool about this implementation is that you can build both the library and the indicator directly in MQL5, making it super convenient. You can either compile the source code into a standalone EX5 library, which you’ll then import into your MQL5 program, or you can directly include the source code into your MQL5 program, which means you won’t need an external library since it’ll be embedded right in there. The demo indicator supports both methods!
Here are the files you’ll be working with:
- BPNN_MQL_IMPL.mqh: This is the source code housing the BPNN neural network (found in MQL5/Include). You’ll need to include this in your MQL program if you want the library embedded directly.
- BPNN_MQL.mqh: This is the header file for the standalone library (also in MQL5/Include). Make sure to include this if you’re connecting with the external (standalone) BPNN_MQL.ex5 file located in MQL5/Libraries.
- BPNN_MQL.mq5: The main module of the library (located in MQL5/Libraries). Compile this if you want to use the standalone library BPNN_MQL.ex5.
- BPNNMQLPredictorDemo.mq5: This is your demo indicator (found in MQL5/Indicator). You can compile it with the embedded library by including <BPNN_MQL_IMPL.mqh> or with the standalone library using <BPNN_MQL.mqh>.
- BPNNMQLi45.mqh: A header file that includes helper methods for MT4-style indicators.
Just a quick tip before you dive in: make sure to include only one of the following files—either BPNN_MQL_IMPL.mqh or BPNN_MQL.mqh. Including both will cause issues. If you go with BPNN_MQL.mqh, ensure that the BPNN_MQL.mq5 library is compiled before you proceed.

Related Posts
- Predicting Future Prices with Neural Networks: Your Guide to BPNN
- Unlocking the Power of the Pinbar Detector for MT4 and MT5 Traders
- Unlocking MetaCOT 2: Your Ultimate CFTC Indicator Toolkit for MT4
- Unlocking the Power of Master Tools for MetaTrader 4
- Mastering Pinbars: The Essential Pinbar Detector for MT5 Traders