Neural network in the form of a script - page 13

 
FION писал (а) >>

There is a specific task of writing a script which, at a given depth of history, will produce a solution -

Then it is necessary to determine the specific minimum network configuration and the minimum required number of inputs. It means that it is necessary to define the terms of reference and then the whole world should come to the realization to have a concrete product ready to be attached to a chart and see the result. I have seen something similar in the form of a neuroindicator on the Klot site .

http://www.fxreal.ru/forums/topic.php?forum=2&topic=1

IMHO it won't work, the network in the script should be at least trained.

It would be easier to write a neural network based EA template with learning from history and learning as you go along, or even learning from scratch as you go along.

 
TheXpert писал (а) >>

IMHO it won't work, the network in the script should be at least trained.

It is easier to write an EA template on neural networks with learning on the history and additional training along the way, or even training from scratch along the way.

This is how this indicator is trained - if you enable the optimization mode. The script differs in that it runs the optimization algorithm once on a specified interval of history and displays the result - for example, using arrows on the chart.

 
FION писал (а) >>

This is how this indicator is trained - if you enable the optimisation mode. The script differs only in that it runs the optimization algorithm once on a specified interval of history and displays the result - for example by arrows on the chart.

Well, if everything is ready, why do you need to do it one more time? Or do you want a fully working Grail?)

 

Suggestions for code YZ_BETTER_HC_2_2.mq4.

1. Give a command to train the pattern (put the appropriate arrows on the chart).

2. After training, there will be a STILL message:

2008.07.02 21:20:37 YZ_BETTER_HC_2_2 EURUSD,M1: opt=2 2008.07.08 10:19 bar=526 PatTeachYES=2 i=1

3. When you get tired of looking at it, insert the following code (change the type and colour of the arrows), for reference, the first line as in the original:


Print(" opt="+lMAX_PAT+" "+TimeToStr(PathDT[i],TIME_DATE|TIME_MINUTES) +" bar="+PatiBAR[i]+" PatTeachYES="+PatTeachYES[i] +" i="+i);

//изменим стрелки
int obj_total=ObjectsTotal();
for(int $a=obj_total-1;$a>=0;$a--){

string name=ObjectName($a);
if(ObjectType(name)!=OBJ_ARROW)
continue;
int arrow_code=ObjectGet(name,OBJPROP_ARROWCODE);
if(arrow_code==241) {
ObjectSet(name,OBJPROP_ARROWCODE,233);
ObjectSet(name,OBJPROP_COLOR,Aqua);
}
if(arrow_code==242) {
ObjectSet(name,OBJPROP_ARROWCODE,234);
ObjectSet(name,OBJPROP_COLOR,Red);
}
if(arrow_code==240) {
ObjectSet(name,OBJPROP_ARROWCODE,232);
ObjectSet(name,OBJPROP_COLOR,Yellow);
}

}

 

There was a code YZ_BETTER_2_3_1_1.mq4


tweaked ( I do not remember the nickname )

disappeared somewhere!



I tried that!


Alas, never got a trained network!


int start() 
{
 
 
    ZeroWeight(); // обнулили корректировки весов
    RandomWeight(); // Задали начальные веса
    SetTeachPattern();// Задали обучающие шаблоны
    bool bbb;
 
   while ( bbb == false )
   {
      bbb = TrainNetwork(); // Обучили сеть на шаблоне
 
   if ( bbb == true )
      Print( " OK ");
   if ( bbb == false )
      Print( " BAD ");
   }
 
    return(0);
}
Files:
 

Try changing the speed and momentum

void ChangeWeight() // Корректировка весов
{
    double Speed=0.5;// Скорость обучения
    double Impuls=0.5;// Импульс
...

and run not for all NUM_PUT


bool TrainNetwork() 
{
    int pat, loop, i, n=1; //n=NUM_PAT;
    bool bError;

I just ran it for a single sample and it all came together fine.

P.S. I think it's you who should teach me :) how to do it right.

 
sergeev писал (а) >>

Try changing the speed and momentum


and run not for all NUM_PUT


I just ran it for a single sample and it all came together fine.

P.S. I think it's you who should teach me :) how to do it right.

I have a lot of doubts about the possibility of using neural networks in trading.

Maybe I'm wrong, but neural networks were originally created to recognise static objects,

e.g. handwriting, where the same letter (character) was rendered in different handwriting by different people

and the system (network) had to learn to recognise any of these handwritings.

It recognises them undoubtedly through the accumulation of information.

In trading (Forex) the problem is much more difficult.

If an Expert Advisor is considered a trading strategy, then the neural network must provide tactics to support that strategy.

No matter how much we practice ratios like StopLoss and TP on history, it gives absolutely no

guarantee that the situation will not fail in the next period of time.

Summary.

It is necessary to teach the Expert Advisor to make decisions at any future moment depending on the situation.

In other words, the Expert Advisor must be constantly trained to act as you would in a given situation.

So far, again, I may be wrong, the task is unsolvable.

There are too many unformalised questions.

 
edwkhan писал (а) >>

I have many doubts about the possibility of using neural networks in trading.

I may be wrong, but neural networks were originally created to recognise static objects,

e.g. handwriting, where the same letter (character) was rendered in different handwriting by different people

and the system (network) had to learn to recognise any of these scripts.


The neural network was originally designed to simulate brain activity and create AI.

Recognition is an application, as is the stock exchange.

It recognises them undeniably through the accumulation of information.


Savings? And where does the network store these savings? Not at the expense of accumulation, but generalisation.

In trading (forex) the task is much more difficult.

If an Expert Advisor is considered a trading strategy, then the neural network must provide tactics to support that strategy.

No matter how much we practice ratios like StopLoss and TP on history, it gives absolutely no

guarantee that the situation will not fail in the next period of time.

Summary.

It is necessary to teach the Expert Advisor to make decisions at any future moment depending on the situation.

In other words, the Expert Advisor must be constantly trained to act as you would in a given situation.

Well, that's hard to disagree with :) .

So far, again, I may be wrong, the task is unsolvable.

There are too many unformalised questions.

Well, what are we doing here? Trying to solve and formalize. Maybe something will work out... After all, there is a precedent :) .

 
TheXpert писал (а) >>

A neural network was originally designed to simulate brain activity and create AI.

Recognition is an application, just like the stock exchange.

Savings? And where does the network store these savings? Not through accumulation, but generalization.

Well, it's hard to disagree with that :) .

Well, what are we doing here? Trying to solve and formalize. Maybe something will work out... After all, there is a precedent :) .

I guess I haven't found a precedent yet :).

 
edwkhan писал (а) >>

I guess I haven't stumbled across the precedent yet:).

strange...