Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Line Drawing

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

    Line Drawing

    Hi
    I have an indicator that draws multiple lines, some horizontal and some not. Over 180 lines to be more specific. It works perfectly BUT I can't use it because it just kills my machine. I use drawline as here for the horizontals.

    DrawLine("H1a" + CurrentBar + i, 1, startPrice, 0, startPrice, Color.Yellow);

    and a similar technique to get angled lines. Basically I am drawing multiple line segments on each new bar.

    Is there a more efficient way of doing this ? For example, would using many many PLOTS be a better(more efficient way) ? Or is there another / better way of drawing the lines ?

    This is not a question of simple tuning and looking at Ninja performance tips I believe. I think I am either doing it a very kludgy way or I am asking Ninja to perform beyond what it is capable of right now.

    If I had "write ahead" feature I could do this once at start of day for example and not have to update anything real time - will this feature be in V7 ?

    thanks

    #2
    If you are drawing a line segment on every single bar for sure you will have slow performance if your machine is not powerful enough.

    Plots would be more efficient if you wanted just horizontal lines segments. Select Hash as the plot style.

    Not sure what you mean by "write ahead". You cannot draw objects into the future if that is what you mean.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Another approach is to limit the number of lines drawn. If you only need lines draw on the last 10 bars, then remove the lines on the previous bars to reduce the total number of line objects that need to be internally managed.
      RayNinjaTrader Customer Service

      Comment


        #4
        Reply

        thanks for the quick response.

        Ray unfortunately I need to see them right throught the whole day. But thanks anyway.

        Josh My machine is powerful enough. I know I can't write ahead into the future which is why I asked if V7 would have this feature. Will it ?

        Why couldnt I use plots for the angled lines ?

        thanks

        Comment


          #5
          You will not be able to draw into the future.

          I do not know your specifications for angled lines. You can try and see if it does what you want.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Version 7

            josh
            just to be clear, version 7 will not allow drawing into the future ?

            thx

            Comment


              #7
              Correct, but it is on our list of future considerations.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Drawing into the future is critical....

                My view....drawing into the future is critcal...you want to have the tools to identify potential future events...

                Thanks...

                Comment


                  #9
                  Thanks for the input Alfred!
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by AaronKoRn, Today, 06:28 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post AaronKoRn  
                  Started by pjsmith, Today, 01:00 AM
                  1 response
                  12 views
                  0 likes
                  Last Post NT-Roland  
                  Started by alejandro888, Yesterday, 08:41 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post alejandro888  
                  Started by UltraNIX, Today, 02:14 AM
                  0 responses
                  9 views
                  0 likes
                  Last Post UltraNIX  
                  Started by augustfay, Yesterday, 12:06 PM
                  1 response
                  13 views
                  0 likes
                  Last Post NinjaTrader_Jason  
                  Working...
                  X