Indicators: FivePattern - page 6

 
nav_soft:

...By the way, I noticed one pattern when optimising the search engine, whatever the search algorithm is: Classic Zigzag or other, the error in predicting the next model varies about 20 +/-1 %. And this leads me to think that A.Merrill either deliberately did not describe 6 patterns (i.e. 3 M and W figures each), or did not find them.

Earlier he wrote that there are 6 more patterns. This is an erroneous opinion. Here is a simple script that confirms that there are 32 patterns.

#include <Object.mqh>

#include <Arrays\ArrayObj.mqh>

//+------------------------------------------------------------------+

//| КЛАСС ХРАНЕНИЯ ПОЛУЧЕННЫХ ДАННЫХ                                 |

//+------------------------------------------------------------------+

class MyPPattern : public CObject

  {

private:

   double            A;

   double            B;

   double            C;

   double            D;

   double            E;

public:

                     MyPPattern(void){A=0;B=0;C=0;D=0;E=0;};

                     MyPPattern(double ia, double ib, double ic,

                                double id, double ie)

                                {A=ia;B=ib;C=ic;D=id;E=ie;};

                    ~MyPPattern(void){;};

   //+---------------------------------------------------------------+

   //| SET-МЕТОДЫ                                                    |

   //+---------------------------------------------------------------+

   void              SetA(double in){A = in;};

   void              SetB(double in){B = in;};

   void              SetC(double in){C = in;};

   void              SetD(double in){D = in;};

   void              SetE(double in){E = in;};

   //+---------------------------------------------------------------+

   //| GET-МЕТОДЫ                                                    |

   //+---------------------------------------------------------------+

   double            GetA(void){return(A);};

   double            GetB(void){return(B);};

   double            GetC(void){return(C);};

   double            GetD(void){return(D);};

   double            GetE(void){return(E);};

  };

//+------------------------------------------------------------------+

//| Script program start function                                    |

//+------------------------------------------------------------------+

void OnStart()

  {

   //--- value

   int         filehandle,total;

   double      a=1,b=1,c=1,d=1,e=1,sum=0;

   string      subfolder="Research";

   CArrayObj*  Marray = new CArrayObj;

   CArrayObj*  Warray = new CArrayObj;

   MyPPattern* ppattern;

   //--- Простой поисковый массив

   while(true)

     {

      //--- 1. Инкримент

      a = a + 1;

      if(a > 5){a = 1;b = b + 1;};

      if(b > 5){b = 1;c = c + 1;};

      if(c > 5){c = 1;d = d + 1;};

      if(d > 5){d = 1;e = e + 1;};

      //--- 2. Выход из цикла

      if(e > 5) break;

      //--- 3. Сумматор

      sum = a+b+c+d+e;

      //--- 4. Запись данных

      if(sum == 15)

        {

         //--- Проверка: неравенства

         if(a!=b && a!=c && a!=d && a!=e && b!=c && 

            b!=d && b!=e && c!=d && c!=e && d!=e)

           {

            //--- Проверка: зиг-заг формации

            if(a<b && b>c && c<d && d>e)

              {//--- Формация M-волн

               ppattern = new MyPPattern(a,b,c,d,e);

               Marray.Add(ppattern);

              }

            if(a>b && b<c && c>d && d<e)

              {//--- Формация W-волн

               ppattern = new MyPPattern(a,b,c,d,e);

               Warray.Add(ppattern);

              }

           }

        }

     }

   //--- Сохранение M-данных

   ResetLastError();

   filehandle=FileOpen(subfolder+"\\SearchNewPatternM.csv",FILE_WRITE|FILE_CSV);

   if(filehandle!=INVALID_HANDLE)

     {

      total = Marray.Total();

      for(int i=0;i<total;i++)

        {

         ppattern = Marray.At(i);

         FileWrite(filehandle,ppattern.GetA(),ppattern.GetB(),ppattern.GetC(),

                   ppattern.GetD(),ppattern.GetE());

        }

      //--- Close file

      FileClose(filehandle);

     }

   else Print(__FUNCTION__,": ERROR FileOpen = ",GetLastError());

   //--- Сохранение W-данных

   ResetLastError();

   filehandle=FileOpen(subfolder+"\\SearchNewPatternW.csv",FILE_WRITE|FILE_CSV);

   if(filehandle!=INVALID_HANDLE)

     {

      total = Warray.Total();

      for(int i=0;i<total;i++)

        {

         ppattern = Warray.At(i);

         FileWrite(filehandle,ppattern.GetA(),ppattern.GetB(),ppattern.GetC(),

                   ppattern.GetD(),ppattern.GetE());

        }

      //--- Close file

      FileClose(filehandle);

     }

   else Print(__FUNCTION__,": ERROR FileOpen = ",GetLastError());

   //--- delet all objects

   delete Marray;

   delete Warray;

  }

