| / | Articles |
Articles
Examples
FANN2MQL Neural Network Tutorial
To post a new article, please log in or register
|
FANN2MQL Neural Network Tutorial [ ru ]First of all:
|
![]() Fallacies, Part 2. Statistics Is a Pseudo-Science, or a Chronicle of Nosediving Bread And Butter
Numerous attempts to apply statistical methods to the objective reality, i.e. to financial series, crash when met with the nonstationarity of processes, "fat tails" of accompanying probability distributions, and insufficient volume of financial data. In this publication I will try to refer not to the financial series as such, but to their subjective presentation - in this case, to the way a trader tries to halter the series, i.e. to the trading system. The eduction of statistical regularities of the trading results process is a rather enthralling task. In some cases quite true conclusions about the model of this process can be made, and these can be applied to the trading system. |
![]() Fractal Analysis of Joint Currency Movements
How independent are currency quotes? Are their movements coordinated or does the movement of one currency suggest nothing of the movement of another? The article describes an effort to tackle this issue using nonlinear dynamics and fractal geometry methods. |
| Previous | Next |
Hallo,
is it possible to get 2 and 3 as output for 0 and 1?
When I train it, everything seems to be OK.
But when I compute it, the output every time returns 1.
EURUSD,M15: Computing() ==> 1.00000000
EURUSD,M15: Computing() ==> 1.00000000 2011.12.08 08:34:41 ASNN 1 learner(1) EURUSD,M15: 45,2,89 = DOWN UP = UP. Should output 2. ==>
EURUSD,M15: Computing() ==> 1.00000000
EURUSD,M15: Computing() ==> 1.00000000 2011.12.08 08:34:41 ASNN 1 learner(1) EURUSD,M15: 3,2,1 = DOWN DOWN = DOWN. Should output 3. ==>
hey, i've got a problem, when i change the number of output, it doesn't work.
Even if i change the structure of the preparData function, the output number still 1
Can someone help me please ?
hallo julien .
about the example :
how do you select the hidden layers = 8 and hidden layers2 = 5 ?
it is because of 2 power 3 ? this is all the data space ?
second question : do you have to write the comute() and teach() ?
do we have a standart library with template in order to use it without writing the algoritm ?
or we can choise in the library to add or inprove a template function in order to teach the system better ?
http://pixiefx.web.fc2.com/index.html
http://www.ustream.tv/channel/fx-on-com-perrier
This is a great trading system.
It's very good, thanks Julien. Btw for currency prediciton using neural network, do you have any experience what usually used as inputs and target?
Ya Julien, I haven't seen any NN implemented successfully yet.
Best Forex Robot
Forex Robot
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
This source is not meant to be used.
A neural network is only working if it has been trained. Usually, you train the network, you save the network ( f2M_save() ), then when you want to use the network with a real application, you load the network ( f2M_load() ) and send him the input data.
This example is training and using the network at once, without saving nor loading it. Also, the basic patterns I defined here are random, not related to any financial pattern.
As a result, you won't be able to use this source to predict any financial data.
If you want to use a ANN to recognize patterns you need:
1) define the patterns
2) teach the patterns
3) save the neural network
4) load the pattern on another indicator
5) send input data
6) get your prediction
What do you want to forecast? What kind of pattern?
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