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 helpwanted, Today, 03:06 AM
            1 response
            5 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            7 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            5 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            242 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            384 views
            1 like
            Last Post Gavini
            by Gavini
             
            Working...
            X