Looking for patterns - page 185

 
Serqey Nikitin:
Before objecting, it is advisable to watch and evaluate THIS...

Si Chas.

 
Serqey Nikitin:
Before objecting, it is advisable to see and evaluate THIS...
Why, it's easier to sculpt for years, whatever pops into your head and it's fine
 

And some people have nothing to mould here. There's a void in their head.

All that's left is to snap at everyone.

 
Алексей Тарабанов:

So, let's start talking about the trend. A trend is a trend in price. Unlike a flat, it is unidirectional. So, I think we should start with the fact that there is no trend, the market is always oscillating.

Then what are we talking about? We are talking about parts of unidirectional movement on an oscillating chart. If the graph is a sine wave (a radio operator's dream), the unidirectional movement will be exactly within one half period. The period is measured in time. Time again, iPulsar again? Yes, exactly.

When I ask the question: what is the trend (where are we going), I must first answer the question: on what horizon? Trends come in hourly, daily, weekly, yearly; all sorts (not to be confused with timeframes, which come in all sorts too). Speaking about timeframes: it is easy to identify the year trend on minutes, but impossible to identify the daily trend on weeks. Kotelnikov proved it.

Conclusion: I first determine the trading interval (intraday, week, ...). After that I catch the trend on this interval, and then I try my best. That's all for now.

I am very happy that there is a discussion. I am glad that both those who agree and those who disagree with me have participated in it. Let's try to continue.

In the winter of 95/96 I was first introduced to Forex. I refused to take part in this scam as I didn't understand what my advantages were, how I was better than others and what would allow me to make their money my own.

Today I share what I understand. Even if all the members of this and other forums rush to trade on one very good system, the market will not feel it.

Let's return to trends.

Before trading along the trend, it is worth it to check if it is worth it. A zigzag will help assess it. Let's try to build a zigzag for a monthly, weekly, or daily trend. Exactly for the trend, not for some technical parameters. To do this, we will use the same fractal curve - 119 bars on the left and 1 bar on the right. 119 because there are 120 hours in a week and traders are paid once a week. Here's the result:


It was a weekly trend and a photo of my granddaughter that I never managed to delete. Accidentally added. Try the other trends yourself, I'll slip away for a couple of days.

Here's the code:

/* Soft Fractals ZigZag Indicator - the indicator builds a zigzag on fractals

with arbitrary sizes of right and left wings. */

#property strict
#property copyright "Copyright 2012, Тарабанов А.В."
#property link      "alextar@bk.ru"
#property indicator_chart_window                   // Индикатор в главном окне
// Индикаторные буферы
#property indicator_buffers 4
#property indicator_width1 2                       // Толщина зигзага
#property indicator_color1 Blue                    // Цвет зигзага
#property indicator_color3 Green                   // Нижние вершины
#property indicator_width3 1
#property indicator_color4 Red                     // Верхние вершины
#property indicator_width4 1
double Min[]   , Max[],                            // Изломы зигзага
       Bottom[], Top[];                            // Вершины
// Константы
#define  Version "iSFZZ"                            // Версия
#define  Zero    0.00000001                         // Точность определения нуля
// Глобальные переменные
double      LastBottom , LastTop;                  // Предыдущие значения
int         iLastBottom, iLastTop;                 //    и их бары
datetime    tLastBottom, tLastTop;                 // Время предыдущих значений
bool        LastIsTop  , LastIsBottom;             // Предыдущий пик/впадина
extern bool ОтображатьВершины   =true;
extern int  БаровЛевееВершины   =119,
            БаровПравееВершины  =1,
            СимволНижнейВершины =161,
            СимволВерхнейВершины=161;
//+------------------------------------------------------------------+
int init(){
   int DrawFractals=DRAW_NONE;
   if( ОтображатьВершины ) DrawFractals=DRAW_ARROW;
   // Атрибуты буферов
   SetIndexLabel(0,"Max");
   SetIndexBuffer(0,Max);
   SetIndexStyle(0,DRAW_ZIGZAG);
   SetIndexEmptyValue(0,0);
   SetIndexLabel(1,"Min");
   SetIndexBuffer(1,Min);
   SetIndexStyle(1,DRAW_ZIGZAG);
   SetIndexEmptyValue(1,0);
   SetIndexLabel(2,"Bottom");
   SetIndexBuffer(2,Bottom);
   SetIndexStyle(2,DrawFractals);
   SetIndexArrow(2,СимволНижнейВершины);
   SetIndexEmptyValue(2,0);
   SetIndexLabel(3,"Top");
   SetIndexBuffer(3,Top);
   SetIndexStyle(3,DrawFractals);
   SetIndexArrow(3,СимволВерхнейВершины);
   SetIndexEmptyValue(3,0);
   if( БаровЛевееВершины <1 ) БаровЛевееВершины=1; // Контроль значений
   if( БаровПравееВершины <1 ) БаровПравееВершины=1;
   LastBottom  =0;                                 // Инициализация
   LastTop     =0;
   iLastBottom =0;
   iLastTop    =0;
   tLastBottom =0;
   tLastTop    =0;
   LastIsTop   =false;
   LastIsBottom=false;
   return(0);
}
//+------------------------------------------------------------------+
int start(){
   int i, History=Bars-1, BarsLost=History-IndicatorCounted();
   if( BarsLost<History ){
      if( BarsLost<1 ) return(0);                  // Не повторять на том-же баре
      i=BarsLost+БаровПравееВершины;               // Число баров пересчета
   }
   else i=History-БаровЛевееВершины;               // Просмотр на всей истории
   double C[];
   int dim=ArrayResize(C,БаровЛевееВершины+1+БаровПравееВершины), j;
   if( tLastTop>0 ) iLastTop=iBarShift(NULL,0,tLastTop);
   if( tLastBottom>0 ) iLastBottom=iBarShift(NULL,0,tLastBottom);
   while( i>БаровПравееВершины ){                  // Перебор слева направо
      j=0;                                         // Поиск нижнего фрактала
      Bottom[i]=0;
      while( j < dim ){
         C[j]=Low[j+i-БаровПравееВершины];
         j++;
      }
      if( C[БаровПравееВершины+1]-C[БаровПравееВершины]>-Zero
       && C[БаровПравееВершины-1]-C[БаровПравееВершины]>-Zero ){
         Bottom[i]=C[БаровПравееВершины];          // Локальный минимум
         j=1;
         while ( j < dim ){
            if( ( j<БаровПравееВершины && Bottom[i]-C[j-1]>Zero )
             || ( j>БаровПравееВершины && Bottom[i]-C[j]  >Zero ) ) {
               Bottom[i]=0;                        // Нет фрактала
               break;
            }
            j++;
      }  }
      j=0;             // Поиск верхнего фрактала
      Top[i]=0;
      while( j<dim ){
         C[j]=High[j+i-БаровПравееВершины];
         j++;
      }
      if( C[БаровПравееВершины]-C[БаровПравееВершины+1]>-Zero
       && C[БаровПравееВершины]-C[БаровПравееВершины-1]>-Zero ){
         Top[i]=C[БаровПравееВершины];             // Локальный максимум
         j=1;
         while ( j < dim ){
            if( ( j<БаровПравееВершины && C[j-1]-Top[i]>Zero )
             || ( j>БаровПравееВершины && C[j]  -Top[i]>Zero ) ) {
               Top[i]=0;                           // Нет фрактала
               break;
            }
            j++;
      }  }
      if( Top[i]>Zero ){                           // Выбор вершины зигзага
         if( Bottom[i]>Zero ){                     // Top и Bottom
            if( LastIsTop || LastIsBottom ){       // Не начало зигзага
               Min[i]     =Bottom[i];              // Вертикальное колено
               Max[i]     =Top[i];
               LastBottom =Bottom[i];              // Запомнить Top и Bottom
               iLastBottom=i;
               LastTop    =Top[i];
               iLastTop   =i;
         }  }
         else{                                     // Top
            if( !LastIsTop ){                      // LastIsBottom, или
               Max[i]      =Top[i];                //    начало зигзага
               LastIsTop   =true;
               LastIsBottom=false; 
               LastTop     =Top[i];                // Запомнить Top
               iLastTop    =i;
            }
            else{                                  // LastIsTop
               if( Top[i]-LastTop>-Zero ){         // Перерисовка
                  Max[iLastTop]=0;
                  Max[i]       =Top[i];
                  LastTop      =Top[i];            // Запомнить Top
                  iLastTop     =i;
      }  }  }  }
      else{
         if( Bottom[i]>Zero ){                     // Bottom
            if( !LastIsBottom ){                   // LastIsTop, или
               Min[i]      =Bottom[i];             //    начало зигзага
               LastIsTop   =false;
               LastIsBottom=true; 
               LastBottom  =Bottom[i];             // Запомнить Bottom
               iLastBottom =i;
            }
            else{                                  // LastIsBottom
               if( LastBottom-Bottom[i]>-Zero ){   // Перерисовка
                  Min[iLastBottom]=0;
                  Min[i]          =Bottom[i];
                  LastBottom      =Bottom[i];      // Запомнить Bottom
                  iLastBottom     =i;
      }   }  }  }
      i--;
   }
   if( iLastTop>0 ) tLastTop=Time[iLastTop];       // Время крайних изломов
   if( iLastBottom>0 ) tLastBottom=Time[iLastBottom];
   return(0);
}

 
Алексей Тарабанов:

Before trading a trend, it's a good idea to assess whether it's worth it. A zigzag will help. Let's try to build a zigzag for a monthly, weekly, or daily trend. Exactly for the trend, not for some technical parameters. To do this, we will use the same fractal curve - 119 bars on the left and 1 bar on the right. 119 because there are 120 hours in a week and traders are paid once a week. This is the result:

About the incorrectly inserted code the moderator will swear now.

The principle and formula of fractal and zigzag calculation is a drawing based on an event that has taken place and it doesn't help to identifythe trenddirection, if it's about that at all :) Or is it another messed up procedure?

 
VVT:

About the incorrectly inserted when the moderator is about to scold.

Concerning functionality, the principle and formula of fractal and zigzag calculation is a drawing based on an event that took place and it doesn't help to determine the trend direction, if it's about that at all :) Or was something screwed up again?

Simply, again, all in good time. Try to do some practice with the zigzag, to understand its dimensions. If it will be successful, we will earn money on it. )

 
Алексей Тарабанов:

Just, again, all in good time. Practice the zigzag, understand its dimension. If you succeed, you will make money on it. )

I tried it, it doesn't help me make money, that's why I'm telling you.

 
VVT:

Tried it, doesn't help me make money, that's why I'm telling you.

Well, you try it with this zigzag. It's a completely different one.

 
Алексей Тарабанов:

Well, you try this zigzag with the story. It is quite different.

Everything is very beautiful on the story, but the problems begin when you start trading on the real

 
VVT:

Everything is beautiful on the story, but the problems begin when you start trading on the real

We are not trading yet.

Reason: