The perfect filter

 

Hello ladies and gentlemen.

I'm definitely green, so don't mock me.

I'm going to take a scientific approach. To do this I need to collect statistics. For starters simple ones, such as statistics on trends, flops, and their scale characteristics. To do this we need to filter price with a non-lagging (two-way) filter and then calculate the amount of time derivative has been in the angle in a given range.

You need a perfect filter. Which one would you advise?

 
J.B: You need the perfect filter. What do you recommend?

The best way to find the "perfect filter" is to come up with one yourself. Because no one but you will be able to think through all the parameters of the filter you need, the rules of its operation, the evaluation of the results, etc., taking into account your goals.

If you are offered a choice of variants, you will have to adapt to someone else's rules.

 
Perhaps a zigzag would suit you.
 
J.B:

You need the perfect filter. What do you recommend?

The perfect filter is the one that perfectly meets the given requirements.

Formalise the requirements )

 

Firstly, thank you to everyone who responded.

sandex:

Maybe a zigzag will suit you.

I plan to use the zigzag to get distribution statistics, the "most profitable" potential entry/exit points, if taken from the fast EMA. On a pure price zigzag is very optimistic and anti-realistic IMHO. By its nature the zigzag waits for the change threshold, no matter how long and how it occurred, i.e. it ignores the flat and the internal dynamics. Probably it will need a separate topic for that, because there are also many questions and it diverges from this one.

Yedelkin:

The best way to find the "perfect filter" is to come up with one yourself. Because no one but you, taking into account your goals, will be able to think through all the parameters of the filter you need, rules of its work, evaluation of results, etc.

If you are offered a choice of variants, you will have to adapt to someone else's rules.

This is what I do, voicing my thoughts out loud, who knows, maybe someone will be generous, correct me, or suggest a direction.

The goal is a script that will collect statistics of trends/floats, categorising them by scale and intensity. In order to obtain statistics of distribution of trends and flutes broken down into categories depending on scale (noise threshold) and "steepness" (average tangent angle) when applied to the price series.

The way I logically see the problem statement. The price series is filtered by a double-sided filter, e.g. double SMA shifted by a period backwards, double to get "smoothness", then we calculate the difference of neighboring points, multiply by some coefficient and get the measure of tangent slope, let's call it "D".

Then we look for the areas whereD is within a certain range, low values mean flat, medium and high values mean trend, extremely high values mean black swans. We sum up the amount of time for each range divided by the total time, multiplied by 100 and get the statistics in %. That's a plan as I see it, or rather one of the most likely thoughts about it, for sure it hasn't occurred to me for the first time and someone tried it long ago, will take pity on the green and say that a silly plan, it won't work, so and so and so... Or vice versa, they will say that I'm on the right track. That someone will give you a ready-made algorithm or script that does such work, I'm not even counting on, laziness can not be encouraged.

TheXpert:

The ideal filter is the one that perfectly meets the given requirements.

Formalize the requirements.)

Parameters:

1)Scale(noise threshold).

2)Range of "steepness".

Output - % of time the market stays in such "state".

It is possible to add an indicator that will colour the price series depending on D range, in order to understand "by eye" the adequacy of statistics collection.

PS: It seems that double SMA is a good candidate to be an "ideal filter" in the context of this problem. But we still need to experiment. This is the simplest type of statistics on the market so far and perhaps the solution should be simple. When we get to more ornate patterns recognition we will make it more difficult.

 

It is true what participants said above that what you are asking here, subjective, and to the taste and colour of the participants is not.

My choice is also ZigZag(with some modifications), about what you wrote about its inability to detect flats - nonsense. The ratio of the price height between the knees (sorry....) to the time horizontal, between them, also gives you a market characteristic, cutting out noise, more informative than the MA. But that's all just on history, for statistics.

 
J.B......Target is a script that will collect statistics of trends/floats, breaking them down by scale and intensity categories. In order to overlay on the price series, the output will be statistics of distribution of trends and flutes, categorized according to scale (noise threshold) and "steepness" (average tangent angle).

If you want to have quantitative characteristics of these states over a period of time, and even assign the degree of "steepness" - then define what is a trend/flit + criteria for finding points to determine the angle + some different for analysis of statistical data and post the TOR - they will do for money in the best way / as an option /...

For me the historical data won't help in trading ... what good is it if yesterday (today) there were 25 trends and 47 flat areas on the pair in m15 timeframe, half of which are "really good"? If we analyze the data about the size of the trend, the flat, the saw during the period, it allows us to set goal levels, but again, there is no universal tool to timely detect a trend reversal, because when the trend is identified, it has already passed part of the way and rising following the trend it is an attempt to get on the "departing train" ... The question is how many stations it has left to go.

 
J.B:

and say it's a stupid plan, it won't work because this and that...

The plan is simply unrealistic, not in the sense that it's unrealizable... The premise of the problem statement is false. The very notion of "statistics" as a scientific research tool does not mesh with the amount of reliable information available in historical market data.
 
Wangelys:
The plan is simply unrealistic, not in the sense of being unrealistic... The premise of the problem statement is false. The very notion of 'statistics' as a scientific research tool does not mesh with the amount of reliable information that is available in historical market data.

Can you clarify what was said please?

I am not referring to the topicstarter's vague goals, but to a generalisation about the inconsistency between statistics and "reliable information". Do you think that statistical methods are wrong?

In other words, the probability distribution is arbitrarily non-functional, and any generalisation of sets of data, does not carry valuable information.

Welcome to the casino then! Welcome to the club! Kamonochka euribatochka))))))))))

 
gunia:

Can you clarify what was said please?

I am not referring to the topicstarter's vague goals, but to a generalisation about the inconsistency between statistics and "reliable information". Do you think that statistical methods are wrong?

In other words, the probability distribution is arbitrarily non-functional, and any generalisation of sets of data, does not carry valuable information.

Welcome to the casino then! Welcome to the club! Kamonochka euribatochka))))))))))

I thought I made myself clear ... Statistical methods are a good thing, but they are not applicable to Forex, there is very little raw data for statistics, and even less reliable data. To be more precise, statistical methods can be applied, but in this situation it will be an illusion of a scientific approach with false results. If you don't agree with what I say, you can check my rightness (or wrongness)... Either read something serious about statistical methods, or, if that's too much trouble, do a practical experiment from the "classics of the genre" with a coin.
 
Wangelys:
I thought I made myself clear ... Statistical methods - a good thing, but they are not applicable to Forex, very little raw data for statistics, and the validity of the data, even less. To be more precise, statistical methods can be applied, but in this situation it will be an illusion of a scientific approach with false results. If you don't agree with what I say, you can check my rightness (or wrongness)... Either read something serious about statistical methods, or, if that's too much trouble, do a practical experiment from the "classics of the genre" with a coin.

I agree and disagree, at the same time, it's just not clear what your point is.

What kind of data is not enough? How much would be sufficient? Price, volume, Level2, etc.

What is "reliable" data?

Please provide us with a concrete statement from a "serious" work, which proves that there are limits to the selection of data for statistical analysis. Especially interesting about "reliability".

P.S. I just want to understand what you mean.

Reason: