Calculation of the slope angle of the trend line. - page 16

 
Alexander Puzanov:
It has nothing to do with changing the TF - when you change the TF, your calculations change. But when you change the scale (using +/- buttons or the button on the terminal panel, sometimes just scrolling the chart), nothing in the calculations changes, and the ° is floating in the middle of nowhere.
Then if you really want to make the EA's algorithm dependent on the angle, you need to harden the scale in the tester in visualization mode, but I think it's a failure, because such an EA, that makes any calculations from pixels or with reference to a chart, because in 1 the time of single tests increases many times, in 2 the optimization of parameters is impossible, what I have sent above is all calculated by formulas and drawings are done last, only if visualization or real chart, in this case to a peak
 

Two ideas came up:

1. How do I calculate the angle from an A4 sheet of paper instead of the monitor screen?

2. Why not make different formats of screens (there are not many of them), zooms and resolutions and thus determine which option is best (used by "big money").

In general, to determine the correct graphic calculation of the angle (we assume that a person uses his visual perception of information to make a trading decision), we need an algorithm for checking the angle calculation - i.e., for example, the angle is needed to build the price reversal level, then by trying different options we will stop at the one that shows the best (most accurate) option.


 
-Aleks-:

Two ideas came up:

1. How do I calculate the angle from an A4 sheet of paper instead of the monitor screen?

2. Why not make different formats of screens (there are not many of them), zooms and resolutions and thus determine which option is best (used by "big money").

In general, to determine the correct graphic calculation of the angle (assuming that a human uses his/her visual perception of information for making a trading decision), we need an algorithm for checking the angle calculation - i.e. for example, the angle is needed for drawing the price reversal level, then going through different options we will stop at the one that shows the best (most accurate) option.


It can be easily calculated. In MQL there are functions for determining the DPI and linear dimensions of images. Use them, and output the exact slope angle.

But the trend has nothing to do with this angle. I've already said it many times above - the slope of the trend line cannot be measured in degrees. The slope of the trend line is measured solely by the price movement per unit of time.

 
Even easier - use a Fixed Scale graph to calculate - or use your own "fixed variables"
 
George Merts:

It's easy to calculate. In MQL - there are functions to determine DPI and linear dimensions of images. Use them and output the exact slope angle.

But the trend has nothing to do with the angle. I've already said it many times above - the slope of the trend line cannot be measured in degrees. The slope of the trend line is measured solely by the price movement per unit of time.

Clarify, how do you know the image in pixels that will be printed out?

As for the rest - it is the real angle that may be of interest if the market decides visually and not purely mathematically by robots.

 
Taras Slobodyanik:
Even easier - use the Fixed Scale graph for the calculation - or use your own "fixed variables"

What's the point? The point is to get the graph as the majority of the population sees it.
 
-Aleks-:

Clarify, how do you know the image in pixels that will be printed?

As for the rest - it is the real angle that may be of interest if the market decides visually rather than purely mathematically by robots.


-Aleks-:

What's the point? The goal is to get the pattern as the majority of the market sees it.

Amazing! Not just in there somewhere, but right in two consecutive posts contradicting yourself.

First about the need for a real angle, then the next post rejecting the fixed scale of the graph.

 
-Aleks-:

Specify how do you know the image in pixels that will be printed?

As for the rest, it's the angle of the actual angle that might be of interest if the market is deciding visually, rather than purely mathematically, by robots.

Obviously, by querying the CHART_WIDTH_IN_PIXELS and CHART_HEIGHT_IN_PIXELS parameters.

And about "visual decision making" - what difference does it make ? Here, look earlier - about the same trendline they say "different slope" - Exactly because you can't measure the slope in degrees. Even if the decision is made visually. Because the slope in degrees depends on the scale, which varies.

 
George Merts:

Obviously by querying the CHART_WIDTH_IN_PIXELS and CHART_HEIGHT_IN_PIXELS parameters.

And about "visual decision making" - what difference does it make ? Here, look earlier - about the same trendline they say "different slope" - Exactly because you can't measure the slope in degrees. Even if the decision is made visually. Because the slope in degrees depends on the scale, which varies.

Correct - it depends on the scale, but you have to understand that the scale is a constant which has to be found.

 
Dmitry Fedoseev:


Amazing! Not just in there somewhere, but in two consecutive posts contradicting yourself.

First the need for a real angle, then the next post rejecting a fixed chart scale.

You are a good example of how limited thinking prevents one from changing one's view of the World.