Discussion of article "Extract profit down to the last pip" - page 18

 
fxsaber:

When low mat expectation breaks down the result.

in my opinion, the MOE estimate is not enough to evaluate the TC in the future.

Here's the ZigZag MOE with a peek into history, the MOE is much lower https://www.mql5.com/ru/forum/221552/page1630#comment_13582832.

than in the article, you have an MO of 6.17.

I need some kind of complex indicator, like a mismatch error between the tester balance chart and the trade balance chart, but I don't know where to read such material yet.

 
multiplicator:

Write a sequel. On these points.

Tried to write this article in simple language. It seems that it was not understood by readers (especially, in other languages). And unexpectedly it turned out in the end that I am glad for such a circumstance. So, I think, enough is enough.

 
Igor Makanu:

I need some kind of complex indicator, like the error of mismatch between tester balance graph and trade balance graph, but I don't know where to read such material yet.

It's almost zero. The synchroniser works very well. It is just the commission that eats it up.

 
fxsaber:

It's almost zero. The synchroniser works very well. It just eats up the commission.

MO is MO, imho one of the most worthless assessments ever.... Well, that's my opinion.)

Have you seen my report on ZZ? Pay attention to the article https://www.mql5.com/en/articles/1492 and to the Z-score.

my Z-score: Z-score: -17.44 (99.74%).

Your Z-score: -3.52.

According to the article "MATHEMATICS IN TRADING" you have good data on Z-Account and MO is positive and more than ZZ, but ZZ has lower MO and 5 times higher Z-Account (spread in the test from the terminal I have).


here I am looking for answers to my questions - how to evaluate the TS correctly, but as I wrote above - MO is not the evaluation of the TS at all, if I am not mistaken, the tester Grails on ticks from MT4 have negative MO? - I haven't looked for a long time, I need to look in KB

 
Igor Makanu:

MO is MO, imho one of the most worthless assessments..... well, that's my opinion.)

So MO is just talking about how hard it will be when you have to pay costs (commission, slippage, etc).

have you seen my ZZ report? check out the article https://www.mql5.com/en/articles/1492 and the Z-account valuation

I did. It's looking into the future, so I didn't quite understand what I needed to see.

My Z-score: Z-score: -17.44 (99.74%).

Your Z-score: -3.52.

According to the article "MATHEMATICS IN TRADING" you have good data on Z-Account and MO is positive and more than ZZ, but ZZ has lower MO and 5 times higher Z-Account (spread in the test from the terminal I have).

I'm not quite sure why it is necessary to compare with ZZ-TS. When looking in, there should have been no downside at all. I don't remember exactly, I think the MO should be twice as high as the min knee of the ZZ.

I've never heard of a Z-count. I read the definition. I'll have to see the series of trades for myself.

I'm looking for answers to my questions - how to evaluate a TS correctly, but as I wrote above - MO is not a TS evaluation at all, if I'm not mistaken, tester grails on ticks from MT4 have negative MO? - I haven't looked for a long time, I need to look in KB

MO is the average profit of a closed position. Not at all an optimisation criterion or anything like that. Just information.


ZY For Genetics, I used to use something like this

sinput int inMinTrades = 0; // Minimum number of trades (positions).

double OnTester()
{      
  return((TesterStatistics(STAT_TRADES) > inMinTrades) ? TesterStatistics(STAT_PROFIT) : 0);
}

allows filtering out a lot of rubbish and directing GA to more or less interesting extremes.

 
fxsaber:

I'm not quite sure why you have to compare it to the ZZTS. There should have been no minus at all when looking in. I don't remember exactly, I think the MO should be twice as high as the min. knee of the ZZ.

Profitable trades (% of all): 12217 (99.96%) Loss trades (% of all): 5 (0.04%)

there are no losses there, only loss at closing - I was too lazy to do it.

fxsaber:

Never heard about Z-account. I have read the definition. I need to see the series of trades for myself.

The formula is described in the article, so I think that it may be worth calculating this Z-account online, but then I need to take into account the statistics from the tester to see how the Z-account behaves further on

 

fxsaber:


This is a picture of the TC result optimised on the highlighted red interval. I cannot reproduce exactly how it was then. But I remember that the picture to the left of the optimisation interval was much more pleasant - a straight line. Almost a grail, which was put on the real and earned exactly the same as in the Tester. When after the New Year the systematic drain began, I had enough wit or experience to switch off trading. The loss was about 10% of what was earned before. What caused the scrapping is unclear.

What is important in this story is that even graality leads to drains.


Maybe the supplier widened the spread? You can download the tick history for that period and see the average spread size before the new year and after the new year.
 
fxsaber:

I've never heard of a Z-account. I read the definition. I'll have to see the series of trades for myself.

Visualiser

string ZToString( const double Commission = 0, const int Length = 80 )
{
  const int Size = OrdersHistoryTotal();
  string Str = NULL;
  
  StringReserve(Str, Size + Size / Length);
  
  for (int i = 0, Count = 0; i < Size; i++)
    if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) && (OrderType() <= OP_SELL))
    {
      Str += (OrderProfit() + Commission> 0) ? "+" : "-";
      
      if (++Count >= Length)
      {
        Str += "\n";
        
        Count = 0;
      }
    }
    
  return(Str);
}


