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 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
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            41 views
            0 likes
            Last Post alifarahani  
            Working...
            X