a trading strategy based on Elliott Wave Theory - page 83

 
Rosh 12.07.06 16:04
which option do you suggest? I see 3 immediate challenges at the moment.
1. Run the script on history and build an indicator of the number of channels on each bar (will depend on depth of search )
2. --//---- and build an indicator of average likelihood (oscillator type), - will depend on the number of channels and/or depth of search.
3. Build swings on the history (on the diaries) and build channels on them. In these channels analyze various characteristics for the identification of the stability criterion.

General considerations:
1) the shorter the channel - the less RMS/(RMS23) it will have, but at the same time, the higher probability of channel failure.
2) You need a criterion for fixing the left border of the channel
3) You need a criterion for breaking the channel (I think there is one)

Frankly speaking, I'm at a crossroads: either to create an Expert Advisor for a tester (because only it allows us to judge hypotheses according to results) or to go deep into research of objects called "channels" (by the way, I remember a parallel between channels and fractals was once flashed by Vladislav in this thread). Of course, it would be more correct to begin with the first ("first money, then fun" as they say :) ).
That is, I completely agree with your plan, if I reword it as "if you don't know what to do, you have to do something" :). By the way, what do you understand by swinging?
I have already implemented the primitive procedure to follow the channels, now it's time to introduce Student's tester (I think intervals must be built according to it) and the indicator may be considered suitable for use. Then I must try to fine-tune Murray so that after the historical run one could see some levels on the chart.
As for general considerations - connection of lifetime and RMS does look obvious, maybe when we consider total probability as weighted sum over all channels, the weight should be just a function of RMS and actual lifetime of the channel (i.e. left border). For the time being, I took the break in the channel to be beyond 5 RMS (it is considered that price usually goes back to the channel boundary after the break and that the total move after the break is approximately equal to the channel width). That is, I have specified two validity levels: 1 to 2.5 RMS and 0 to 5 RMS
 
2 Rosh
So far, here is the calculation of Kinetic Energy. Next are Potential and Hamiltonian fluctuations, then we will see. There is also solandr's parabola check, but all these things are technically simple. When I run out of simple variants, I'll move on to complex ones.

Right. My agenda is a bit shorter, but about energy I completely agree with you.
Mass for kinetic energy equals 1 , as for potential energy.

Now, that's debatable. But, one way or another, we have to dig :-)
 
2 Candid
Your algorithm, explicitly or implicitly, assumes that at any time the market can be described by a fixed number of parameters (3-4 channels), and you should recalculate them only in case of a clear mismatch (breakdown). If at that moment in time the market really contains, for example, 5 channels, not taking into account one of them will lead to incorrect estimations of probabilities.

You have understood me quite correctly. However, I didn't say that these are ALL parameters (or rather channels).
Build one channel each for M30, H4 and D1 - that's 3 channels for you. But that doesn't mean there isn't a channel on W1. Nevertheless, do you need one if you play on hourly trends?

For a system like the market you will never find ALL the parameters. I borrowed a great idea from Vladislav: don't collect all possibilities, select only the most probable ones. Using channel confidence intervals this can be done very successfully. You only need to identify the main channels FOR YOUR game.
 
