The perfect filter - page 9

 
The point is that market orders are derivatives of limit orders. That is, there are actually only limit orders. But that's all chatter. Of course, my experience is more modest, so probably wrong.
 

I can make cosmetic comments on the code. I can add some cosmetic comments to the code.

1) Indicator totalizer should be separate from the actual filter it calculates. It is not kosher to mix them. To put such an indicator on any filter and see how it performs.

2) Summing should be implemented separately as a class or function, so as not to multiply buffers.

3) The implementation of the algorithm is quite strange, in my case it is quite simple, in your case 10 buffers is an ahtung. 1 buffer should be for viewing only, the rest into a function.

4) What hrenfx advised you, knees count from bid andask BP, take away the commit and average slippage on a given pair if its MO is different from zero.

 
hrenfx:

Please don't be offended, but be understanding:

OK, if you're comfortable with that.

J.B:

Thank you, I read it, it's very interesting. The author has searched for exactly what I am looking for, i.e. to find a way to test the indicators against "ideal", unfortunately, I have not found the solution so far, I have not seen it in the abovementioned topic of MQL4 forum.

My intuition prompts me to generate entry and exit points with the indicator and compare them with ideal ones generated by ZigZag. The main question is the comparison criterion. How to compare two time series in this context?

Minimize the sum of the element differences? x1-y1 +...+xn-yn But entry/exit points of different strategies may have different density and besides we should take into account accuracy of bar hitting, for that initial BPs shall be compared by fuzzy algorithms, for that from technical point of view initial BPs shall be filtered by Gauss, blur borders and calculate difference of elements >0 only or some threshold.

And still I came to a conclusion, that a pureZigZag does not show ideal inputs/outputs, it is necessary to take a ZigZag from a double SMA of a small period shifted by half a period backwards. The thing is that pure ZigZag catches completely unreal places, which can not be calculatedin any way, statistical fluctuations, spikes and the like, it makes no sense to follow up on such points because they are meaningless.

I have an idea concerning the criterion of "ideality" of the indicator:

(SUM((price-Filter),N)*SUM(boolReverse,N))/N>>0;

That is the difference between the filter and initial BP (for example price) is summed at a certain area of N bars and the number of turning points is calculated at the same area, the product of these values must decrease to 0. Logically it means that the filter repeats the initial BP most of all but it is "smooth" as the number of reversals is minimal.

This criterion has disadvantages, for example if filter=price, we can take not product but square of sum, or just sum. In general, the idea should be clear.


 
hrenfx:

The quality of execution depends on many factors. Your filter check is based on a "channel" strategy, i.e. it is implemented via limiters that slide exclusively to the plus side, but are also sometimes rejcted. Since the answer to this question directly and significantly affects trading results, I studied the subject a little, I even offered some ideas.

To sum it up: in case of FXOPEN ECN you can assume that BP slippage is a zero constant, and there are no rebates. I.e. consider only the only trading cost - commission.

Dima_S:

Here are slippage statistics for FXOpen - from real account, 0.3 lot, number of trades for each symbol - about 20 on average, except EURAUD.


Wonderful! The prospects are bright, even on such a simple principle.

m.butya:


You (Second) as a beginner, of course, may use indicators at the beginning, but it is a transitional stage until you learn to do without them. I mean all these filters like JJMA and the like to use as a base for strategy building is a perversion. They are just for show and tell for beginners. The main thing is not to get stuck in it, the subject of "perfect filter" hints at this kind of stuckness. It's dangerous, you can get stuck as a beginner for a long time.

Pivot points in trends of any order, calculated by a combination of pattern recognizers, in principle, one filter + a signal calculator, logically we can reduce it to one pattern, but firstly it makes no sense, and secondly these patterns should be constantly updated with new data, we will have to dozens of filters to get closer to the right logic, which will lead to confusion. So, filter but remember that this is just fun.

ZZY: About "zero" slippage and other you have to learn yourself in practice, you can not learn about it on the forum, it is learned only through an adequate drain. But if you emphasize the main factor, it's how long the capital will be enough to bear long spikes and all sorts of "spikes" that you are filtering out now in order not to close frequently with a loss or Kolyan, then the fact that in real trading the guys from DC just like you approximately know where people will place orders and expand the bid ask there, it is the same creative work for them as you do when creating TS. I'm not saying it's an insurmountable obstacle, but you have to understand that the "grail" is a very temporary phenomenon and certainly cannot be built on a filter(s), or rather it's complicated and redundant.

Yes, I'm a beginner and I'm having fun with filters. I don't know how to use patterns yet, if you mean candlestick patterns like "head and shoulders", "inside bar", "hung", etc. I'm not intuitively motivated to do it. It smells a bit like paganism (IMHO). Just exactly the pattern algorithms are "redundant", that is it's enumeration and comparison of a heap of figures, which number can be "reduced" (in mathematical sense) hundreds times probably (IMHO), but then it all comes down to simple filtering, well maybe a little more than simple, but it's not enumeration of hundreds of mysterious figures. To be honest, I am not sure if these "classic" candlestick patterns are still effective; it is also not clear at what scale they work and at what they do not, and there are a lot of questions. But most importantly, I don't understand the reason why a complicated candlestick pattern should predict anything. What is it based on? I read J.Schwager's TA The Complete Course and some other books, at first I simply accumulated information as it is, but I gradually got the strong feeling that all those "shapes", "patterns" and other complex structures are too much.

This is dynamic chaos, purely intuitively I am against "memory" of complex structures in this context, there is no reason for it (IMHO at the moment). It is like Brownian motion, there is only instantaneous momentum and disorderly vectors of forces changing this momentum in time, the only difference is that in case of TWR, vectors of forces are not quite disordered, they seem to me to have a fractal structure, which can be decomposed into components and then calculated the uneven probability density of these "forces" for the nearest future. "Nearest" means up to the moment of momentum change, for example if there is a football game and we predict a ball trajectory, then it is logical that it can be predicted quite reliably from kick to kick of a person on it, as soon as there is a sharp change of direction, the trajectory is calculated again, the previous history has no sense, only last kick to the ball. Basically something like this... We don't know the players' positions and tactics, we only see the ball. I think that's the most accurate way of predicting under these conditions. Predicting where the ball will be after the 2nd shot is a bad idea, as well as taking into account the "magic ties" of the previous pulses. The prediction horizon is small. But still, it might be enough to make a profit if you get on and off the tram in time, it seems to me.

gunia:

I can make some cosmetic comments on the code. But so far your code is a mess, even though the resulting curve seems to be true.

1) Indicator totalizer should be separate from the filter it calculates. It is not kosher to mix them. To put such an indicator on any filter and see how it works.

2) Summing should be implemented separately as a class or function, so as not to multiply buffers.

3) The algorithm is strange, it is quite simple in my case, while your implementation of 10 buffers is nuts. 1 buffer should be for viewing only, the rest into a function.

4) What hrenfx advised you, knees count from bid andask BP, take away the commit and average slippage on a given pair if its MO is different from zero.

I will try to make owls and indices, it's just a test of an idea so I apologize for sloppy action.

lucky_teapot:

If you like it that way.

I have an idea concerning the criterion of "ideality" of the indicator:

(SUM((price-Filter),N)*SUM(boolReverse,N))/N>>>0;

That is the difference between the filter and initial BP (for example price) is summed at a certain area of N bars and the number of turning points is calculated at the same area, the product of these values must decrease to 0. Logically it means that the filter repeats the initial BP most of all but it is "smooth" as the number of reversals is minimal.

This criterion has disadvantages, for example if filter=price, we can take not product but square of sum, or just sum. In general, the idea should be clear.


