Market condition - flat or trend? Which dominates? - page 13

 
Some intermediate conclusions.
It was necessary to outline the task clearly from the beginning. An attempt to "lighten" the perception, led to additions and clarifications.

In fact, you need to create an indicator with the following criteria. Segment construction from level to level, where levels
are set in points (or percentage, but the former is better, as further evaluation is done in points) as a fixed channel width. (the possibility of displaying (rendering) the channel and absence of it is preserved)

In this case, the levels are moved depending on the price changes. The price "moves" the channel. (Similar to ZZ) Maybe, as an option, we should also embed it in the ZigZag?

The indicator should draw segments visually, displaying the status of virtual trades. (The variant used by Komposter fits perfectly)

If the price value (for example, Bid) is equal to the upper level, we open a conditional Buy, if the lower one is Sell. We close the "deal" when the price reaches the opposite channel edge
, simultaneously opening the next one. See Figure_1.


Picture_1 Displaying TFS indicator

Having the ability to set the spread, you can additionally get information about the result of "activity" of this algorithm without running the EA

(of course, without taking into account slippages, although it is easy to calculate the number of losses from spreads by multiplying the number of segments by the value of spread)


A little digression.

To estimate the trendiness and flatness, we used the notion of price being in a channel - which was taken as a flat. The signal indicating the beginning of the next segment is received when the price touches the channel, but we will know whether the target segment condition is met or not only when the price "comes" to the opposite channel edge. The transition itself is when the price reaches the channel edge; it should be treated as a flat. See Figure 2.


Picture_2 TFS displaying of actual flat and trend length by time


The dimension of the segments in points will not be affected by this condition, but the time dimension will be significantly affected. I have not come to a definite opinion whether the indicator and the script should be "overloaded" with additional calculations and information. It is useful for estimating the correlation of time dimensions of segments, but it is not applicable as trading criteria, as it is not possible. As a variant to apply these conditions only for calculation of time ratios, and to use "border to border" variant for display. So I would like to know your opinion about it.

To summarize
The indicator, and the script attached to it, should output the following information for the analyzed timeframe

- total number of bars read (counted)
- total number of segments received (pcs) (on a given time interval)
- total number (pcs) of all positive segments, % of total
- total number (pcs) of all negative segments, % of total

- sum of all positive segments-transactions (points+%, bars+%) (% of the total)
It would be very useful to get the distribution of positive segments, as the simple average is not very informative, but at least to give the average

- sum of all negative segments (points+%, bars+%)
I think that the distribution of these segments due to the relatively narrow range will be approximately uniform, so its calculation is of little informative value, hence it is not necessary.

- maximum (one) positive trade (in pips),
- maximum (one) positive trade (in bars) in bars separately, as these may be different segments
- maximum sequence of positive segments-transactions (pc+number+pips+bars)
- maximum sequence of negative segments-transactions (pc+number+pips+bars)
- number of sequences of two sections with the criterion "positive+positive" (from buy to sell and vice versa)
- number of sequences of two sections with the criterion "positive+negative"


An additional useful option would be the implementation suggested by Candid in the form of sequences of counts with dynamics of % ratio change over time.
And quite well, if it is possible to obtain distribution of this sequence with display of maximum and specified sigmas (by default 2 sigmas)
(possibility to specify sigmas to fractional parts is necessary)


Since the obtained data will be used to collect statistics, it is unlikely that the script will be used regularly (the indicator may also be useful in everyday life
)

work), so if there is a possibility to transfer all obtained data e.g. to Excel for saving and analysis, it would be very convenient.

If it is not a significant difficulty, then it is possible to envisage setting range and step of the channel width in parameters of the script in order to get at once a set
(sequence) of the above data for various input conditions (channel size in pips). This will allow obtaining a set of statistical data applicable
to the currency pair in question to be used in the TS.


In order not to mindlessly set the width (range) of the channel (set of ranges), I suggest we need the following values:

