![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have been trying to understand this EA for a while and I have no knowledge of Neural Networks or FANN.
But after a week of reading up I finally got the basic concepts. The way I understand it is you are using a sliding window concept(whats called feed forward network?) to input the NN with 10 previous bars(AnnInputs) with three values for each bar and have divided the network into two parts. One dataset for Long trades and one dataset for short trades. And you are using 8 networks for each of them (AnnsNumber).But initially I always had the "arrayresize" error while loading the initial inputs. In the following example from your Neuro MACD Fixed version, the first iteration will result in negative array indexes isnt't it? Say when i =0.
After this modification, I was able to run the EA with no issues. However I am not able to see the saved ANN files (long or short) :( The debug messages do say that they loaded the ANN files with handler x and saved the ann files with a return value of 0. Any ideas why I can't seem to see the files? I have set the AnnSave to true.
Similarly I was wondering if you could also feed the volume of the bar as another input to see if it influences the outcome in anyway.
I have been playing around with FANN tool to see if I can load some historical data and after creating the ANN just load it in this EA and see how that pans out. I want to play with FANN tool so I can try different algorithms and their results etc.... Plus the more data you feed the NN the better approximation/decision it can arrive at right?
I am guessing that you must have used that to arrive at your delta (0.4) values. I understand that this is a very rudimentary EA for demonstration purposes only, but I would like to make it work exactly as documented so I can tinker with it and learn more about it before I start using FANN in my other EA's. I am also a week into learning MQL4 so pardon my ignorance.
But I would appreciate any help on why I can't see the .net files. I have tried commenting out the ann_destroy() etc...
here you go ravi ;)
tested and works...
why save function return -1,what problem can be?
in function ann_prepare_input() is big error!
InputVector[i] = 10 * iMACD (NULL, 0, FastMA, SlowMA, SignalMA, PRICE_CLOSE,MODE_MAIN, i * 3);
InputVector[i + 1] = 10 * iMACD (NULL, 0, FastMA, SlowMA, SignalMA, PRICE_CLOSE,MODE_SIGNAL, i * 3);
should be:
InputVector[i] = 10 * iMACD (NULL, 0, FastMA, SlowMA, SignalMA, PRICE_CLOSE,MODE_MAIN, i / 3);
InputVector[i + 1] = 10 * iMACD (NULL, 0, FastMA, SlowMA, SignalMA, PRICE_CLOSE,MODE_SIGNAL, i / 3);
as iMACD shift should be 0,1,2,..... and not 0,9,18....
echo the inputs as above. following doesn't make sense:
I Like Fann2MQL, but I find it very restrictive 2 Hidden layers.
It would be acceptable to extend the DLL and create 3, 4 or 5 hidden layers.
I'm creating an Expert Advisor with self-learning.
80 inputs in layer 1.
82 neurons layer 1 hidden
82 neurons layer 2 hidden
3 outputs.
It works correctly, although a bit slow in debug. The only optimization parameter is Stop Loss and MSE.
I Like Fann2MQL, but I find it very restrictive 2 Hidden layers.
It would be acceptable to extend the DLL and create 3, 4 or 5 hidden layers.
I'm creating an Expert Advisor with self-learning.
80 inputs in layer 1.
82 neurons layer 1 hidden
82 neurons layer 2 hidden
3 outputs.
It works correctly, although a bit slow in debug. The only optimization parameter is Stop Loss and MSE.
According to some researchers (for example, read here) 2 hidden layers are sufficient for classical MLP in almost all tasks. Increasing number of layers will only slow down performance without result improvement.