A wonderful idea, given its simplicity, thank you!

 
J.B:
It's like a Brownian motion... like if there's a game of football going on and we predict the trajectory of the ball...

The analogy with football and Brownian motion is wrong. It's not physics.

 
m.butya:

The analogy with football and Brownian motion is wrong. It is not physics.

Still some analogy is needed, otherwise arbitrary enumeration in an infinite algorithmic space has no chance of success. The Brownian motion and football are not my exclusive, for example Mr. Achmad Hidayat bases many experts on physics. And generally physicists are not simply retrained as analysts in foundations (quanta etc), physicists and mathematicians are more promising for such research than economists. There must be a reason for that, although I could be wrong, it's just a... lyrical digression.

If you say "it's not physics", then what do you think "it" is?

 
J.B:

...

If you say "it's not physics", then what is "it", in your opinion?

Chaotic unpredictable. The challenge is to learn how to profit from it. )))
 

A simple comparison of the current price with the average price over the daily period. If the price has fallen under the self-adjusting CMA, then sell on the pull-up. Works on any period.

https://charts.mql5.com/1/537/usdchfd-m1-straighthold-investment-group.png

Well, and the tick volume should be watched. If the bar of a currency is higher than the bar of another currency this is confirmation. Or as they say here "filter".

 
J.B:

Still some analogy is needed, otherwise arbitrary enumeration in an infinite algorithmic space has no chance of success. The Brownian motion and football are not my exclusive, for example Mr. Achmad Hidayat bases many experts on physics. And in general physicists are not simply retrained as analysts in foundations (quantum etc), physicists and mathematicians are more promising for such research than economists. There must be a reason for that, although I could be wrong, it's just a... lyrical digression.

If you say "it's not physics", then what is "it", in your opinion?

Read Lecturing_Birds_on_Flying. Taleb also philosophises well on "this" subject. And in general it is inexpressible in words like Tao)) Just realized it and it has already changed.
 
tol64:
Chaotic unpredictable. The challenge is to learn how to profit from it. )))
m.butya:
Read Lecturing_Birds_on_Flying. Taleb also philosophizes well on "this" subject. In general it is inexpressible in words like Tao.) Just got it and it's already changed.

With all due respect, but I'm against "chaotic unpredictable", "DAO" and other references to mystery and unpredictability. Such a model is like no model, no model model, etc. And that would mean complete equality in NOT earning for all marathon participants. Is this the case in practice? NO! So there is a model with profitable MO. Which means the market is not so unpredictable. What to say about it, if on the elementary above algorithm there is a stable profit in pips, even on the maximum 2 old pips of spread.

So far I see only 2 types of algorithms purely practically, inertial and oscillatory. The rest are either alchemy, or even a scam. In other words, there is quite a specific model. Naturally, it outputs only probabilities, but these probabilities are quite specific and predictable. Otherwise there would be no point in doing it at all. Maybe if we understand "chaotic unpredictable" in terms of "female logic" then it is kind of true, i.e. it is true for some people for others not, consperology, differentiation depending on social status, etc., but I don't think so, sorry. If something is true, it is true for everyone or no one. And if someone is mowing billions, then it's still true, so you just have to model it correctly.

iTC:

A simple comparison of the current price with the average price for the daily period. If the price has fallen under the self-adaptive AMA, then you should sell on the pull-up. Works on any period.

https://charts.mql5.com/1/537/usdchfd-m1-straighthold-investment-group.png

Well, and the tick volume should be watched. If the bar of a currency is higher than the bar of another currency this is confirmation. Or as they say here "filter".

This is my classification of an oscillating strategy, "channel strategy" as some call it. Obviously, a lot depends on how you calculate the MO in relation to which deviation is calculated and therefore the channel edge, bounce or breakout etc.

Agree that oscillation with respect to the MO is only true for a flat, after a "break" of the channel boundary the probability of a "quantum jump" increases dramatically. This is very similar to electron orbits, which are discrete.