ZigZags, waves, trends. - page 50

 
Aleksei Stepanenko:
I run the Expert Advisor in the Strategy Tester in visual mode. I put the indicator on the chart and let's go. Open prices.

Interesting approach, to assemble everything into an ontik, and write it into a file in ondeinit) And assemble it by the text)

Not bad)

Added

Why ++finish+1 and finish=-1 ?

Counting bars by opening price))) There is something to it))

 

Initially, the last element is finish=-1, i.e. the array is empty.

And if the array is empty or the wave number has changed, add a new element ++finish+1

First increase ++finish by one, then resize the array.

 
Aleksei Stepanenko:

Initially, the last element is finish=-1, i.e. the array is empty.

And if the array is empty or the wave number has changed, add a new element ++finish+1

First, increase finish by one, then change the size of the array.

Why not ++finish and finish=0 and finish==0

sounds like the same thing.

 

finish is the last element of the array. It is always one less than the size of the array.

If the array is empty, its size is 0, and the last element is -1, i.e. it does not exist.

ArrayResize(res,++finish+1); carries two actions: first, increase the index of the last element, then increase the size of the array.

In the first case, first we increase the index to 0, and then we increase the size of the array to 1.

Now we can access the last element: res[finish].bars=......

 
Aleksei Stepanenko:

finish is the last element of the array. It is always one less than the size of the array.

If the array is empty, its size is 0, and the last element is -1, i.e. it does not exist.

ArrayResize(res,++finish+1); carries two actions, first increasing the index of the last element, then increasing the array.

Right, I didn't get it right away. Binding to the array size). 0 first element)

 

Yes, it's unusual at first, but it's quite short code and convenient. And I know for sure that the index and array increase happened in the same place.


Regarding trends and waves. In my opinion, there are not as many trends as there are timeframes.

There are, well, roughly one to three. One is global, which lasts for months. The second is the opposite of the global, and is a pullback trend that lasts from a day to a week or longer.

And the third is intraday. It's something that's dangling back and forth every day. These smaller trends are waves of the global trend.

And all of these trends have their start and end points. When you switch timeframes, these points should not jump.

 
Aleksei Stepanenko:

Yes, it's unusual at first, but it's quite short code and convenient. And I know for sure that the index and array increase happened in the same place.


Regarding trends and waves. In my opinion, there are not as many trends as there are timeframes.

There are, well, roughly one to three. One is global, which lasts for months. The second is the opposite of the global, and is a pullback trend that lasts from a day to a week or longer.

And the third is intraday. It's something that's dangling back and forth every day. These smaller trends are waves of the global trend.

And all of these trends have their start and end points. When you switch timeframes, these points should not jump.

Fractality in the world seems to tell a different story. The behaviour of a discrete price function is similar (the term equally does not fit))) at different scales. The idea of catching trend change points on the lower TF is not new. If we beat the spread and commissions there is a chance.

This is to say that it is not always possible to logically connect the reasons of trends and detect them in systems with a large number of participants. Probably, there is no need to look for a direct or indirect connection between the causes and the price behavior.

A shallow TF is kind of deciphering the bar of a large TF. The sequence of waves before the change of direction makes sense to look at. And maybe there will be a difference from SB)

 
I am not against fractality. The question is the appropriateness of a large number of fractals into sub-trends. Three options are enough to keep my head from spinning.
 
Aleksei Stepanenko:
I'm not against fractality. The issue is the appropriateness of a large number of fractals into sub-trends. Three options are enough to keep your head from spinning.

Perhaps, apparently, different approaches to research. I've seen systems of 3 TFs. But I'm not impressed. I have the opposite, first to understand what can be measured in general, and then to choose the right one. Longer way, and not always justified, but sometimes more effective.

 
Probably yes, that's an area to explore as well.
Reason: