Calculate the distance between two parallel lines including ! - page 10

 
Taras Slobodyanik:

The difference from google - MT4-5 has floating scales on two axes, and these scales (ratios) are different for each user.

Floating scales do not matter, the distance between parallel lines is the same at any scale.

 

Да Вы не правы, сразу был разговор о том, что задача решаема с определенными оговорками. И, не было в условиях задачи постоянно пересчитывать расстояние - т.е. исходить надо из того, что рассчитали на одном ТФ расстояние и при их изменении цифровые вычисления не меняем. Понятно, что графически через объекты это не сделать из-за разных осей X на разных TF, так как привязка при построении идет именно к ТФ. Но, можно делать расчет на TF=M1 , а дальше уже, зная функции, рисовать через канвас на любом другом TF.


Well if by caveat you mean changing the problem to another and solving another problem, then yes... with caveats... It is not solvable in its current form even on the same TF... just press + or - and that's it...


The problem is solvable and there are several solutions.

Again... by solution you mean to change the customer to another TF ? Well then yes...


Floating scales don't matter, the distance between parallel lines is the same at any scale.

The scale has no effect on the distance between 2 parallel lines. right. It can be found. Easily. But that's not the problem...

 
Nikolay Ivanov:

This is not the problem.

Forum on trading, automated trading systems & strategy testing

Calculate the distance between two parallel lines including !

Itum, 2018.03.29 12:52

Can you tell me how you can calculate the distance between two parallel lines including the scale of the chart (in a way that the scale would not affect this)

Here is an example:

Red line - distance between two parallel lines - how can you calculate ?


 
Konstantin Gruzdev:

Floating scales are irrelevant, the distances between parallel lines are the same at any scale.

Are we talking about google map?
If you count without considering changes in scale, you will not have a constant distance.

 
Nikolay Ivanov:

Again... by solution you mean changing the customer to a different TOR ? Well, then, yes.

If you mean freelancing, his TOR is open, there are no changes there.

 
Konstantin Gruzdev:

The problem is solved without any reservations or limitations.

The problem is solved based only on the properties of the graphical object and it does not matter what timeframe they are built on.

The TS writes one thing, but judging by the code, it needs something else, namely, to build the second line in the timeframe.

Knowing the functions of two lines, we can find their value (for plotting on the chart) on higher TF, if they are rays, not lines, or if these lines are multiples of high TF.

 
Konstantin Gruzdev:


The red line shows the distance between the 2 lines and it does not depend on anything and can be found. But the yellow line shows the perpendicular, which the customer wants to find. It depends on the scale. And the task is to make it independent of scale and equal... And there may be reservations... either that it depends, or that it is not perpendicular, or that it is not equal, but not three statements at once.


 
Nikolay Ivanov:


The red line shows the distance between the 2 lines and it does not depend on anything and can be found. But the yellow line shows the perpendicular, which the customer wants to find. And it depends on the scale. And the task is to make it independent of scale and equal... And there may be reservations... either to be perpendicular, or not to be equal, but not three statements at once.


The client doesn't want a perpendicular, he wants a distance. Let the perpendicular change as he wants.)

 
Taras Slobodyanik:

The client does not want a perpendicular, but a distance. Let him change the perpendicular as he wants)

The task on his screenshot is a perpendicular... So you tell him that he does not need it and need the distance between 2 lines... )

 
Nikolay Ivanov:

The task in his screenshot is the perpendicular... You tell him that he doesn't need it, but needs the distance between the 2 lines... )

The distance between two parallel lines is always perpendicular. The fact that there is a visual distortion of the picture when you change the scale is irrelevant.