Algorithmic ''centrifuge'' - page 8

 
First, we need to define what"ideal entry points" and"ideal exit points" are.
 
Реter Konow:

2. ZigZag will not show perfect entry points. That's not it. There will be a big margin of error there. An optimiser with a GA can do much better. IMHO.

ZigZag only shows ideal entry/exit points and nothing more

Although if we are talking about a specific ZZ, then yes, we can discuss, I used mine - it has no min.bar settings - just from High to Low draws a line, the setting is the minimum distance from High to Low

https://www.mql5.com/ru/forum/318267#comment_12508440

 
You need a zigzag not by bars but by points, with a threshold of 1 point more than the spread and by minutes of it, Yes, of course, some fluctuations within bars it won't catch... and that's the trouble!
 

Oops! 8888


 
Dmitry Fedoseev:
and on the minutes it

Not really, I've been testing it all in the optimizer ;)

On M1 with the minimum setting will greatly affect the spread, it is better to take more settings in pp or other TF, but no older than H1, on H4 and above will be lower returns

 
Igor Makanu:

Not really, I've been testing it all in the optimizer ;)

On M1 with the minimum setting will greatly affect the spread, it is better to take more settings in pp or other TF, but no older than H1, on H4 and above will be lower returns

What was the zigzag?

 
Олег avtomat:
First, we need to define what " ideal entry points" and"ideal exit points" are.

The ideal entry point is the price and time start of the ''ideal trade''.

Ideal exit point - the price and time completion of the ''ideal trade''.

The ideal trade is the trade with the best ratio of time duration to profit.

imho.

 
Dmitry Fedoseev:

What was the zigzag?

for MT5 made a long time ago,https://www.mql5.com/ru/forum/318267#comment_12508440

//+------------------------------------------------------------------+
//|                                                     ZigZagZZ.mq5 |
//|                                                            IgorM |
//|                              https://www.mql5.com/ru/users/igorm |
//+------------------------------------------------------------------+
#property copyright "IgorM"
#property link      "https://www.mql5.com/ru/users/igorm"
#property version   "1.00"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_plots   1

// plot ZigZagZZ
#property indicator_label1  "ZigZagZZ"
#property indicator_type1   DRAW_SECTION
#property indicator_color1  clrDarkBlue
#property indicator_style1  STYLE_SOLID
#property indicator_width1  3
// input parameters
input int   Deviation=100;
// indicator buffers
double         ZZBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
// indicator buffers mapping
   SetIndexBuffer(0,ZZBuffer,INDICATOR_DATA);
   IndicatorSetInteger(INDICATOR_DIGITS,_Digits);
   PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0.0);
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int        rates_total,
                const int        prev_calculated,
                const datetime   &time[],
                const double     &open[],
                const double     &high[],
                const double     &low[],
                const double     &close[],
                const long       &tick_volume[],
                const long       &volume[],
                const int        &spread[])
  {
   static bool UP;
   static double max,min;
   static int LastExt=0;
   static const double dev=NormalizeDouble(Deviation*_Point,_Digits);
   int limit=prev_calculated-1;
   if(prev_calculated==0)
     {
      ArrayInitialize(ZZBuffer,0.0);
      limit=2; LastExt=0;
      if(low[0]<high[1]) { min=low[0];  max=high[1];   UP=true;  }
      else               { max=high[0]; min  = low[1]; UP=false; }
     }
   for(int i=limit; i<rates_total; i++)
     {
      ZZBuffer[i]=0.0;
      if(UP)
        {
         if(low[i]-min<=0.0) { min=low[i]; ZZBuffer[LastExt]=0.0; LastExt=i; ZZBuffer[i]=min; }
         else
           {
            if(high[i]-min-dev>0.0) { max=high[i]; LastExt=i; ZZBuffer[i]=max; UP=false; }
           }
        }
      else
        {
         if(high[i]-max>=0.0) { max=high[i]; ZZBuffer[LastExt]=0.0; LastExt=i; ZZBuffer[i]=max; }
         else
           {
            if(low[i]-max+dev<0.0) { min=low[i]; LastExt=i; ZZBuffer[i]=min; UP=true; }
           }
        }
     }
   return(rates_total);
  }
//+------------------------------------------------------------------+
 
Igor Makanu:

for MT5 made a long time ago,https://www.mql5.com/ru/forum/318267#comment_12508440

Yes, the right zigzag for the task.

 
Igor Makanu:

ZigZag only shows ideal entry/exit points and nothing more

Although if we are talking about a specific ZZ, then yes, we can discuss, I used mine - it has no min.bar settings - it simply draws lines from High to Low, the setting is the minimum distance from High to Low

https://www.mql5.com/ru/forum/318267#comment_12508440

ZigZag does not rely on the principles of the 'perfect trade' - the best trade time to profit ratio. ZZ will need to be entered and exited at all its peaks and lows. It is not an ideal solution.
Reason: