I made one of these things once ... - page 13

 
Prival:

About the spline, very interesting approximation, I will try to explain how I understand it and what can be done with it.

  1. there is a segment of history described by a third-degree polynomial
  2. there is a condition of continuity of derivatives of the first and second degree
  3. this is the only function that "correctly" interpolates an unknown function on a given segment

it's kind of the definition, the cubic spline. Now let's just say that we analyze the motion of an object (it can be any object, an aeroplane, a car, a currency...).

Using of this algorithm on a given part of history, we will find a function (the only one that has speed and acceleration, which is better than none (though I doubt it)). We only have to assume that for some time the object will move at the same speed and acceleration. Extrapolate. And control for the bias (extrapolation error). Further options, you can do it with the arrival of new data, or you can set a threshold for when the discrepancy exceeds a predetermined value, then recalculate.

Z.I. I may be wrong, but I think there's something to it and it's the physics...

I try to put you in the plural, there are more programmers here than me, that was a reference to all. You're getting some edits in your code, I envy you... I can't grow up. I can only post bad ideas...)

Fourier would do an even better job. Is there a struggle for the number of parameters to be estimated? Or is the physical meaning of the model taken into account?

Let's go back to the Galton board, shall we? ;)

And the nails will correspond to the levels and scales of the target (possible) levels of the "players".

The five digits have changed the picture of the financial world in a big way. And I think it is this variability (in time and price) of 'nails' on the bounce/break that gives, when adding two or more random wanderings in their own coordinate grids, the 'thick-tail' in the distributions we observe.

Please forgive, for another unceremonious intrusion into the unhurried conversation of learned men. ;)

-----

a spline is really good to describe a smoothed shoreline!

 

I guess the conclusion about absence of special interest in discussion of the previous turn of a theme will not be hasty :).

Logically, if someone had obtained the relevant statistics and assessed them as unpromising, they would almost certainly have posted them here :). Thus, it is likely that no one has tried to obtain statistics on the topic. If someone did try, the result is likely to have been such that they chose to keep quiet about it :).


In the meantime I've got some new ideas in my head :). Automatic marking almost never looks perfect. But what if we do hybrid markings? That is, use the automatic one as a fish and correct it manually. Of course, only an extremely hardworking person can get some meaningful statistics on such a hybrid zigzag (for example). But to correct some segments, on which the script will draw all sorts of trends and levels - it is quite realistic.

Then again, since everything was already invented before us, probably something has been done in this direction, probably it would be worth looking for it. But it's easier and quicker for me to do some simple things myself. However, I have not decided to make a hybrid zigzag, but I have made a script for drawing equidistant levels on charts. To be more exact I firstly made a template for growing such hybrids ( sanyooooook , by the way, it helped me to polish it) and then grew the aforementioned hybrid from it. Coincidentally they ended up attached to the previous post, that's where you can get them :). The template is a bit different now .


The script has two parameters: the number of levels and their colour. Selecting and moving any of the thick lines with the mouse should cause the entire design to shift. The same action on any of the thin lines should result in changing the distance between levels. So far I have had it this way, but of course I do not offer a guarantee of no glitches.


Observations and requests will be received with interest, but their rapid implementation in the general case should not be expected.


P.S. Forgot to warn: after removing the script lines will remain, it's for leaving a markup after itself and is intended.

And I will add a picture at the same time.


 

Hasty conclusions about unsuccessfulness.

Imho.

A lot has already been said (and shown!). It's just that there's a lot of mithrophanousness, too...

;)

 
Sorento:

A hasty conclusion of unsuccessfulness.

There was no conclusion of unsuccessfulness, just that there was no discussion :). The success or failure depends on the degree to which the goal is realised. If the goal is, say, to promote yourself as a pop-trader, then of course this is failure. And if the goal, say, something like reconnaissance or search, then the situation is quite normal. Although a larger crop would be nice :). Well, if the goal is, say, to send some kind of a message, then it is quite successful.

I should point out that I do not officially recognize any of these goals for myself :).

 

By the way, to the Galton board analogy. This is what I did with the script in the morning on H4


And this is the result of switching to M1, the momentum is current


Really there is an impression that it goes exactly on the nails.