Hamiltonian in a potential field=m*G*h+m*V^2/2=const.
Then G*h+V^2/2=const/m=const2. Therefore, the value of mass is irrelevant (that's how buttery it is). Or to put it another way, both potential and kinetic energies are directly and equally proportional to mass.

According to the idea (it occurred to me), I had to equate the difference in Potential energy in motion in the channel to the difference in Kinetic energy, and thus obtain the necessary multiplier. This variant could be checked but now it is too late (the code was left at work). And the algorithm for calculating energies in the channel is the opposite. I have to turn it upside down.
 
No, it won't work. The energy I counted in a normalized way (the sum of energies divided by the number of bars), but here I need to somehow accompany the energy. That is, the graph of energy in each point is a characteristic of the channel as a whole, and it cannot be divided into parts.
We need another algorithm, which I do not know yet.
 
2 Rosh
I wasn't referring to the arithmetic of physics, but to something else.
From my point of view, the law of conservation of energy cannot be used here. It is only valid for closed systems, and market is a very open system. First of all, there are constant disturbances from the economy, politics, etc. Every piece of news that comes in is energy injected into or withdrawn from the system. In fact, every trend is a process of dissipation of such energy momentum.
Secondly, mass is continuously changing. In this case I am referring to the monetary mass. And you know what happens to crosses when money flows from one currency to another - everyone does.

Using the Hamilton function is a great idea. But you can not (because of non-conservation of energy) get a stationary equation from it, but only a dynamic one with second derivatives (i.e. accelerations) and forces. What to do with it in a stochastic process I do not know. So if we are going to use it, we should use it in some other way. Perhaps, as Vladislav did, in integral form.
 
A picture to remember

 
Seems to have completely stabilised the indicator algorithm. The last problem is finding a large number of channels next to each other.
I cannot yet formalise the selection of only one of them - 307,326,329 bars. Solandr simply rejects channels multiple of two. But in this case we have a channel with 436 bars.



After 15 min, we see that the three disputed channels are out, and the long channel just stays

 
Allow me to join. The day before yesterday I came across a branch, and felt sad that I had not come across it earlier. Same it is necessary to disguise such subject under EWA.
First, as always, thanks and gratitude. I take my hat off to Vladislav, although it was taken off back in 2004 when I first came across his ideas about the market, I don’t really remember on which forum. Then I saved it under Vladislav's slogan "Don't go with the flow, don't go against ..." Since this is directly related to the subject of discussion, I will allow myself to post it here (text below) - judging by this thread and the statement in the Empire style, Vladislav, if he has not sailed yet where he NEEDED, it is very close to this - which I am very happy about.
Also great gratitude to solandr y - without his inquisitiveness, the topic is unlikely to have developed and perhaps we would never have learned about the principles of Vladislav's method. Just like the dialogues of Socrates and Plato turned out - it was very interesting to read. I am very grateful to everyone who joined the topic and active development and discussion.
Now on topic. Unfortunately, for the time being I only remember matstat, I am not strong in programming and generally far from the level to which the majority managed to advance here, so I ask you to treat my reasoning and questions with understanding.
Totally agree with Yurixx
1. Building channels according to a separate, stable algorithm. This means that a relatively small shift in history should not lead to channel changes. 2. …
.
Since at the moment I came to building several channels and using the intersection of lines (borders) to find the zone of least risk, I only use the Andrews pitchfork for this, and they are resistant to the latest price movements, due to the fact that they are built on extreme points, then the starting point to build channels, in my opinion, there should be not the last bar, but possibly the last extremum, the current bar, or rather the last bars up to the current one, should simply be a check for the integrity of the channel, that is, if the last bars have not gone beyond the confidence interval . At the same time, it would probably be nice if the extremums were either at the boundaries of confidence intervals or on the line, then the channels would be similar to either trend lines or Andrews' pitchforks, but this is so fantasy. In general, I think that it is probably worth optimizing not all channels, that is, they should not be calculated for all bars, but only for extreme bars or nearby ones. are all hypotheses
I didn't understand much of the following. Bulashev, using the example of regression model analysis in relation to the DJ index, considers a detailed algorithm for assessing the adequacy and validity of the regression model. Does everyone use the whole algorithm completely and at what stage, that is, before checking dev<dev23 or after? It seemed to me that they don’t use it at all? (I’ll go to be baptized) I also saw that probability estimates are used that are close to the regression line, which is not correct, since at a certain distance from it there is an area of uncertainty, and in it we cannot know the magnitude of the probability of movement .
Agree with Candida
If, for example, 5 channels really exist in the market at that moment, not taking into account one of them will lead to an incorrect assessment of the probabilities. As for the "notorious" condition :) RMS23>RMS, it looks too harsh. And the point is not that you want more channels (for an intraday game, for example), but just in the above - the possibility of losing a really existing object.
.
In my opinion, it is necessary to consider the channels to the maximum depth of history. It’s just that the price for the longest-term channels for the most part will be just in the zone of uncertainty and, accordingly, it’s not worth taking them into account at these moments, but occasionally the price will reach the borders and at these moments their value is maximum, although this will most likely be stretched over time, that is, the time interval of influence will be adequate to the time interval of the channel.
About potential and kinetic energy. If we compare the price movement between extremes of the same order (say, short-term lows / highs according to L Williams or TD of the same order), then this can be compared with the movements of a pendulum, where the potential energy at the ends is maximum and in the center is minimum, the kinetic energy is vice versa. If we consider the price movement not only within the extremes of one order, but in several, then it is probably possible to take as a model a pendulum with several suspension points located at different heights. Then, apparently, to find the values of potential and kinetic energy, it is adequate to use vector algebra.
Below is the text of Vladislav from 2004
I apologize for my inattention - yesterday I asked to test the codes of a third-party person - they say it is better seen from the outside - and to my amazement I found that trying to correct the algorithm I myself ran into a "bunch of bugs". As compensation - the same customized calculation algorithms, as described above, which do not affect each other. There are 3 indicators according to Demark in the attachment, each of which calculates the trend targets for the lines of the corresponding level (from 1st to 3rd). Hang on the charts from the third to the first - then the lines will be drawn one by one and all will be visible at once. When all targets coincide, more precisely, they are on the same side of the price, then the achievement of the minimum targets in the most remote group is very likely. If you entered a trend and a higher-order line was broken in your direction - adjust your goals in the direction of increasing profit - the probability of achieving is high. If there are troubles - write through the forum - I'll try to fix it.

I will also state my views on Demark methods and how I determine for myself their place in a trading strategy - perhaps it will be useful to someone.

If we consider the price movement as a field - (a field is a function together with its domain of definition - in a mathematical sense), then it is easy
to prove that this field is potentially - on the "fingers" it will look like this: Potential is a field where work (this is a
invariant, and its form is known from a high school physics course, for example) does not depend on the path (on the price chart, this is the trajectory of its movement from point A to point B, and work in this case is your earnings - no matter how much the price moves in different sides, but if you moved on
the same distance from the entry point (no matter in which direction), then no matter which way you got there - the earnings will be the same). This is all limited true - except for margin calls and rollover fees. The fee for transferring a position can be taken into account as dissipation in the system - friction losses, it is piecewise constant and does not play a role within a day, and margin call - as a maximum ceiling for the potential value, for example.

This leads to interesting, in my opinion, conclusions - the price function can be approximated adequately by QUADRATIC functions (that is, the order is not higher than the second), everything else - these will be the errors of the approximation method and the properties of models that do not have a correlation with reality.

Here, of course, positive feedback is not considered - that is, the impact of your rates on the price movement (based on the accuracy of engineering calculations, in order for your rates to make a significant contribution, their size should be comparable to 3-4% of the daily turnover on the market) .

You have probably seen how many "corrections" the Elliotists make to their theory - this is not because the theory is not correct - but this theory gives a qualitative description of the trajectory of movement. What can be practically taken from it (in my opinion) is that with the correct identification of the end of the second wave, you will be sure that the trend will continue, well, if not after the second, then after the fourth - and the point here is not only in the probabilistic approach -( by and large, we can’t talk about it at all until there is a SINGLE-VALUE model - now, if there was a possibility of UNIVERSAL MARKING OF WAVES INVARIANT TO THE RESULT - then it could be considered as some kind of probabilistic mathematical representation, and it turns out that, depending on the result, you need to adjust a model (wave marking) that describes the behavior of a function, which in itself does not make it possible to conduct real statistics and create an adequate model from which the function can be extrapolated - that's it, the circle is closed. It turns out that today you are using a different model than yesterday - they will be similar only qualitatively.Of course, you can build a trading strategy on this, but evaluate it strictly mathematically even and with a probabilistic approach, alas, it will not work.

If we follow a simple path, then to find the extrema of a certain function, you need to calculate the inflection points (math analysis, high school) and
these are the points where the first derivative = 0 or does not exist, and the second is either > 0 or < 0 (maximum minimum). If our function is approximated UNIQUELY by quadratic polynomials (albeit with some error that we don’t know, but we know that there is a “real part” (let’s call it that) and an “error”), then the approximation of the function is MOVING AVERAGES, the first derivative - straight line - the essence - trend lines, and the second derivatives - constants - the essence - support-resistance levels. The moment when the first derivative crosses zero (that is, the sign of the first derivative changes) signals the passage of a potential inflection point.
And the width of the trend channel is the approximation error.

Accordingly, if we approximate (simulate) the movement of a function (change in values with an increase in the argument), calculating
unknown function values from :
1 - known values of the function and
2 - derivatives (1st and 2nd orders)
then we simply dynamically build a Taylor series and someday our idea will become INCORRECT - we will pass the inflection point - on the price chart - a breakdown of the trend line (the first derivative is incorrect - the main change in the function values) or a rebound from the resistance level (the second derivative is incorrect, but it contributes significantly less to the values of the function itself) or both. In this case, the trend (the direction of movement of the function - the change in values) will change and we need to recalculate the derivatives.

What do Elliott's methods give us in this interpretation - we have the opportunity to calculate in advance the point, which we consider the inflection point - with some error, but we will enter the market BEFORE the price reaches our inflection point (and if we also take into account that NOT ANY INNKLE POINT IS GLOBAL EXTREME - there are still local ones (rollbacks), there are also just inflection points that are not extremums - consolidation, then it’s good if the movement potential allows us to transfer the position to breakeven). Here, waiting for ROLLBACKS BEING IN THE MARKET OR WAITING IS INEVITABLE. There is, of course, a tactic that makes it possible to wait
the end of the rollback and enter after (theoretically, but practically how to calculate it?) or simply enter after passing the inflection point - then why know what wave we are in - there is a direction of movement and a calculated target. If you use Fibo levels, they also qualitatively describe the situation - if not there, then somewhere there, and if not, then somewhere in between ..... yes, then that these levels work (albeit qualitatively) also follow from the potentiality of the price field - since the methods of steepest gradient descent (golden sections) work where the trajectory of movement tends to the path of "least resistance" - at the minimum potential), but how to formalize all this unambiguously? how to write an ALGORITHM? THAT IS A SEQUENCE OF UNIQUELY INTERPRETED ACTIONS that can be performed. All this is difficult and most importantly ambiguous. So traders are looking for some models that confirm or refute the markup. I will note right away - this is not my negative attitude towards Elliott's methods - I just prefer something more definite and algorithmic.