//+------------------------------------------------------------------+


And the algorithm error of 20 per cent is caused by late detection of the pattern. I noticed it only after testing a double pattern, here is an illustration:

Late detection of a pattern

 
nav_soft:

Earlier I wrote that there are 6 more patterns. This is a misconception. Here is a simple script that confirms that there are 32 patterns.

#include <Object.mqh>

#include <Arrays\ArrayObj.mqh>

//+------------------------------------------------------------------+

//| КЛАСС ХРАНЕНИЯ ПОЛУЧЕННЫХ ДАННЫХ                                 |

//+------------------------------------------------------------------+

class MyPPattern : public CObject

  {

private:

   double            A;

   double            B;

   double            C;

   double            D;

   double            E;

public:

                     MyPPattern(void){A=0;B=0;C=0;D=0;E=0;};

                     MyPPattern(double ia, double ib, double ic,

                                double id, double ie)

                                {A=ia;B=ib;C=ic;D=id;E=ie;};

                    ~MyPPattern(void){;};

   //+---------------------------------------------------------------+

   //| SET-МЕТОДЫ                                                    |

   //+---------------------------------------------------------------+

   void              SetA(double in){A = in;};

   void              SetB(double in){B = in;};

   void              SetC(double in){C = in;};

   void              SetD(double in){D = in;};

   void              SetE(double in){E = in;};

   //+---------------------------------------------------------------+

   //| GET-МЕТОДЫ                                                    |

   //+---------------------------------------------------------------+

   double            GetA(void){return(A);};

   double            GetB(void){return(B);};

   double            GetC(void){return(C);};

   double            GetD(void){return(D);};

   double            GetE(void){return(E);};

  };

//+------------------------------------------------------------------+

//| Script program start function                                    |

//+------------------------------------------------------------------+

void OnStart()

  {

   //--- value

   int         filehandle,total;

   double      a=1,b=1,c=1,d=1,e=1,sum=0;

   string      subfolder="Research";

   CArrayObj*  Marray = new CArrayObj;

   CArrayObj*  Warray = new CArrayObj;

   MyPPattern* ppattern;

   //--- Простой поисковый массив

   while(true)

     {

      //--- 1. Инкримент

      a = a + 1;

      if(a > 5){a = 1;b = b + 1;};

      if(b > 5){b = 1;c = c + 1;};

      if(c > 5){c = 1;d = d + 1;};

      if(d > 5){d = 1;e = e + 1;};

      //--- 2. Выход из цикла

      if(e > 5) break;

      //--- 3. Сумматор

      sum = a+b+c+d+e;

      //--- 4. Запись данных

      if(sum == 15)

        {

         //--- Проверка: неравенства

         if(a!=b && a!=c && a!=d && a!=e && b!=c && 

            b!=d && b!=e && c!=d && c!=e && d!=e)

           {

            //--- Проверка: зиг-заг формации

            if(a<b && b>c && c<d && d>e)

              {//--- Формация M-волн

               ppattern = new MyPPattern(a,b,c,d,e);

               Marray.Add(ppattern);

              }

            if(a>b && b<c && c>d && d<e)

              {//--- Формация W-волн

               ppattern = new MyPPattern(a,b,c,d,e);

               Warray.Add(ppattern);

              }

           }

        }

     }

   //--- Сохранение M-данных

   ResetLastError();

   filehandle=FileOpen(subfolder+"\\SearchNewPatternM.csv",FILE_WRITE|FILE_CSV);

   if(filehandle!=INVALID_HANDLE)

     {

      total = Marray.Total();

      for(int i=0;i<total;i++)

        {

         ppattern = Marray.At(i);

         FileWrite(filehandle,ppattern.GetA(),ppattern.GetB(),ppattern.GetC(),

                   ppattern.GetD(),ppattern.GetE());

        }

      //--- Close file

      FileClose(filehandle);

     }

   else Print(__FUNCTION__,": ERROR FileOpen = ",GetLastError());

   //--- Сохранение W-данных

   ResetLastError();

   filehandle=FileOpen(subfolder+"\\SearchNewPatternW.csv",FILE_WRITE|FILE_CSV);

   if(filehandle!=INVALID_HANDLE)

     {

      total = Warray.Total();

      for(int i=0;i<total;i++)

        {

         ppattern = Warray.At(i);

         FileWrite(filehandle,ppattern.GetA(),ppattern.GetB(),ppattern.GetC(),

                   ppattern.GetD(),ppattern.GetE());

        }

      //--- Close file

      FileClose(filehandle);

     }

   else Print(__FUNCTION__,": ERROR FileOpen = ",GetLastError());

   //--- delet all objects

   delete Marray;

   delete Warray;

  }