P.S. By the way, I have at the same time obtained the illustration of one of methods of using the script. The other can consist of manually specifying level in object properties, Thus, by the way, it is very easy to mark "round" levels discussed above, say, in the middle line we put the price of type 00, and in the neighboring thin line - the nearest price of type 50. Or like 10, if you like.

 

Refined the software slightly. Now it is a series of scripts, with EquLevelsB as the base, EquLevelsM as the middle, and EquLevelsT as the top.

In addition, we have added a script to delete markup made by the scripts of this series. In principle, it's good for removing any object with prefix+number names. If N=0 it will remove numbers from 0 to the first skip in numbering. That is, if there are skips, you just need to set N more.

All scripts have an added parameter that allows you to set a prefix for object name.


In fact, all of this functionality is easy to combine in one script. And some more to add. But it's like a path to the commercial version, it's only if there will be a million applications :), the more that they will not do anything at all :) .


P.S. Looks like it's time to go back into no-goo-goo mode :)

Files:
 

I think the topic is interesting, but difficult to grasp and comprehend; I want to try and understand it many times, but I don't have enough time. If I had a simple EA, even if it was a drain, then the discussion would start .....)).

 
Vitya:

I think the topic is interesting, but difficult to grasp and comprehend; I want to try and understand it many times, but I don't have enough time. If I had a simple Expert Advisor, even if it was a sinking one, then the discussion would start .....)).

Well, a "zero approximation" Expert Advisor may be quite simple.

Say, the variant suggested by Prival can be approximated as follows:

We set stop orders at the nearest allowed by stop leveller round levels (for a Buy, at the top nearest level, for a Sell, at the bottom nearest level). As soon as one has triggered, we wait for a new one-minute bar to start and immediately set a similar new stop order instead of the triggered one.

We check two things in the order tracking block:

For pending orders, check the difference between the current time and the open time, and close them if they are higher.

For pending orders - possibility to move to the previous round level (for a Bai downwards, for a Sell upwards). In other words, it is a mechanism similar to a trailing stop.

That is all!

How to determine the nearest round levels from my indicator's code should be clear. However, I can also write them explicitly. The nearest is from the bottom:

    int ILvl = Bid*100;
    double DownLvl = NormalizeDouble(0.01*ILvl,Digits);

Nearest from above

    double UpLvl = NormalizeDouble( DownLvl+0.01,Digits);
 

I am not particularly interested in it, but it seems to me that in the pound levels multiple of 50 will work out worse than in other currencies.... The reason for this is that the strike on the cable is 100 pips, and for other currencies 50, can anyone tell me whether it's true or not?

I will add some confusion to the order - here are some images, may be they are out of order, but it seems to me that there is something in them

The graphs show the average spread and frequency of ZZ swing by symbol and TF, the discreteness of change is 5 pips.

Attached is the archive with the files and the script that makes them...

Files:
zz.zip  24 kb
 
xrust:

1. I am not particularly interested in this, but it seems to me that in the pound levels multiple of 50 will work out worse than in other currencies.... The reason for this is that the strike on the cable is 100 pips, and for other currencies 50, maybe someone will tell me so or not?

2) I'll add some confusion to the order - here are the pictures, maybe they are out of order, but I think there is something in them

The graphs show average spread and frequency of swinging for ZZ by symbol and TF, discreteness of change is 5 pips.

1. I can only say that the histogram from pg. 11 for the pound is close to the histogram for the Canadian, but for the euro there is an impression that the effect is clearer.

2. On the pictures:

I'm not sure I understood everything in the source files, maybe I should have explained it in more detail in words.

Anyway, what I understood is that the first column in the files is the amplitude of the segment with an accuracy of 5 points, the second is the relative frequency of amplitudes from the given interval, in percent, and the third is the value inverse of the average duration of segments of the given interval.

I can say the following from the get-go:

First, in a standard zigzag, the switching is not only in amplitude, but also in time. Specifically, segments that are too short are simply forbidden. That is, the third quantity must have a feature in the low-amplitude region. And it does if I understood the pictures correctly.

Secondly, statistical security should decrease as timeframe increases. And, although there is no data on the number of segments, judging by the growing indistinctness of the graphs, that is what is happening. Accordingly, the top, minute chart is the most reliable.

Thus, imho, everything looks rather expected. Or am I missing something?