Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to replace DrawLine Objects with plotted lines

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

    How to replace DrawLine Objects with plotted lines

    this.DrawLine("RangeHigh" + dateString, false, CurrentBar - highBar, highestHigh, 0,
    highestHigh, lineColor, LineStyle, LineThickness);

    I've use this code to draw RangeHigh line, however after drawing 10 lines on a chart this codes loads very slow. I would like to replace it with a line plot. How would I do this?

    Tlhanks

    #2
    Ken,

    You wouldn't be able to use a Line Plot as this is just a single line on the chart.

    You would have to Set() and Reset() a plot in order to redraw the plot where you would like.

    You might also want to try using RemoveDrawObject(). to dispose of objects you do not need to speed up the calculation.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Could you please be more specific. How would you Set a plot to replace this code?
      thanks

      Comment


        #4
        Hello Ken,

        I'd be happy too - can you send me a screen shot of exactly what you're doing with draw line?
        MatthewNinjaTrader Product Management

        Comment


          #5
          Like this



          There is a strategy plot file you have to load into NT to make this work found here

          When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. NinjaTrader 8 With NinjaTrader 8 we introduced strategy plots which provide the ability
          Last edited by darkspeed; 07-13-2012, 08:21 AM.

          Comment


            #6
            darkspeed

            Thank you very much, I'll check it out.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            80 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            45 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            29 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            32 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            66 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X