- The average statistical value of the bar. The TFS indicator can correctly draw a segment at least on the adjacent bars (but not on one bar, because we don't know the sequence of contacting
with the channel borders (it's if without an Expert Advisor)). For this purpose, we should choose the channel width close to the maximum value of the TF bar. Therefore, to complete the picture, it would be good to get
distribution of bar values (in points) for a given TF.

- Statistics with distribution by ZigZag segments. It is important! It will be necessary to determine the channel width in the predominantly flat pairs.

A similar option with transfer to Excel is of course welcome.


Outputs.

At first glance it may seem that the data obtained using the indicator and the script will be somewhat "subjective", since the differences between "positive" and "negative" trades
i.e. flat and trend are set by external (subjective) conditions. However the set of such data (under changing of input conditions) allows to talk about the existence of some dependence
(trend, etc.) concerning the pair in question. our task is to detect this dependence. The identified dependencies can be used as trading conditions (or filters) in the TS.
 
Xadviser

I think there is one pitfall. You use ZZ, but the thing is that it is good on history, but at time t=0. i.e., when TS should work = make a decision, it is a completely different indicator. And all the statistics collected without taking into account this factor, will crumble like a house of cards unfortunately.

 
Prival:

I think there is one pitfall.

I am, in fact, very confused by this point too. So, we will get statistics, but how do we use them?

We know how much a trend takes, how much a flat, how much money we would hypothetically earn if we knew the moments of transition from one state to another. So?

What would the "trading conditions (or filters)" look like (specifically, with formulas)?


Taking away 2 channels is certainly better than counting earnings by ZigZags extremes, but that doesn't seem to be enough to me. Determining the moment of "fixing" a top is only possible with a significant delay.


I have no problem writing an indicator/script, just that I need to understand why I'm doing it =)

 
Prival:

I think there is one pitfall. You use ZZ, but the thing is that on history it is good, but at time t=0. i.e. when TS should work = make a decision it is a completely different indicator. And all collected statistics without taking into account this factor, will crumble like a house of cards unfortunately.

I am describing an OTHER indicator. Fig. 1 shows ZigZag with its channels and TFS-trend flat segments (marked with green, red and white lines). Do not be confused by the phrase where it says "we open Buy and Sell trades". It is not about a trading system, but about the way of gathering statistical information. No decisions are made in this case. The statistics just shows (at least from what has been done) that if we had worked on a certain pair with set more favorable parameters at a certain interval to break the channel with statistical advantage (i.e. we had statistics that there are more trend segments than flat ones) we would have got profit in the output. I am not claiming that the trend will not change in the near term or any other period of time, but as they say: "Statistics is a stubborn thing".
 
komposter:

I'm actually very confused by this point too. So, we'll get statistics, but how do we use it?

To begin with, what are statistics for in the first place? Statistics is a way of studying a phenomenon and/or its properties. For example, we know that a closed electric current creates a magnetic field which interacts with another electric magnetic field. This property manifests itself regularly, eventually using it, the WAY, we get an electric motor - i.e. a benefit. Precipitation is another matter. This property of the atmosphere does not appear regularly. In order to determine the signs of precipitation, statistical data (temperature, pressure, wind direction, time of the year, animal behaviour etc.) were collected, on the basis of which a Prediction could be made. After all, this is how it is issued: "Probability of precipitation about 70%". I am not going to get into a long story here, it's pretty clear. It's the way we're trying to study the market. I think that is much more important than searching for combinations of various indicators. The market reveals itself through its characteristics, which can be studied due to the existing history and then applied in work. I searched a lot, but I didn't find almost any materials about market statistics, which is surprising, because it seems obvious to me. In this regard MT4 is unique because it allows applying automation for studying the subject and then writing . After all, man, due to his mental properties, and I am no exception, always sees what he wants to see, for which his life is kicked in the head (not only in Forex). But you can't scroll through life in the tester, only bitter experience. And the history of currency pairs is possible, so why not do it?

We know how much a trend is taking, how much a flat, how much we would hypothetically earn, if we knew the moments of transition from one state to the other. So what?

We, in this variant, don't need to know the moments of transition. We REMEMBER them. But before we ask them, we study what are the optimum ones. (if I understand the question correctly).

What will the "trading conditions (or filters)" look like (specifically, with formulas)?

Trading conditions can be formulated after data collection. So that something (data) can be collated. (See weather option).

Taking away 2 channels is certainly better than counting earnings at ZigZags extremums but it does not seem to me to be enough. It is possible to determine the moment of "fixing" the top only with a significant delay.

To be honest, I didn't really understand the question (if there was one). We don't define the moment of peak fixing in any way. We work from the boundaries (one to the other) of the channels.

It's not difficult for me to write an indicator/script, only I need to understand why I do it =)

To study what you are going to work with (if you are going to).

 
Xadviser:

Trading conditions can be formulated after the data have been collected. So that something (data) can be compared. (see the weather option).

OK, I see. So, for now, there is only the assumption that once the statistics have been collected, some conclusions can be drawn. Is there any basis for that? ;)

That's what I'm asking - everyone is trying to find, approach it from completely different angles, pulling up the scientific basis, ... But the result?


Why this particular statistic and how will it help to make the forecast more accurate?
Suppose there is such-and-such data (provide specific figures for our report). What do we do next?
Or is there no "next" yet? I.e. poking, trying and believing in luck? ;)

 
Prival:
Xadviser

I think there is one pitfall. You use ZZ, but the thing is that it is good on history, but at time t=0. i.e., when TS should work = make a decision, it is a completely different indicator. And all the statistics collected without taking into account this factor, will crumble like a house of cards unfortunately.

The same I can say for most indicators, if not all - one thing is beautiful pictures on the history, and circled entry and exit points (beginning and end of a trend) - and quite another thing is the real trading ...
 
komposter:

OK, I see. So, for now, there is only the assumption that once the statistics have been collected, some conclusions can be drawn. Is there any basis for that? ;)

Everyone has his/her own understanding and vision of the market and (attention, it is important!) the processes it reflects (we do not see the processes themselves, or rather we do not see the causes and conditions behind them. Like with the weather, we now know that the cause of rain is the concentration of humidity in the atmosphere and as a result it will rain. Note that we cannot see or measure the phenomena in the sky, but can judge about the upcoming event by indirect signs). That does not mean that I do not speculate on them (I told you about my TS), but perhaps the results will lead us to even more interesting conclusions, and after that to decisions. For me it was a big revelation, the data that have already been obtained (but they need to be systematized). Moreover, I still do not believe in them, so I am asking you to approach the issue under study carefully and double-check the obtained data. I cannot (I can, but then why MT4 ;)) check everything by hand. And you yourself started about the Grail ;)

That is what I am asking - everybody is trying to find it, they are approaching it from absolutely different angles, they are trying to improve the scientific basis. And the result?

And what are the different sides? I told you that I have not seen similar studies. It's true, an article appeared Market Pulse Diagnostics, where there is an attempt to cover something similar. This (statistics) is the scientific basis. (read "Control" by V. Suvorov?) Perhaps there are other approaches, but I am a supporter of simplicity and the fact that what we are talking about can be measured and calculated. Result.... I don't know, as I haven't seen the materials and consequently the conclusions. Perhaps whoever conducted them and made the conclusions came to the decision to keep them to themselves.... Yes, I see myself as having two tasks - to find (first search ;)) and get confirmation (refutation) of the result.

Why this particular statistic and how will it help to make the prediction more accurate?

This one, because it is accessible and understandable. What else could it be? Bar size distribution, ZigZag segment size distribution (with variable parameters), TFS distribution (with variable parameters). Everything seems to be on the surface (except the last one), but for some reason no one has done it (or has done it, but they keep quiet).

I didn't say forecast (unless it's the weather), rather it will be trading conditions. More precisely - the statistical data will "help" us get the part of confidence (more than 50%, and maybe even more), that the trading conditions we have developed will be acceptable for successful trading.

Let's assume that we have such-and-such data (provide specific figures in our report). What do we do next?

I can do that, but what's the point? It is like looking into the sky and deciding if it will rain or not. If I look at the thermometer, barometer, moisture meter, etc. then I will decide whether to take an umbrella or not. After all, even in order to make a decision about trading conditions, you have to collect data beforehand. Or do you think you won't need it?

Off-topic question: What time zone do you live in?

 

OK, you're on.)
I'll do it tomorrow.


I live in GMT +2 - Kiev, Ukraine.

 

A little more to the point. You can really measure a lot of things. For example, you can use an indicator such as Stochastic. Has anyone decided to count the amount of losing and profitable deals by its "signals"? If they did, they would have come to the conclusion long ago that the 50/50 split decision is not quite acceptable in trading. But what if we had calculated the number of transitions from the specified levels in the ratio to the number of crossings of these levels? The statistics will show in what respect this method of signal interpretation would be useful in the trading system. As an example in the picture.



Has anyone checked it? I'm not claiming it would work in terms of indicator "performance". I do not use any indicators myself due to their incorrect display. But it is an option to work out the statistics. And what will be the effective amount of deals with the specified parameters on the given timeframe? Most people, especially at the beginning, see only what they want to see and go straight to the fight. And only their own wallet begins to teach them (although even this does not work for some people ;))