For this trade (the upper line is without commission, the blue line is with it).



Z-account is 0.76 (55.27%) - no commission. And it looks like this


Obviously, there is a dependence of the Z-count on the commission. I would not take it into account in the analysis. I have not dug into the topic of analysing deals.

 
fxsaber:

Visualiser

how to use it? - really need it!

fxsaber:

Z-account is 0.76 (55.27%) - no commission. And it looks like this

Well, I think you have confirmed my assumption that it's not a matter of low MO, but rather a low correlation between trades, i.e. entry+exit from a trade depends little on the previous and next pair of input+output. I.e. your TS most likely found a random correlation with the price chart experimentally (GA of the tester) and this correlation continued for some time.

these are my thoughts, if they are correct, then it is necessary to re-optimise such TS more often, and TS with higher correlation between profit/loss series should be re-optimised less often..... but it seems that here you also need to monitor changes in Z-account.


ZY: I would like to see the full report of the tester from the article, trades are not interesting, the hat is interesting, I would like to compare it with ZZ, if you don't mind, please share it.

 
multiplicator:

Maybe the supplier has widened the spread? You can download the tick history for that period and see the average spread size before the new year and after the new year.

Here is the time-weighted average spread by week (in pips).

2018.06.04 00:05:09   33.21
2018.06.11 00:05:11   41.86
2018.06.18 00:05:01   36.99
2018.06.25 00:05:19   45.40
2018.07.02 00:05:20   41.26
2018.07.09 00:05:21   39.09
2018.07.16 00:05:14   40.79
2018.07.23 00:05:19   36.06
2018.07.30 00:05:04   33.86
2018.08.06 00:05:17   33.03
2018.08.13 00:05:04   37.92
2018.08.20 00:06:08   40.94
2018.08.27 00:05:04   39.02
2018.09.03 00:05:13   37.99
2018.09.10 00:05:11   40.37
2018.09.17 00:05:16   42.10
2018.09.24 00:05:12   38.52
2018.10.01 00:05:13   32.12
2018.10.08 00:05:12   30.94
2018.10.15 00:05:16   35.96
2018.10.22 00:05:18   32.76
2018.10.29 00:05:02   36.59
2018.11.05 00:05:14   30.08
2018.11.12 00:05:09   30.41
2018.11.19 00:05:14   30.16
2018.11.26 00:05:32   34.95
2018.12.03 00:05:07   26.41
2018.12.10 00:05:15   25.50
2018.12.17 00:05:15   28.62
2018.12.24 00:05:13   33.06
2018.12.31 00:05:09   78.09
2019.01.07 00:05:11   49.78
2019.01.14 00:05:03   33.54
2019.01.21 00:05:20   43.68
2019.01.28 00:05:07   45.67
2019.02.04 00:05:12   44.24
2019.02.11 00:05:10   40.00
2019.02.18 00:05:20   40.66
2019.02.25 00:05:20   46.09
2019.03.04 00:05:15   41.78
2019.03.11 00:05:10   43.28
2019.03.18 00:05:03   44.42
2019.03.25 00:09:06   47.47
2019.04.01 00:05:12   44.14
2019.04.08 00:05:12   47.25
2019.04.15 00:05:09   45.61
2019.04.22 00:05:13   56.57
2019.04.29 00:05:19   48.09
2019.05.06 00:28:42   49.82
2019.05.13 00:05:13   58.00
2019.05.20 00:05:13   58.75
2019.05.27 00:05:12   60.43

Plot it in Excel. By eye, it seems to have increased. That does seem to be the reason.


// Time-weighted average spread (in pips) for each week. Run in the Tester on real ticks.
#define  MACROS(A, B)               \
  int Time##A( const datetime dt ) \
  {                                \
    MqlDateTime mdts;              \
                                   \
    TimeToStruct(dt, mdts);        \
                                   \
    return(mdts.B);                \
  }                                \
                                   \
  int A() { return(Time##A(TimeCurrent())); }

  MACROS(Day, day)
  MACROS(Month, mon)
  MACROS(Year, year)
  MACROS(DayOfYear, day_of_year)
  MACROS(DayOfWeek, day_of_week)
#undef  MACROS

void OnTick()
{
  static double SumSpread = 0;
  static long SumInterval = 0;  
  
  static MqlTick PrevTick = {0};
  static int PrevDay = 0;  
    
  MqlTick Tick;
  
  if (SymbolInfoTick(_Symbol, Tick) && (Tick.time - PrevTick.time) < 60)
  {
    const long Interval = Tick.time_msc - PrevTick.time_msc;
    
    SumSpread += (PrevTick.ask - PrevTick.bid) * Interval / _Point;
    SumInterval += Interval;    
  }

  const int Day = DayOfWeek();
  
  if (Day < PrevDay)
  {    
    if (SumInterval)
      Print(DoubleToString(SumSpread / SumInterval, 2));
      
    SumSpread = 0;
    SumInterval = 0;        
  }
  
  PrevTick = Tick;  
  PrevDay = Day;
}