Distance between 2 points

Forums ProRealTime English forum ProBuilder support Distance between 2 points

Viewing 6 posts - 1 through 6 (of 6 total)
  • #55293

    I needed for a strategy to get the geometric distance between 2 points. The platform does not provide the api of the ruler tool. So I implemented the function as an indicator and here is the code I share with you. This is not really an indicator but rather a utility function for developers. See below:

     

    1 user thanked author for this post.
    #55311

    Thank you for this nice useful function. So what is the unit distance returned? Could we consider it as “time based”?

    #55384

    When you take the tool ruler, the result of the tool displays a grey box with a distance value expressed in decimal number followed by a percentage which represents the difference between 2 points.

    The “GeomDistance” function calculates the decimal value that depends on the configuration of your user interface.

    #55386

    Hmm, so it depends only of price? Why not a simple division between 2 prices? as the X coordinates isn’t needed in this case. Anyway, this is useful function, thank you 🙂 

    #55423

    I use GeomDistanct on lines that are oblique and whose extreme points do not directly touch the candle.

    #55446

    oh ok! Got a better idea now to know how to use it.

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login