Machine learning in trading: theory, models, practice and algo-trading - page 985

 

Throw away your refinement with stops of 50 unreal pips

It's your first day behind the tester.

Developers are machinelayers for fuck's sake!

 
SanSanych Fomenko:

Just sick of their demands to post the result!

What did you show? Some curves of unknown origin with a fig in his pocket in the form of a period of training at the end of the chart? Not even a tester!

And here is the result, 360% in 14 months, with a decent balance chart, with a bunch of characteristics, with the original text.


And to MO has a direct result.

This is the finalized Expert Advisor from here

The input is a uniformly distributed random variable from which we get buy/sell. You see - random.

But in all exercises on this branch the error is less than 50%, and the ratio of profitable to unprofitable in the base case is 47/53.

Then why do you need the MO? And why do you need the MO in your version? After all, you don't provide any evidence that the model is not retrained! And if NOT to deal with the problem of retraining, here is a free Expert Advisor fromPetr Voytenko.

Looks like a great advisor (!!!!)

broken link

 
SanSanych Fomenko:

This is a revised Expert Advisor from here

The input is a uniformly distributed random variable from which we get buy/sell. You know, random.

I was going through it, too, back in '10. I wrote about it somewhere. I worked out optimal support-closing deals, and made my entries random, so as not to bother. The idea was to minimize losses by supporting-closing. My surprise, I have got the profit of 10-15% per month.

 
Renat Akhtyamov:

Looks like a cool advisor was (!!!!)

broken link

Why is it broken? It works for me.

Here is the text

//+------------------------------------------------------------------+
//|                                                     RandomEA.mq4 |
//|                                                             Pete |
//|                                                  www.izimoney.ru |
//+------------------------------------------------------------------+
#property copyright "Pete"
#property link      "https://www.mql5.com/ru/users/m0rg4n"
#property version   "1.00"
#property strict
//--- input parameters

input double   lot_persent=0;   //lot in percent of balance, 0=minimal lot
input double   clot=0;          //constant lot, 0=off
input int      com=5;           //your commission on 1 lot
input int      tp_and_sl=100;   //takeprofit and stoploss
input double   k=2;             //martingale multiplier
input int      maxspread=25;    //maximal spread
input int      friday_stop=12;  //friday OFF hour
input int      monday_start=1;  //monday ON hour
input int      slip=10;         //slippage


double minlot,maxlot,lot,acc=0,lot2;
bool b;
int h;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   Comment("");
   MathSrand(GetTickCount());   //turn on randomize function
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
 Comment("");
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---

   minlot=MarketInfo(Symbol(),MODE_MINLOT);                        //
   maxlot=MarketInfo(Symbol(),MODE_MAXLOT);                        //
   lot=NormalizeDouble(lot_persent*AccountBalance()/100000,2);     // calculating lots
   if(lot<minlot){lot=minlot;}                                     //
   if(lot>maxlot){lot=maxlot;}                                     //
   lot=NormalizeDouble(lot,2);                                     //

   if (clot!=0){lot=clot;}
   
   
   
   //if there are no orders open trade according signal
   if(OrdersTotal()==0)
     {
     
      if (MarketInfo(Symbol(),MODE_SPREAD)>maxspread){Comment("Spread too big");return;}
     
     
      if (
          ((DayOfWeek()==5)&&(Hour()>friday_stop))
          ||
          (DayOfWeek()==6)
          ||
          (DayOfWeek()==0)
          ||
          ((DayOfWeek()==1)&&(Hour()<monday_start))
         ){Comment("Not trading time");return;} //hollydays off    
 
      if(signal()==1){if(AccountBalance()<acc){lot=lot2*k;}buy_(lot);return;}

      if(signal()==-1){if(AccountBalance()<acc){lot=lot2*k;}sell_(lot);return;}
     }

   
   // if there is one order we are turn take profit and stop loss on
   if(OrdersTotal()==1)
     {
      acc=AccountBalance();
      b=OrderSelect(0,SELECT_BY_POS);
      lot2=OrderLots();
      if((OrderStopLoss()==0)&&(OrderType()==OP_BUY)) 
      {b=OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-tp_and_sl*Point,OrderOpenPrice()+tp_and_sl*Point+2*com*Point,0,Blue);}
      if((OrderStopLoss()==0)&&(OrderType()==OP_SELL))
      {b=OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+tp_and_sl*Point,OrderOpenPrice()-tp_and_sl*Point-2*com*Point,0,Red);}

     }
   
   
   // if there are more than one trade is on then close all positions (becouse some error with it)
   if(OrdersTotal()>1){CloseAll();}


  }
//+------------------------------------------------------------------+

int signal() //return random signal , buy or sell
  {
   int r0;
   double r1;

   r0=MathRand();
   r1=MathMod(r0,2);
   if(r1!=0){return(-1);}
   if(r1==0){return(1);}
   return(0);
  }
//*****************************************************************

//+------------------------------------------------------------------+
void buy_(double lot998) // opening buy function
  {
   lot=NormalizeDouble(lot998,2);
//   sl_=NormalizeDouble(Ask-sl*Point,Digits);
//   tp_=NormalizeDouble(Ask+tp*Point,Digits);
   b=OrderSend(Symbol(),OP_BUY,lot998,Ask,slip,0,0,"",0,0,Blue);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void sell_(double lot999) //opening sell function
  {
   lot=NormalizeDouble(lot999,2);
//   sl_=NormalizeDouble(Bid+sl*Point,Digits);
//   tp_=NormalizeDouble(Bid-tp*Point,Digits);
   b=OrderSend(Symbol(),OP_SELL,lot999,Bid,slip,0,0,"",0,0,Red);
  }
//*************************************************************

void CloseAll() // close all trades function
  {
   int i,tik;
   i=OrdersTotal();
   while(i!=0)
     {
      b=OrderSelect(i-1,SELECT_BY_POS);
      if(b==true)
        {
         tik=OrderTicket();
         if(OrderType()==OP_BUY) {b=OrderClose(OrderTicket(),OrderLots(),Ask,slip,clrNONE);}
         if(OrderType()==OP_SELL){b=OrderClose(OrderTicket(),OrderLots(),Bid,slip,clrNONE);}
         if((OrderType()==OP_BUYSTOP) || (OrderType()==OP_SELLSTOP) || (OrderType()==OP_BUYLIMIT) || (OrderType()==OP_SELLLIMIT)){b=OrderDelete(tik,clrNONE);}
        }
      i=i-1;
     }
  }

//+------------------------------------------------------------------+
 
Yuriy Asaulenko:

I went through it, too, back in '10. I wrote about it somewhere. I practiced optimal support-closing deals, and made the entries random, so as not to bother. The idea was to minimize losses by supporting-closing. To my surprise, I have got the profit of 10-15% per month.

When I saw it, I was ecstatic - the clearest proof that it is necessary to deal with the predictive ability of predictors, and necessarily with the proof that this predictive ability does not change much.

Then the tester will prove this fact to us.

And what does the tester prove for the Random Advisor? It only proves that there is a random order at entry. Does the tester for this EA prove the future behavior of the EA? It does not. That was not the question.

 
SanSanych Fomenko:

Why is it broken? It works for me.

Here's the text

cool

Here is an automated version of manual trading

 

And here is another option because of the other take/stops

The loss, which has been accumulating for a long time in small parts, is here at once.


By changing the parameters it is possible to get the most different variants in appearance.

 
SanSanych Fomenko:

When I saw it, I was delighted - the clearest proof that we should deal with the predictive ability of predictors, and necessarily with the proof that this predictive ability does not change much.

Then the tester will prove this fact to us.

And what does the tester prove for the Random Advisor? It only proves that there is a random order at entry. Does the tester for this EA prove the future behavior of the EA? Nothing, the question was not posed in such a way.

It seems to me it is just a proof of market randomness, at least, randomness for an observer.

In fact, I work as if it were a random process. Yes, some part of trends is lost, but it is compensated by more trades, because the noise is more high-frequency.

Hmm. In the end, the bulk of the profit is made by the trade support. Well, and, probably, the MM, which I never understood.)

 
Yuriy Asaulenko:

It seems to me that this is just a proof of the randomness of the market, at least, the randomness for the observer.

In fact, I work as a random process. Yes, some part of trends is lost, but it is compensated by more trades, because the noise is more high-frequency.

Yes, it has a place.

Game theory begins with the following problem.

In a completely dark room with a blindfold on, the king is trying to catch his page, who is also blindfolded.

Question #1: What strategy should the king follow to catch the boy, who is hiding in the corners, in the minimum number of steps?

Question #2: What strategy should the henchman follow to avoid the king, who is searching in the corners, for a minimum number of steps?


The answer is the same: a uniformly distributed random variable.

Behind a very positive balance graph is this very position that the increase in the quote is a uniformly distributed value

 
SanSanych Fomenko:

Yes, it does.

Behind the very positive balance chart lies this very position that the increment of the quote is a uniformly distributed quantity

Well, here we come to a Wiener process, or a Wiener-like process. What's there to predict? The best predictor is the value itself.

But we can predict a normal distribution (or near-normal distribution). Not in the literal sense, of course, like a trace of a candle.