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 chbruno, Today, 04:10 PM
            0 responses
            3 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            436 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            6 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            19 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by frslvr, 04-11-2024, 07:26 AM
            9 responses
            127 views
            1 like
            Last Post caryc123  
            Working...
            X