PPZ calculation - help to refine - page 13

 

It's been a while since anyone has posted here. I wonder if anyone else is using this development.

I took the liberty of digging into the algorithm (version 2.3 and 2.4) and found this:

s0 = (f0-p0)*(f0-p0)+(f1-p0)*(f1-p0)+(f2-p0)*(f2-p0)+(f2-p0)*(f2-p0);

logically it should be

s0 = (f0-p0)*(f0-p0)+(f1-p0)*(f1-p0)+(f2-p0)*(f2-p0)+(f3-p0)*(f3-p0);

Repeated when all lines are calculated. (copy-paste)))

I will study further - I like the idea very much, respect to the author.

SZZY: I have only now realized that it is the result of translation of the indicator from 3 to 4 fractals. In fact, it has turned out that the 4th fractal, as such, is not taken into account at all and the third one is given double weight. I would like to rework it a bit and keep the idea. I will do it and post it.

 

I have redesigned it as a script, as the original indicator runs only once anyway and then it runs idle. Again, we can draw levels on higher periods and track them on lower ones.

There are 4 levels so far. I have made it on the basis of Dsergx-sPA_v2.3.mq4. I have made some corrections, but the author's idea has been saved. It works much faster (see Expert Advisors' log).

In the description of levels, the timeframe at which the levels were created is specified (it reflects the importance of the level), as well as the value of the selection criterion - variance (to estimate the quality of the level).

At the second launch of the script the old levels of this timeframe are replaced with the new ones. There is a function of clearing the chart (in order not to dig through the list of objects).

Time permitting, I will develop it further.

ZS: For those who do not know, file should be placed in folder metetrader_folder\experts\scripts

Files:
 
midorum:

I have redesigned it as a script, as the original indicator runs only once anyway and then it runs idle. Again, we can draw levels on higher periods and track them on lower ones.

There are 4 levels so far. I have made it on the basis of Dsergx-sPA_v2.3.mq4. I have made some corrections, but the author's idea has been saved. It works much faster (see Expert Advisors' log).

In the description of levels, the timeframe at which the levels were created is specified (it reflects the importance of the level), as well as the value of the selection criterion - variance (to estimate the quality of the level).

At the second launch of the script the old levels of this timeframe are replaced with the new ones. There is a function of clearing the chart (in order not to dig through the list of objects).

Time permitting, I will develop it further.

ZS: For those who do not know, file should be placed in folder metetrader_folder\experts\scripts


Thank you.
 

Just one question

Let's take a fractal on Daily... How to find the price which ends the formation of this fractal, say on H1 .... It is desirable that on the price appears arrow...

 
azfaraon:

Just one question

Let's take a fractal on the Daily... How to find the price on occurrence of which the formation of this fractal finishes, say, on H1 .... It is desirable that the arrow should appear on the price...

The fractal is formed not at appearance of any price but at the closing of 2 bars after the extremum formation i.e., the time factor is active here.

Apparently, the point of the question is to mark on the chart the place of price return to the previously plotted ppz level, or did I misunderstand something?

 

Slightly improved for ease of use.

Added visibility of the lines only on the current timeframe and below.

When switching to a higher period, levels from smaller periods are hidden so that they do not interfere with perception.

Added mode of drawing all levels on higher timeframes. Now you can send the script to the main working chart and it will automatically calculate levels from higher periods.)

Files:
 

good afternoon.

midorum, how do you remove the script from the chart?

 

Afternoon.


Dserg, if you could add a selection of the number of fractals to the indicator.

 
edw122:

good afternoon.

midorum, how to remove the script from the chart?

The script is not an indicator - it is executed once and exits (the indicator is constantly hanging in memory and is executed with every new tick)

therefore you do not need to delete anything

if you want to delete the levels, which the script applied to the chart, the function is provided in the script itself - just send the script to the chart again and set the DeleteAll parameter to true. The script will only delete its levels, it will not touch anything.

 
edw122:

Good afternoon.


Dserg, if you can, add a selection of fractal quantities to the indicator.

I am currently working on creating such a version. There are already results, but I don't want to post the raw indicator.

I have a lot of ideas,Dserg's idea is very reasonable and it needs to be developed. For example, changing the number of fractals for drawing one level leads to the fact that the levels are drawn in absolutely different places - hence the question - what version to take for work? And I think, that it is impossible to do without serious analysis, and it is necessary to have many people to analyze it, in order to avoid adjustment of the indicator for your eyes))))

The second question - on what periods shall the levels be drawn? Dserg, as far as I understood, was working on the Hour and built levels there too. My approach is somewhat different - I'm also working on the hour market, but I build levels on the daily chart and above. And sometimes, when I see that the price reaches a level I may even go down by 15 minutes, but the levels are the same - from a day and above. So, edw122, on what period do you work? And from what periods do you need levels? The answers to these questions determine the direction of the idea. It turns out that I'm developing an indicator for my own needs, without knowing what others have. So describe such moments, it's important.

s.p. Besides, the increased number of fractals for level calculation, leads to considerable time consumption for script operation: for example, if we plot levels by 4 fractals, 15 levels (5 levels in 3 periods) take approximately 50 seconds, by 5 fractals - 15 minutes! And by 6? And that's a big problem too, which is what I'm trying to solve now.

s.s. Besides, I've got an idea to avoid strict limitations on the number of fractals, and select the levels by a different principle. Although so far it's just an idea.

Reason: