Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Knowing the new coordinates of a chart object that has been repositioned

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

    Knowing the new coordinates of a chart object that has been repositioned

    Hello, appreciated community.

    I would like to know if someone can guide me on the most practical way in which I can know, from a strategy that I am developing in NT8, the new coordinates (meaning, the price and the candle number or candle time, of the two anchor points) of a “ray” object that has been moved on the chart by the user.

    Currently, my strategy allows, through a button that I have previously programmed (and that is displayed on the chart), to plot rays, which can be changed position by the user, in a real time execution. When the user modifies the location (or inclination) of a ray, the strategy must update the two anchor points: (x1, y1) and (x2, y2), where “x” is the candlestick number or candlestick time, and “y” is the price. This coordinate information (along with the label assigned to each ray) are recorded in a list.

    I was looking in the online help, if there was some event like the one that is called when an order is modified (OnOrderUpdate), that is fired when there has been a change in some chart plotted object (something like “OnChartUpdate” or similar), but I haven't found anything.

    I believe that there should be a practical way that does not require the use of events such as “marketDataUpdate”, which impact the performance, to determine which ray was modified by the user, and then update the coordinates of that ray, in the aforementioned list.

    Thank you for your response and guidance.
    Best regards.​​​

    #2
    Hello Dennys Vera,

    There is not a way to get an update about that in the strategy, there are no events when drawing objects are updated. You would have to continuously check the objects values if you need them in your code.

    Comment

    Latest Posts

    Collapse

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