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

 
tara:


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


As far as I understand, we set the initial and final bar and price slope in the code and look for maximum-distant prices from this slope. This is, of course, the easiest way. By my definition a channel does exist if I can find a straight line that price touches (without crossing) at least 3 times. Why 3 times? Because 2 touches are irrelevant (any 2 points can always be passed through by a straight line). This line can be either a support (price is up) or resistance (price is down) level. The slope can be anything.
 
// Поиск ближайшей точки пробоя линии
void fBreakPoint(string Name                 // Имя пробоя
                ,int Bar1,double Price1      // Начать поиск
                ,double Speed                // Наклон линии
                ,int Bar2                    // Закончить поиск
                ,int& Bar,double& Price) {   // Пробой линии
   Bar=LastBar-1;
   Price=0;
   datetime Time1=Time[Bar1],
            Time2=Time[Bar2];
   if( Bar1<LastBar || Bar2<LastBar || Price1<Zero ) {
      if( РежимОтладки ) Print("***   "+Name+" - параметры пробоя: "
                    +DoubleToStr(Price1,Digits)+" ("+Bar1+"/"+TimeToStr(Time1)
                                            +")...("+Bar2+"/"+TimeToStr(Time2)+")");
      return;
   }
   int Step;
   double H, L, P;
   if( Bar2>Bar1 ) Step=1; else Step=-1;
   if( High[Bar1]-Price1>Zero
    && Price1-Low[Bar1]>Zero ) {             // Первый бар
      Bar=Bar1;
      Price=Price1;
      return;
   }
   while( Bar1!=Bar2 ) {
      H=High[Bar1];                          // Предыдущий бар
      L=Low[Bar1];
      P=Price1;
      Price1-=Step*Speed;                    // Текущий бар
      Bar1+=Step;
      if( ( High[Bar1]-Price1>Zero && P-L>Zero )
       || ( Price1-Low[Bar1]> Zero && H-P>Zero ) ) {
         Bar=Bar1;
         Price=Price1;
         return;
   }  }
   return;
}

Determining the start and end of a channel:

 
gpwr:

As I understand it, in the code we set the initial and final bar and the slope of the price and look for the maximum-distant prices from this slope. This is, of course, the easiest way. By my definition, a channel exists if we can find a straight line that price touches (not crossed) at least 3 times. Why 3 times? Because 2 touches are irrelevant (any 2 points can always be passed through by a line). This line can be either a support (price is up) or resistance (price is down) level. The slope can be anything.

I don't like specific numbers when it comes to patterns.

My main tool is tangents. Just the two points we get in our case :(

 
Gone to bed. It's past midnight:)
 
alsu:

It probably won't. The second law of thermodynamics tells us: entropy of a closed system cannot decrease. Which means that for any real process, we must always observe disequilibrium between forward and backward directions 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)


On random will be if we generate a series without volatility effects. And if a random series is obtained from a real one retaining volatility, it will be the same as for the original one. I.e. for each bar with probability 0.5 we either leave it unchanged or mirror it.
 
Avals:

If we generate a random series without volatility effects, it will be the same as in the original one. And if we get a random series from a real one retaining volatility, it will be the same as for the initial one. I.e. for each bar with probability 0.5 either leave it unchanged or mirror it.


I tweaked the script from the first post to make it work with random quotes (mirror reflection of a bar with probability 0.5). I also get ratios of internal and external numbers greater than 1, but steadily less than on real bars.

Maybe there is a mistake in the script:

// Скрипт для подсчёта доли внешних и внутренних бар //
#property  copyright "Copyright © Svinotavr-2000"
#property  link      "DmitriyN"

int start()
 {
   MathSrand(TimeLocal());
   double n;                // Количество бар всего, шт
   double KolVneshBar;      // Количество внешних бар, шт
   double KolVnutrBar;      // Количество внутренних бар, шт
   double ProcentVneshBar;  // Процент внешних бар, %
   double ProcentVnutrBar;  // Процент внутренних бар, %
   double OtnoshVnutKVnesh; // Отношение числа внутренних бар к числу внешних бар, раз
   double H,L,pH,pL;
   // Берём число бар на единицу меньшее, чем всего
   n=Bars-1; 
   double lastCl=Close[Bars];
   // Цикл по всем барам
        for(int j = n; j > 0; j--)
        {      
              int rnd=MathRand();
              if (rnd>=16384) bool zerk=true; else zerk=false;
              pH=H;
              pL=L;
              if (!zerk){
                H=lastCl+(High[j]-Close[j+1]);
                L=lastCl+(Low[j]-Close[j+1]);
                lastCl=lastCl+(Close[j]-Close[j+1]);
              } else {
                H=lastCl-(Low[j]-Close[j+1]);
                L=lastCl-(High[j]-Close[j+1]);
                lastCl=lastCl-(Close[j]-Close[j+1]);
              }
               // Считаем количество внутренних бар
               if ((H < pH) && (L > pL))
               {
               KolVnutrBar=KolVnutrBar+1;
               }  
               // Считаем количество внешних бар               
               if ((H > pH) && (L < pL))
               {
               KolVneshBar=KolVneshBar+1;
               
               }      
         }
  // Считаем отношение числа внутренних бар к числу внешних бар
  OtnoshVnutKVnesh=KolVnutrBar/KolVneshBar;
  // Переводим в проценты
  ProcentVneshBar=KolVneshBar/n*100;
  ProcentVnutrBar=KolVnutrBar/n*100;
  // Формируем строки для печати
   string S0 = "\n" + "=============== Результаты расчётов ===============" + "\n" + "\n";  
   string S1 = "Исследовано бар = " + DoubleToStr(n,0)+ " шт" + "\n"; 
   string S2 = "Процент внешних бар = " + DoubleToStr(ProcentVneshBar,3) +" %" + "\n"; 
   string S3 = "Процент внутренних бар = " + DoubleToStr(ProcentVnutrBar,3)+ " %" +"\n";
   string S4 = "Отношение числа внутренних бар к числу внешних бар = " + DoubleToStr(OtnoshVnutKVnesh,2);
  // Выводим на экран     
   Comment(S0, S1, S2, S3, S4);          
 }
 

Everyone involved in this thread is on the same bell tower from which you can only see into the past. In the past are all your internal and external bars. The problem is not recognising the bars in the past, but predicting the future.

When you have enough material to make a judgement on the type of bars, then in a trading sense the train has already left. It is likely that the next bar that appears over the right edge will be the start of a new pattern that has nothing to do with the one you recognised.

The main question is what predictive properties your figure has. Like head and shoulders is a purely predictive pattern: you break through the right shoulder and go on (more likely than not, and you don't know the probability of that "more likely").

We, on this site, are only interested in predictions - everything else is purely of sporting interest.

 
faa1947:

Everyone involved in this thread is on the same bell tower from which you can only see into the past. In the past are all your internal and external bars. The problem is not recognising the bars in the past, but predicting the future.

When you have enough material to make a judgement on the type of bars, then in a trading sense the train has already left. It is likely that the next bar that appears over the right-hand edge will be the start of a new pattern that has nothing to do with the one you recognised.

The main question is what predictive properties your figure has. Like head and shoulders is a purely predictive pattern: you break through the right shoulder and go on (more likely than not, and you don't know the probability of that "more likely").

We, on this site, are only interested in predictions - everything else is purely of sporting interest.


And how can you be sure what millions of terminals will do next?
 
faa1947: We, on this site, are only interested in the forecast - everything else is purely of sporting interest.

You should then go to the Centre... the hydrometeorological center... where they give forecasts... or here:


Still, he's big and believes in fairy tales :-)

 

Tested the results on a normally distributed SB. Surprisingly, the probabilities of both outcomes are equal in this case! I purposely split the analyzed series into several independent sub-periods. All sub-periods show remarkable convergence to a single value.

Range expansion: 89274(9.55%)
Range narrowing: 89494 (9.58%)

Range extension: 5416 (9.44%)
Range narrowing: 5550(9.67%)

Range narrowing: 21299(9.6%)
Range narrowing: 21362(9.63%)

Range expansion: 12519(9.55%)
Range narrowing: 12423(9.48%)

Range expansion: 21098(9.51%)
Range narrowing: 21193(9,56%)

Range expansion: 16863(9.52%)
Range narrowing: 16974(9.58%)

Avals:

this is a volatility pattern: slow decay after a spike and a few inside bars are formed; fast rise - often in one bar and accordingly one outside bar is formed


Yes, the only explanation that still remains is the clustering of volatility on stable Pareto distributions. But by and large the time arrow in this case can also be directed forward as well as backward. After all, who prevents a bar with a small range from forming before a sharp jump - but it seems that something prevents it, since there are far fewer of them?

Here is the same algorithm for the RTS market:

Range expansion: 10597(7.67%)
Range narrowing: 18714(13.55%)