A quick and free library for MT4, much to the delight of neuralnetworkers - page 32

 
marker:

I agree that this is inadequate, I agree that the specific weights in the run should be the same as in the optimization, otherwise the second pass is "from scratch" - as far as I understand. In the real world to "finish" will not work, hence, need to rogue on the warrant with the same unit weights, you just need to learn to save them, I'm in the branch somewhere saw it - it is possible.
Yes, just comment out this block.
 
VladislavVG:
Not always: due to the limited possibilities of history analysis, it is possible to take profit, for example, during the end of a trend and then, when moving to the consolidation zone or trend reversal, you will lose a lot of money.

Yes, but we can make a profit during a trend and a flat period and then we will get something in between.
 
VladislavVG:
Yes just comment out this block.

I don't know how:)))
 

And it is also possible to do it in a different way, to teach it with runs, I did so, the straight line turns out without slippage and save this data (with these weights or something) and let him trade with these weights and do it every week....imho of course, but it seems better, this way we find the "ideal" version of weights, I understood it like this....... but how to save these weights after manual training..... also seems possible, I read.

 
marker:

Yes, but it is possible to make up for a period of trend and flat and then we get something in between.
Often not... the consolidation zone before a reversal and before a trend continuation are different zones. How do you distinguish them?
 
marker:

I can't:)))
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start () {

    if (prevtime == Time[0]) {
      return(0);
    }
    prevtime = Time[0];
    
    int i = 0;

    double train_output[1];
    


    /* Is trade allowed? */
    if (!trade_allowed ()) {
             return (-1);
    }


   int total = OrdersTotal();
   for (i = 0; i < total; i++) {
      OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         return(0);      
      }
   }
/* Здесь 
   // Adaptive part
   if (IsOptimization() || IsTesting()) {
      total = OrdersHistoryTotal();
      if (total > 0) {
         OrderSelect(total - 1, SELECT_BY_POS, MODE_HISTORY);   
         if (OrderProfit() < 0) {
            if (OrderType() == OP_SELL) {
               train_output[0] = 1; 
            } else {
               train_output[0] = -1; 
            }
            // Learning
            for (i = 0; i < AnnsNumber; i++) {
                       ann_train (AnnsArray[i], InputVector, train_output);
                      }
         
        }
      }
   }
*/// и здесь
   /* Prepare and run neural networks */
   ann_prepare_input ();
   // Get Outputs
   run_anns ();
   // Get Results
   double res = ann_pnn();
   
   // Trade
   
   int ticket = 0;
   
   if (res >   porog ) {
      RefreshRates();
      ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, 2, Ask -  StopLoss * nPoint, Ask + TakeProfit * nPoint, WindowExpertName(), 0, 0, Blue);
   } 
   if (res < (-porog)) {
      RefreshRates();
      ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, 2, Bid +  StopLoss * nPoint, Bid - TakeProfit * nPoint, WindowExpertName(), 0, 0, Red);
   }
   if (ticket >= 0) {
      ann_prepare_input ();
   }
   return (0);
}
 
marker:

And it is also possible to do it in a different way, to teach it with runs, I did so, the straight line turns out without slippage and save this data (with these weights or something) and let him trade with these weights and do it every week....imho of course, but it seems better, this way we find the "ideal" version of weights, I understood it like this....... but how to save these weights after manual training..... also seems possible, I read.

You have to try. That's why I say - not everything is so simple there..... and there's nowhere without forwarders......
 
VladislavVG:
Often not... the consolidation zone before a reversal and before a trend continuation are different zones. How do you distinguish them?

We take (say, at one hour) a zone where there was an obvious trend (price went straight up or down) (50% of the optimized zone) and take a flat zone (not this way or that way) (also 50% of the optimized zone) and use this period as an optimum, thus obtaining the optimum parameters for the flat and for the trend.
 
VladislavVG:
You have to try it. That's why I say it's not that simple..... and you can't go anywhere without forwards......

In my opinion, this is the ideal option. Otherwise I do not understand how the grid makes a decision, we will use these parameters in bidding, but the parameters are not "fixed", i.e. specific weights will be "from scratch", only TP and SL will be fixed, and the grid will filter "as it wants", i.e. with other specific weights.....
 

Conclusion: (just like in chemistry class: )))))) We take it, we optimize it, then we hand-prepare it to "straight" (i.e. we save the possibility of additional training), when we do learn it to "straight", we save everything and the specific weights too, and only with these specific weights we start bidding. We can also do the following: Everything as you said, but to be able to drill not to "today", but to "a month ago", then run with these fixed unit weights on this last month and if we are satisfied with the result, we will put it to trade.