Getting started with Neural Network EA

 

Hi,

I have programmed a neural net backpropagation EA and just would like to share what I have learned and get some feedback hopefully from others.

I've found that it works quite well on EURUSD and GBPUSD on higher timeframes but on other pairs it's not so good.

The accuracy of the training is quite high on each target value ( I try to predict whether the highest high over the next 10 or so candles is greater in magnitude than the lowest low ).

I find that the performance is not improved so much by training on more than a year or so of data.

Also, the few indicators that I have tried that I thought might improve performance such as RSI,CCI and MACD actually make things worse.

I don't find any improvement also using 2 hidden layers over 1 ( although I have to check my code in case something is not right with it )

Bollinger bands and using prices from higher timeframes helps a little.

I'm just wondering if anyone has had success by using data from any other indicators? And also on shorter timeframes?

Thankyou for your replies and the great articles that people have written and shared on here.
 
indigo79:

Hi,

I have programmed a neural net backpropagation EA and just would like to share what I have learned and get some feedback hopefully from others.

I've found that it works quite well on EURUSD and GBPUSD on higher timeframes but on other pairs it's not so good.

The accuracy of the training is quite high on each target value ( I try to predict whether the highest high over the next 10 or so candles is greater in magnitude than the lowest low ).

I find that the performance is not improved so much by training on more than a year or so of data.

Also, the few indicators that I have tried that I thought might improve performance such as RSI,CCI and MACD actually make things worse.

I don't find any improvement also using 2 hidden layers over 1 ( although I have to check my code in case something is not right with it )

Bollinger bands and using prices from higher timeframes helps a little.

I'm just wondering if anyone has had success by using data from any other indicators? And also on shorter timeframes?

Thankyou for your replies and the great articles that people have written and shared on here.

I'm working on a similar project actually. I need to use the network to optimize my profitable strategy. 

Could you please share how you are carrying out that backprop? I seem to be missing something there.

 
Nelson Wanyama:

I'm working on a similar project actually. I need to use the network to optimize my profitable strategy. 

Could you please share how you are carrying out that backprop? I seem to be missing something there.

Never mind. I got it

 

Hi Nelson,

I am using a backpropagation that I have learned from various sites on the net and also from books such as "An Introduction to Neural Networks" by Kevin Gurney.

I am using TANH as the activation function and also I don't use a bias for each layer. I have difficulty with 2 layers but I think it's my code.

For inputs I use the price over the last x number of bars and output is the highest or lowest over the next number of y bars. It's as simple as I could think of but I would like to add indicator data or data from higher timeframes. I think indicators will not help much as it's basically the same data from the prices.

My EA runs on the training data I choose from the last x number of years ( I find that greater than 1 year does not help performance ) and then I uses results straight away to see how much profit is made over  the backtest period. I don't train the network offline or in separate program. I use MQL5 for all of it.

I think it's possible to make profit with this but I'm not sure if it's good idea if it only works on a handful of pairs.

I suspect it's because those pairs have recurring internal patterns whereas the other minor pairs are more dependent on these major pairs and don't have their own internal, fixed patterns but their price movements depend more on outside influence.

My main 2 questions are if anyone has profitable Neural Network EA that works on other pairs than EURUSD, GBPUSD, EURGBP and USDCHF ( basically minor pairs ).

And also if it's possible on shorter timeframes.

Hope that helps!

 
indigo79:

Hi Nelson,

I am using a backpropagation that I have learned from various sites on the net and also from books such as "An Introduction to Neural Networks" by Kevin Gurney.

I am using TANH as the activation function and also I don't use a bias for each layer. I have difficulty with 2 layers but I think it's my code.

For inputs I use the price over the last x number of bars and output is the highest or lowest over the next number of y bars. It's as simple as I could think of but I would like to add indicator data or data from higher timeframes. I think indicators will not help much as it's basically the same data from the prices.

My EA runs on the training data I choose from the last x number of years ( I find that greater than 1 year does not help performance ) and then I uses results straight away to see how much profit is made over  the backtest period. I don't train the network offline or in separate program. I use MQL5 for all of it.

I think it's possible to make profit with this but I'm not sure if it's good idea if it only works on a handful of pairs.

I suspect it's because those pairs have recurring internal patterns whereas the other minor pairs are more dependent on these major pairs and don't have their own internal, fixed patterns but their price movements depend more on outside influence.

My main 2 questions are if anyone has profitable Neural Network EA that works on other pairs than EURUSD, GBPUSD, EURGBP and USDCHF ( basically minor pairs ).

And also if it's possible on shorter timeframes.

Hope that helps!

You're my copy. I have been working on a similar project. Please join me on the project https://www.mql5.com/en/forum/338341

Reason: