Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Scrolling when Overriding Plot

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

    Scrolling when Overriding Plot

    I have some code that is using static XY coords to plot a line. This is being done by Overriding the Plot method and drawing the line by hand. Although the problem I am having is when scrolling the line stays static and does not scroll with the rest of the chart. Is there a different graphics object (maybe a buffered one) that I can write to so that my custom drawn objects participate in the scrolling?

    thanks,

    Udo

    #2
    Hello Udo,

    Welcome to the NinjaTrader forums!

    All manually drawn lines will use date time for x position and price values for y position. Unfortunately there's no way to configure to use the chart canvas for their position.

    For drawing lines programatically, see the custom plot sample for an example. Tools > Edit NinjaScript > Open CustomPlotSample
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I've seen the CustomPlot sample but that doesn't show any example of how to deal with scrolling. Do you know of any samples that show how to handle scrolling when using the Plot method?

      Comment


        #4
        The plot sample draws lines at chart coordinates, so it draws independent of the price scale.

        For overriding the plot method, pointing to this sample is unfortunately all the support we can offer.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_RyanM View Post
          The plot sample draws lines at chart coordinates, so it draws independent of the price scale.

          For overriding the plot method, pointing to this sample is unfortunately all the support we can offer.
          The CustomPlotSample most definitely does not draw at chart coordinates (time/price). It draws in window client coordinates.

          Is there a conversion from time/price to window client coords?

          Comment


            #6
            Thank you for the clarification TNixon. Unfortunately documentation for this is not available, but you may find this thread useful.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            566 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 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