DeMark's methods make it possible to UNIQUELY construct derivatives - the essence of trend lines - whether they are good or bad, these lines, is another matter - they are unambiguous - INVARIANT TO THE RESULT - they do not need to be rebuilt and, if necessary, can be improved. Question how? - not difficult enough: When solving equations or calculating the value of a function, if you know that this function is calculated with an error, there are methods to reduce the error, for example, by calculating the same function value using DIFFERENT APPROXIMATION METHODS - each method has its own "error" and "real" part and filtering some calculations by others
makes it possible to calculate this real part with a higher probability.
By the way, the methods of digital filtering and spectral analysis (Finvare and others like them) are aimed precisely at revealing the ratio - the "true" part and the "error" (the names are conditional).
Stochastic itself approximates the change in the first derivative - that is, the second one, and is NOT SUITABLE for INDEPENDENT ANALYSIS
- that's where the troubles come from - to separate the trend from the non-trend. If you take into account its readings only at the moment of changing direction
movements of the FIRST DERIVATIVE - a breakdown of the previously drawn trend line - here it is in place. Use it to confirm signals at the moment of trend line breakouts, just like MACD and OCMA. Better yet, choose your own set of filters - comfortable for you.
Regarding divergences, the classic signal itself is countertrend and trading ONLY ON DIVERSE is less profitable than on
trend.
Hidden divergence signals the continuation of the trend, but the signal should not be used by itself - it is better to make sure that you have passed
inflection point.
How can you use divers - everything is very simple to correlate with Elliott patterns - if you define the third wave - putting it in
correspondence extreme values of derivatives (as in AGET, for example) - it turns out that MACD (or OSMA, although this is a separate conversation) grows (falls) most quickly, then on the fifth wave the growth will be less - accordingly, on the fifth wave, if new (or at least the same) levels as on the third one, then the values of the indicators of the previous levels will not reach - I will note not all indicators, but approximating the 1st derivative (MACD in this case), and if the second one (OSMA), then it is almost an exact hit, just in this place the divergence signals a possible inflection point, and Elliott's theory about a possible trend change or the beginning of a corrective movement with "sufficient" movement potential for making money, but it is still preferable to wait for the inflection point to pass - a breakdown of the trend line - that is changes in both the first derivative and the function itself. This usually means that our "old" idea of the behavior of the function is incorrect and needs to be changed, but since there are only two of them (representations of the behavior of the function) (three if flats are taken into account), then it is definitely the opposite if it is defined or just wait for the moment, when it is determined, it is being out of the market, for example, when consolidation zones are formed upon reaching the calculated trend targets.

Accordingly, when you enter AFTER THE INVERSE POINT, in large cases you run the risk of being OUTSIDE the market and losing a profitable trade when
placing a LIMIT order than when placing a stop or market order.
No wonder the breakdown systems are so tenacious - they still have a certain potential.
Conclusion - when you get into the overbought / sold zones, you can simply "pull" the stop order behind the significant Demark lines (this is if the first breakdown qualifier is performed - the closing price squats up before the breakdown and back down) or if the first qualifier is not fulfilled - remove a stop order and enter from the market if the second one is executed - that is, the closing of the previous bar with a breakout and the opening of the current bar with a breakout - let me remind you not of any TD line, but only of the DROPPING UPPER and ASCENDING LOWER. Plus confirmation from your filters.

And then either increase the position or how - to each his own.

Actually, this all sounds much more complicated than it really is.
All of the above is a personal point of view and is not a subject for controversy. If anyone comes in handy for building their strategies - I will only be happy.

Yes, and do not believe anyone (including me), check everything yourself.

Good luck....
.
Sincerely
 
Thanks, KOlegA, for the additional material. I have received confirmation of some of my thoughts. Here is another picture, just for the beauty of it.

Reason: