Hi Emsi
This article is fantastic it encompasses two topics I have been getting ready to tackle on MQ4 namely the interfacing of external software and Neural Networks. Now I can do both at the same time it is a very interesting article. Thanks a lot.
Hi Emsi,
This is a brillant work.Can you give an example to a newbie like me how can I apply Fann tool to my indicators, lets say 8-21 EMA cross?Thanks in advance.
Hi Emsi,
just to add to other commentators: Thank you for taking the time to explain this so clearly. I have not yet tried this myself but will do so in due course. I just wondered what would be a potential set up for a profitable NN? Do you have any suggestions?
Hi Emsi
Thank you very much. It is an excellent job and great contribution.
I have two questions for your MACD sample.
1. The traning inputs are 3 period shifts (3*i) and the signal only one shift. Is there any particular purpose for this?
2. ann_wise_long() and ann_wise_short() functions are same? How FANN identifies the buy or sell signal?
I also think that the better design for general use of the valuble tool. it should be encapsulated most FANN funcations into a library, and only exposes a few necessary functions to end-user, such as fann2_setup, fann2_init, fann2_deinit. I will create a version for you if you don't mind.
Many thanks
1. The traning inputs are 3 period shifts (3*i) and the signal only one shift. Is there any particular purpose for this?
No, there is no particular purpose. It's just an example.
2. ann_wise_long() and ann_wise_short() functions are same? How FANN identifies the buy or sell signal?
Those functions are not the same. ann_wise_long() starts the loop from i=0 while ann_wise_short() starts with i=1.
I also think that the better design for general use of the valuble tool. it should be encapsulated most FANN funcations into a library, and only exposes a few necessary functions to end-user, such as fann2_setup, fann2_init, fann2_deinit. I will create a version for you if you don't mind.
Great job! ;)
Thank you to share it for free!
It's a good starting point to build every kind of neuro filter, with every indicator (1 || +>1) ... ! ;)
I have a question about the Delta parameter, because I started to modifiy the basis indicator from Macd to Jmacd (rev. Jurik).
I encountred some difficult about the right input values for FastMA, SlowMA & SignalMA, but this is only a question of optimization and it is not related to the code you wrote.
But the question is: Delta matters if SaveAnn is true? Or it matters only when SaveAnn is off and NeuroFilter is true?
If I'm not wrong I understand that the NF must be T only if SA is F and viceversa.
In other words: what is the influence of Delta on the function SaveAnn?
Thank you in advance! :)
Federico.
(...)
But the question is: Delta matters if SaveAnn is true? Or it matters only when SaveAnn is off and NeuroFilter is true?
If I'm not wrong I understand that the NF must be T only if SA is F and viceversa.
In other words: what is the influence of Delta on the function SaveAnn?
The Delta is used to tune the level of neural filter so it is meaningful only if neural filtering is turned on. You can read that out of the code:
if(!NeuroFilter || ann_wise_short()>Delta)
If NeuroFilter is false the expression evaluets to true no matter what is the value of the second part.
SaveAnn on the other hand is used to avoid effect of data snooping. We do not want to train and test on the very same data.
Hi Emsi,
How will the new MQL5 affect the Fann to MQL and its functions and wrapping since (I believe) MQL5 will support class structures?
I will try to send you a comment on this.
Thanks

- 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 Using Neural Networks In MetaTrader has been published:
Author: Mariusz Woloszyn