Has anyone wondered why and how much the trend building "walks"? - page 7

 

addline - on true - a red dotted line will appear near X

that's your trendline - you have to use the handles to magnetize it.

turn off true, otherwise a lot of lines will appear

 
Ok thanks, everything seems to have appeared and I can drag and drop by hand.
 
marker:

On the daily 5360, on the week about 5330, n1 and n4 about 5356 (seems to be ok here). I checked trendline points on m15 (i.e. switching to m15 and catching the bottom). All the data is for the current moment, of course over time the trend may "climb a little higher", but still there is a discrepancy, I don't understand why, time, scale, I should not care about it all as a user of MT4. They should fix this bug in their crooked platform.


I will not be able to understand why, time, scale, all this should bother me as a user of mt4.


5360 - executed.

 

So:


Support Team 2012.06.07 14:40

Понятно.

Итого. Строим трендовую линию с лучем по достаточно близким точкам. На приличном удалении от точек построения луч начинает рисоваться с погрешностью, что заметно при изменении масштаба.

Проблема связана с дискретностью пиксельных координат и с дискретностью значений времени и цены тоже, чем больше отличаются координаты опорных точек линии - тем точнее построение. Попробуйте сделать обратное построение - нарисовать крест из вертикальной и горизонтальной линии, а затем попасть в него лучем трендовой линии. Чем дальше цель от точек построения и чем ближе точки друг к другу, тем сложнее попасть.

Мы обязательно постараемся уменьшить погрешность вычислений для режима с точной временной шкалой, но в общем случае некоторая погрешность будет всегда.

TheXpert 2012.06.07 15:09

It's too much for any kind of error. The 16pp (in the video) is not within the margin of error in price, nor within the margin of error in pixels.

It's some kind of systemic flaw (or incorrect assumption, binding, whatever) that stretches back to 4k.

And it also means that ObjectGetValueByTime etc will have a pretty good discrepancy with the line itself. It's kind of a contradiction in itself.

And another question -- are you going to do something about this in terminal 4?

Support Team 2012.06.07 16:16

TheXpert #

That is too much for any error. 16pp (in the video) is not within the margin of error in price, nor within the margin of error in pixels.

The error can be anything. Depends on the difference in coordinates of the reference points and the distance of the point on the beam from them.

It's some kind of systemic flaw (or wrong assumption, binding, whatever) that stretches back to 4.

And it also means that ObjectGetValueByTime etc will have a pretty good discrepancy with the line itself. It's kind of a contradiction in itself.

There is no contradiction. The error is inevitable, the only question is how to minimize it, in MT5, the precise scale mode was added for that very purpose. Try to do the calculations yourself and you'll see what the problem is.

And another question -- are you going to do something about this in terminal 4?

There will be no corrections in MT4.

TheXpert 2012.06.07 19:09

I don't understand how a line clearly defined by two points can have an error, for the life of me I don't.

A 1 pixel flutter (always! at any scale) is understandable. The flutter that was demonstrated, I don't understand.

Support Team 2012.06.08 09:41

TheXpert #

I don't understand how a line clearly defined by two points can have an error, for the life of me I don't.

I understand a 1 pixel flutter (always! at any scale). The flutter that was demonstrated, I don't understand.

Keep in mind that the terminal does not know anything about the price and time of the intersection point of your drawings. For it, in its calculations, there are only the points of the trend line.

Try to draw a line by points in discrete coordinates and understand how a change in scale may affect the drawing. You can even check it on a piece of paper in a box.

What happens in the terminal:

Drawing with the mouse on discrete x and y, then translating to date and price, with N seconds and M points per pixel, translating to scale. Changing scale, shifting graph results in recalculation of x and y coordinates. The conversion error on the segment is not much noticeable, it is within 1 pixel. But calculation of the straight line equation at the new scale due to discreteness of input data can lead to a noticeable error when drawing the ray. The smaller is the difference in coordinates of reference points, the larger is the calculation error. The farther away the point on the ray, the larger the error in the calculation. Also note that the beam is drawn exactly by discrete x and y, as the time scale may have gaps, i.e. some improvement in accuracy by calculating the point of the beam in date and time is generally impossible.

TheXpert 2012.06.08 10:27

That's a terrible crutch!

The construction has to jump from price and no other way!

Then how can you explain the same jitter when the points are magnetized exactly to the bar extremums?

It shouldn't be there simply because the points are clearly defined, but it is there and it's a bug. And I don't understand why you don't understand that this is a bug.

To be continued...
 
Finita la comedy. Trendy in short.
 
as I thought, objects are built on a different layer than the graph layer
 

A trend line is drawn using two points, which are defined by two coordinates, the price and the opening time of a given bar.

Proof (by experience):

Let's do it incorrectly, i.e. we build trends on the higher timeframe (1H) and consider it on the lower timeframe (5M).
We use a script that draws trend lines (in our case support and resistance lines connecting local extrema) on last 65 bars of the 1 hour EUR chart. Point A (local extremum) is the point where the trend line is plotted in Fig. 1. The script finished its work at this point.

Switching to the 5-minute timeframe (Fig. 2), we examine the construction of the point (roughly - a red square in a white circle). We can see that the point A of the trend was built (determination of time coordinates) at the opening of the hour bar (at 15:00), exactly at the level of the local price maximum (yellow circle).

P.S. -- At the same time we observe the error and its cause.

-- Manual creation of a trend (dragging with "magnetization") for further consideration on a lower timeframe may provide even a bigger error in readings.

Conclusion: to move to a higher (to the studied) timeframe, build the trend line on a lower timeframe, and only in this order.

Fig. 1

Fig. 2.

Fig. 3. EUR 5M chart after the GannFan.mq4 script has worked at 1H (manually set to the local low -- 14:00 hour candle) and then switched.

 
Roll:

The trend line is drawn on two points, which are determined by two coordinates - the price and the opening time of this bar.

Conclusion: To move to a higher timeframe, build a trend line on a lower timeframe, and only in this order.

Bullshit. If only it were like that... Read carefully.
 

chart as a straight line, if the chart is drawn evenly and does not jump, why does the trend drawn on the chart points jump?

Files:
_eqvnzdusd1.zip  14 kb