WOW. look so complex, i can make the same operation using matlab conect to metatrader in 10 lines...
I Installed Fann2MQL in ( Meta Trader\experts\ ),and put [ASNN 1 learner.mq4] in ( Meta Trader\experts\ ), but does not work, why??
Thanks a million for your kindness !!I am a very beginner in the programming field. I attached photo,you will see error .
I Installed Fann2MQL in ( Meta Trader\experts\ ),and put [ASNN 1 learner.mq4] in ( Meta Trader\experts\ ), but does not work, why??
Greetings.
I installed the FANN2.MQL package into the MT4 experts directory as per installation instructions given on the site.
I then installed ASNN 1 learner.mql and ran it on back testing.
It gave a similar display as did yours in the journal. My question is this.
What are we supposed to use the EA in this case for? In other words a journal printing of data it learned through Neural Networking is usable in what way?
Lets check it.
I have compiled ASNN 1 learner.mq4 and attached this custom indicator to EURUSD.
It's designed as custom indicator, but it doesn't plot any graphs. Look at its output at Experts tab.
My settings:
C:\WINDOWS\system32\Fann2MQL.dll
C:\Program Files\MetaTrader 4\experts\include\Fann2MQL.mqh
C:\Program Files\MetaTrader 4\experts\indicators\ASNN 1 learner.mq4
Lets check it.
I have compiled ASNN 1 learner.mq4 and attached this custom indicator to EURUSD.
It's designed as custom indicator, but it doesn't plot any graphs. Look at its output at Experts tab.
My settings:
C:\WINDOWS\system32\Fann2MQL.dll
C:\Program Files\MetaTrader 4\experts\include\Fann2MQL.mqh
C:\Program Files\MetaTrader 4\experts\indicators\ASNN 1 learner.mq4
It's not supposed to draw any graph, it's just an example of use of the FANN library.
The output you got means it worked.
It's not supposed to draw any graph, it's just an example of use of the FANN library.
The output you got means it worked.
Yes, I see, I just wanted to show readers how to see the results.
Julien, you've done a serious work. I tried to use this indicator and I stumbled over several problems. I'll be much obliged to you if make some clarifications.
After successfully installing Fann2MQL Library, I ran the indicator and it resulted in the same output as yours, from where we can deduct that for UP signal it should signal "1" and for DOWN it should signal "0". When I tried to read the Indicator Buffer through iCustom() function called from an EA it didn't read any of these choices. That was the first problem.
In my second attempt to get a feedback from the indicator or the library, I tried to call the function compute(inputVector) and receive back the result of a prediction via Global Variable like that:
void prepareData(string action, double a, double b, double c, double output) {
double inputVector[];
double outputVector[];
// we resize the arrays to the right size
ArrayResize(inputVector,f2M_get_num_input(ann));
ArrayResize(outputVector,f2M_get_num_output(ann));
inputVector[0] = a;
inputVector[1] = b;
inputVector[2] = c;
outputVector[0] = output;
if (action == "train") {
addTrainingData(inputVector,outputVector) }
if (action == "compute") {
GlobalVariableSet("Prediction",compute(inputVector));}
After that I received the result of the prediction by reading the same variable through an EA, but the result was invariably "0". So my question is how can I get a prediction result from the indicator if not from the IndicatorBuffer? Any idea will be blessed.
Thank you in advance for your attention.
Albert
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article FANN2MQL Neural Network Tutorial has been published:
Author: Julien