Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Making Drawn Objects Persist

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

    Making Drawn Objects Persist

    In the Indicator thread of this forum, there is an indicator called AutoTrendLines. It automatically draws trend lines on a chart. Every time a new trend line is drawn, the previous trend line is removed. How can that code be modified so the drawn objects (in this case trend lines) stay on the chart as new objects are drawn?

    Thanks.

    #2
    timefreedom,

    The code is complex and cannot advise you on how to modify it. You can use the NinjaScript Editor and open up the indicator to view the code, but after that you will just have to play with it.

    If you are not a programmer and do not wish to do this yourself you can try one of the 3rd party NinjaScript Consultants here: http://www.ninjatrader.com/webnew/pa...injaScript.htm
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh,
      When I rem'ed out the RemoveDrawObject lines it made the last 2 trend lines stay on the chart, rather than just the last trend line. But, as new lines are created the second to last is still removed. Since both Esignal and Tradestation have autotrendline indicators where the trendlines persist, I thought perhaps someone had already done the coding for Ninja. The autotrendline indicator is pretty close and wouldn't think it will be a big step, having already drawn the trend line, to make them persist.

      Comment


        #4
        If someone from the community is willing to help you out that would be great. Unfortunately I cannot provide any more support on modifying custom indicators in this regard.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        569 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
        548 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