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 CarlTrading, 03-31-2026, 09:41 PM
            1 response
            71 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            39 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            63 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            62 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            53 views
            0 likes
            Last Post CarlTrading  
            Working...
            X