Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 bortz, 11-06-2023, 08:04 AM
            47 responses
            1,604 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            8 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            4 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            13 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X