Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Map Y location to Price

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Map Y location to Price

    Hi-

    I need to workout the nearest price from the Y location of the mouse. I have the Y location sorted, but I am unsure how to map the location to a price. ChartPanel doesnt seem to have any capabilities for this.

    Any advice?

    Thanks,

    Nick.

    #2
    Hello ptpatrader, thanks for your post.

    There exists the GetValueByY method that you can use given you have the Y coordinate of the mouse.



    This should get you going in the right direction.

    Kind regards.

    Comment


      #3
      Thanks Chris-

      Is there an easy way to map this returned value to the closest tick? I seem to remember seeing some code somewhere but not sure where.

      Thanks,

      Nick.

      Comment


        #4
        Hello Nick, thanks for your reply.

        There is the RoundToTickSize() method that will round a price to the master instruments nearest tick size:



        You could also do this manually using the TickSize property, that will return the tick size of the master instrument.

        Best regards.

        Comment


          #5
          Apologies Chris, I missed this. This works, thank you.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          600 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          347 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X