//+------------------------------------------------------------------+


And the algorithm error of 20 per cent is caused by late detection of the pattern. I noticed it only after testing a double pattern, here is an illustration:


I understand the code has been completely rewritten, when can I see this miracle?
 
ozhiganov:
I understand the code has been completely rewritten, when can we familiarise ourselves with this marvel?

There are a lot of changes:

1. the indicator has become "binary": the senior pattern is defined on hourly periods, the junior one works on minutes, ("traders' approach" - I don't know if I will have time to add the marking of trading session boundaries). The common pattern is displayed on one chart, so there is an algorithm to restore the full value of the time extremum of the senior pattern;

2. MyCExtremum class is rewritten: a) the classic Zig-Zag remains; b) modification of Zig-Zag with a percentage step; c) and my experimental fractal (extrema) + percentage step (on the pictures it is the one in work);

3. In the Algorithm of detection of the first point of the senior model, the condition of going beyond the boundaries of Bollinger Bands is checked, also the algorithm observes this condition at other points, I think on the basis of this we can judge about the accuracy of a certain model and its current completeness (there are difficulties here... there is no clear algorithm yet);

4. Graphics: decided to use ready-made ElliotWave5 objects;

Will be released very soon. While testing... and this kills more time than designing.

 
nav_soft:

There are a lot of changes:

1. the indicator has become "binary": the senior pattern is defined on hourly periods, the junior one works on minutes, ("traders' approach" - I don't know if I will have time to add marking the boundaries of trading sessions). The common pattern is displayed on one chart, so there is an algorithm to restore the full value of the time extremum of the senior pattern;

2. MyCExtremum class is rewritten: a) the classic Zig-Zag remains; b) modification of Zig-Zag with a percentage step; c) and my experimental fractal (extrema) + percentage step (in the pictures it is the one in work);

3. In the Algorithm of detection of the first point of the senior model, the condition of going beyond the boundaries of Bollinger Bands is checked, also the algorithm observes this condition at other points, I think on the basis of this we can judge about the accuracy of a certain model and its current completeness (there are difficulties here... there is no clear algorithm yet);

4. Graphics: decided to use ready-made ElliotWave5 objects;

Will be released very soon. While testing... which kills more time than designing.

Looking forward to it!!!
 

Started field testing of Five Wave signal/advisor: https: //www.mql5.com/ru/signals/98850. The Expert Advisor generates trading signals based on the forecast from the FivePattern indicator.

Торговые сигналы для MetaTrader 5: Five Wave indicator Five Pattern
Торговые сигналы для MetaTrader 5: Five Wave indicator Five Pattern
  • Andrey Emelyanov
  • www.mql5.com
Сигнал от советника Five Wave. Торговые правила советника генерируются на индикаторе FivePattern . Скачать индикатор FivePattern и ознакомиться с его работой можно по ссылке .
 
nav_soft:

Начал полевые испытания сигнала/советника Five Wave: https://www.mql5.com/en/signals/98850 . Советник генерирует торговые сигналы на основе прогноза от индикатора FivePattern.

nav_soft
:

Started field testing of Five Wave signal/advisor: https: //www.mql5.com/ru/signals/98850. The Expert Advisor generates trading signals based on the forecast from the FivePattern indicator.

Great, I've been waiting for a long time, will the indicator in Code Base be updated?
 
ozhiganov:
Great, I've been waiting for a long time, will the indicator in Code Base be updated?
Yes. 18.04.2015 - I will submit the code to the moderators for checking, and I will post it in the forum as an archive.
[Deleted]  

HEAVY!!!! To the developer, kudos!

I liked the fact that there was something new, absolutely different from the others. Almost like a know-how.

[Deleted]  
Thanks to the developer, waiting for the updated version, it's already 20 April)
 
good morning, how to install this indicator in mt5? my email felipebm1@hotmail.com thanks