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

 
sanyooooook:

The point is that when we build a line, we don't know where it will touch the chart in the future,

that's not the point.

We are now dealing with what makes this angle error.

and it seems to be pixel discrepancy or price discrepancy.

 
sergeev:

that's not what we're talking about.

we are now dealing with what makes this angle error.

And it seems to be a discrepancy either in pixels or price.

the error comes from the fact that when the (main) line coordinates go beyond the chart

the displayed line is drawn according to the calculated coordinates visible on the chart boundaries

the X coordinate of the calculated point may fall between bars, hence the offset.

SZY: in my opinion with the price and pixels all right (although it seems to me there is also an error, sometimes the price has changed, visually no bar size, it's on the TF more than H1).

ZZZY: different coordinate systems for the line layer and for the bar layer cause such jumps.

 

We draw a chart as a straight line and use the first two points to draw a trend line


it would seem to coincide, but no, the line jumps when the coordinates on which the line was plotted go beyond the chart


 
sanyooooook:

We draw a chart as a straight line and use the first two points to draw a trend line


It would seem that the line should coincide, but no, the line jumps when the coordinates on which the line was plotted go beyond the chart


If it is not difficult to repeat the experiment by setting the line programmatically, in three variants:

1 anchor points at a distance of a few bars 1,2.

2 anchor points at a distance of 1000 bars.

3 anchor points are set on the levels multiple of the distance. (For simplicity the chart on 3 bars is 1 increment. The line is plotted on bars divisible by 3)

 
Aww, developers, can you explain why there are such big errors?
 
Urain:

If not difficult, repeat the experiment by setting the line programmatically, in three variants:

1 anchor points at a distance of a few bars 1,2.

2 anchor points at a distance of 1000 bars.

3 anchor points are set at levels divisible by distance. (For simplicity the chart at 3 bars is 1 increment. The line is set at multiples of 3 bars)


1. this was done during the first experiment

2. over 1000 bars there is also an error

over a bar (points 1,3 bars)

1.21 bars, already better but the further away the more the beams diverge

 

the accuracy of the line is greater than the accuracy of the chart, so in the process of drawing, the further the line is, the greater the deviation

the line is drawn by segments consisting of the same number of pixels, the price line by different segments

the trend line is drawn from the edge to the edge, the price line is drawn from the edge to (edge -1 bar)


 
sanyooooook:
Sanek, that's probably not it. Although I dunno...
 

I also find it interesting that the chart builds by the formula y=kX+b, the line is plotted on 2 chart points, but after a while the chart gaps up)), and so several times through 177 bars, then completely at random )

ZS: maybe gaps are in the chart's blood ))

 
sanyooooook:

I also find it interesting that the chart builds by the formula y=kX+b, the line is plotted on 2 chart points, but after a while the chart gaps up)), and so several times through 177 bars, then completely at random )

ZS: maybe gaps are in the chart's blood ))

Add the absolute values of this gap. What's up with the times and primes in the points before, on and after the gap.