Once again, it's about the eternal: trend/flat. - page 10

 
Andrey Dik:

I didn't ask for a definition from the Wiki, I asked for your definition.

And I drew above what I want. Basically, now I have almost a calculation algorithm in my head.

I wanted to show that there are only abstract definitions and we need specific ones.

There are many ways of defining it. I suggested a universal, easy to code, maybe someone will find it useful.

P.S.

I should add that this way defines a flat at an early stage.

 
Uladzimir Izerski:

I would add that this method detects a flat at an early stage.

Is it an early phase on the ZZ? I doubt it, and I doubt it fiercely.
 
Andrey Dik:
On ZZ at an early stage? I doubt it, and I doubt it fiercely.

I've spelt it out a little, but you still don't get it, so what can you do, I guess the approaches to understanding are different.

It is a pity that I have not mastered the creation of videos on YouTube, would show you what you doubt.

 
Uladzimir Izerski:

We have a price range, with specific price minima and maxima. To find them it is convenient to apply a zig-zag, for example.

We do not need anything else! We obtain the prices of the first candle (maximum/minimum) - calculate the distance between them. It satisfies - we look at the second candle. If its maximum/minimum breaks the first one's extrema - we renew the extrema. And so on, until we find the required figure of the required size (in terms of length/height). If the size is exceeded, we reset the current settings and wait for a new candle.

If a flat has already been formed - check for an exit outside the flat.

 
Alexey Kozitsyn:

That's all we need! We got the price of the first candle (maximum/minimum) - calculate the distance between them. It is satisfying - we look at the second candlestick. If its maximum/minimum breaks through the first one - we renew the extrema. And so on, until we find the required figure of the required size (in terms of length/height). If the size is exceeded, we reset the current settings and wait for a new candle.

If a flat has already been formed - check for an exit outside the flat.

We can do it this way, but I already warned you that the candlestick is limited in time and does not contain the full information about the trend.
 

You can programmatically search for a narrow range, but that doesn't identify the so-called "box" when prices hit the upper and lower boundary several times.

I mean if you kind of "stupidly" search by absolute maximum and minimum in the history, for example, as in the picture. The price will fall within the range and the software will consider it a box, but it's not.

But, it needs to be:

I hope you understand now, that illusion with "simply" finding a narrow range.

One of the options for identifying exactly the range is applied here.https://www.mql5.com/ru/forum/65427

Диапазон и ложный прорыв диапазона (MQL4)
Диапазон и ложный прорыв диапазона (MQL4)
  • www.mql5.com
Так как кол-во сделок резко сократилось при оптимизации, привожу результат с 30 минутного таймфрема.
 
forexman77:

You can programmatically search for a narrow range, but it doesn't identify the so-called "box" when prices hit the upper and lower boundary several times.

I mean if you kind of "stupidly" search by absolute maximum and minimum in the history, for example, as in the picture. The price will fall within the range and the software will consider it a box, but it's not.

But, it needs to be:

I hope you understand now, that illusion with "simply" finding a narrow range.

One of the options for identifying exactly the range applied here.https://www.mql5.com/ru/forum/65427

Here, and this is the next part - the filters.

Although, in the above screenshot what you've described is artificially limited by the number of candlesticks (big enough) and low height (small enough). Both are picked up by eye.

 
Alexey Kozitsyn:

Here, and this is the next part - the filters.

Although, in the screenshot I gave, what you describe is artificially limited by the number of candles (quite a large number) and the low height (quite small size). Both are picked up by eye.

That's one way of identifying it. But, I can definitely say that it finds the "box". You can run fractals through the marked boundaries as well. To be honest, I like it better with fractals.
 

After the "movement" the market forms the range it is interested in, at extremums (flat) there is a high percentage of false-breaks and a "box" chart built on the extremums

It's better to look at the internal content of the chart.

 

Looking for a flat at an early stage ? first 2 calculation points - then 3. i.e. we need history, and when there is history, the return of the price to the "box" can be regarded as a signal

There are trading systems where the signal is a stochastic "exit" from 80%, but here the price acts as an indicator and these levels are "masked" by the flat.

Working in a "box" is a separate topic )))

Reason: