Home Technical Indicator Post

Easily Create Custom Neural Network Predictors for MetaTrader 4

Attachments
9308.zip (53.08 KB, Download 0 times)

Author: gpwr, posted on MQL5

If you’re looking to dive into the world of neural network predictors, you’re in the right place! The BNN predictor shared by gpwr is a robust tool, but many traders have been curious about how to tweak the source code to create their own predictors based on different indicators. Well, I’ve got you covered!

This modified version of the BNN Predictor allows you to customize it according to your preferred indicators. At the end of the code, you’ll find a function that looks like this:

double getValue(int i) {
return(iMA(NULL,0,15,0,MODE_SMMA,PRICE_OPEN,i));
}

As you can see, this function is set up to predict using a Moving Average. But don’t worry if that’s not your go-to indicator! You can replace the Moving Average with any other indicator you prefer, including your own custom indicators using iCustom().

For instance, if you want to create an RSI predictor, you’d simply change the function to:

double getValue(int i) {
return(iRSI(NULL,0,14,PRICE_OPEN,i));
}

Installation Steps:

  • Copy BPNN.DLL to your experts/libraries/ folder.
  • Make sure to configure MetaTrader 4 to allow DLL imports by going to Tools > Options > Expert Advisors and checking the box for Allow DLL imports.


MA Predictor and RSI predictor on EURUSD M30

Recommendations:

  • If you have questions specifically about the neural network, please reach out to the original author, gpwr, as I've only modified the code for easier customization.
  • If you need assistance adapting an indicator, feel free to ask me! Just remember to stick to English, French, Spanish, or Portuguese for our conversation.
  • The examples provided, MA and RSI, are just starting points. They do not include external variables for changing periods or other settings, but you can expand on them as needed.

Related Posts

Comments (0)