The regularities of price movements: Part 1. Price orientation - page 7

 
david2:

Whether a bar is inside or outside depends on when it is drawn.

What do you mean?
 
DmitriyN:
What did you mean by that?

I often think about this myself. That the appearance of the quote chart can change markedly when the interval boundaries are moved. And all those OHLCs are pretty random values.
Hence the question: So which price is closest to the real one? What are we analysing?
 
DmitriyN:
What did you mean by that?

The red line shows the bars of the higher timeframe. The same section may produce different patterns.
 
DmitriyN:
Vasiliy wanted to test this chip on random quotes after a while. What do you think will come out of this? Will the ratio be close to one?

Probably not. The second law of thermodynamics tells us: the entropy of a closed system cannot decrease. Which means that for any real process we must always observe a disequilibrium between forward and backward in time.

On the practical side, we can look at the second law a little differently: if we do register a decrease in entropy at some point in time (e.g. when, as in this case, we see a swing), this means that the system is under external influence. If we can figure out which way as quickly as possible, we get a prize)

 
david2:
Understood, but we are investigating a large number of bars, very large - thousands, tens, hundreds of thousands.
Also, you may have noticed that in the scripts the figure comparisons are 1 bar offsets, not 5-6-7 bar offsets.
Therefore, we calculate one section several times.
 
david2:

Whether a bar is internal or not also depends on when it is drawn.




Solid, agitating triangles

Does anyone have any code to identify and draw channel borders? I think we need to use a zigzag.

 
yosuf:
No one wants to analyse the following fact, which I cite everywhere: Look at the charts here https://forum.mql4.com/ru/38834/page408, where the EA has been placing orders every day since October 2004 and closing 95% of them in profit, and this ratio is almost independent of the time of entering the market. Now, tell me, has the Expert Advisor found the market behavior or not? If it has not, what other patterns do we need to find?


Are you making a joke of this?

 
gpwr:


Solid, exciting triangles

Does anyone have any code for defining and drawing channel boundaries? It probably needs to zigzag.


First of all, you have to define what a channel is. The rest is easy:)

// Поиск экстремальных точек канала цены
void fChannel(string Name                 // Имя канала
             ,int Bar1,double Price1      // Начать поиск
             ,double Speed                // Наклон линии
             ,int Bar2                    // Закончить поиск
             ,int& BarH,double& PriceH    // Экстремальные
             ,int& BarL,double& PriceL) { //    точки канала
   BarH=LastBar-1;
   BarL=LastBar-1;
   PriceH=0;
   PriceL=0;
   double H, L;
   datetime Time1=Time[Bar1],
            Time2=Time[Bar2];
   if( Bar1<Bar2
    || Bar1<LastBar
    || Bar2<LastBar
    || Price1<Zero ) {
      if( РежимОтладки ) Print("***   "+Name+" - параметры канала: "
                    +DoubleToStr(Price1,Digits)+" ("+Bar1+"/"+TimeToStr(Time1)
                                            +")...("+Bar2+"/"+TimeToStr(Time2)+")");
      return;
   }
   double Price=Price1,                   // Цена линии
          Max=-Infinity,                  // Отклонение вверх
          Min=-Infinity;                  // Отклонение вниз
   int    Bar=Bar1;
   while( Bar>=Bar2 ) {
      H=High[Bar]-Price;
      L=Price-Low[Bar];
      if( H>Max+Zero ) {
         Max=H;
         BarH=Bar;
      }
      if( L>Min+Zero ) {
         Min=L;
         BarL=Bar;
      }
      Bar--;
      Price+=Speed;
   }
   PriceH=Price1+Speed*(Bar1-BarH)+Max;
   PriceL=Price1+Speed*(Bar1-BarL)-Min;
   return;
}
 
gpwr:

It's an interesting pattern. But how does it help us in trading? If we were to gather statistics on price movements after fading triangles, a system would be born.

It shouldn't be after. It has to be "before".
 
I've had a look. The gist is clear. I can't complain yet, but I need to look at the algorithm in more detail. I think there may be different options here. But that's not today.
Reason: