Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawLine not functioning

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

    DrawLine not functioning

    Hi,
    With these 2 statements in the code (adapted from Help):

    DrawLine("tag1", false, 10, 1000, 0, 1001, Color.LimeGreen, DashStyle.Dot, 2);
    DrawDiamond("tag2", true, 10, Low[0] - TickSize, Color.Red);

    DrawDiamond executes but not DrawLine.

    Strangely enough, DrawLine was working last night on one chart, but then stopped working when I changed the instrument. Now it doesn't work on any.

    - palinuro

    #2
    Any runtime errors in Control Center logs?
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Any runtime errors in Control Center logs?
      1. No, there are no entries. On my second computer the exact same code executes without any problems. I'm going to try a fresh install without importing anything from 6.5, so I'll see if that works.

      2. Another Line related problem, this time with manually entered lines: I can select a line, but the copy function doesn't work. This occurs on both computers.

      Comment


        #4
        Originally posted by palinuro View Post
        1. No, there are no entries. On my second computer the exact same code executes without any problems. I'm going to try a fresh install without importing anything from 6.5, so I'll see if that works.

        2. Another Line related problem, this time with manually entered lines: I can select a line, but the copy function doesn't work. This occurs on both computers.
        Update:
        1. I reinstalled NT7 on the first computer, and DrawLine worked for a few minutes and then stopped. Can't get it to work again. No log messages.

        2. Still doesn't work on either computer.

        Comment


          #5
          I would then sugget to redo the .NET framework on this PC as well and then retest...for the trend line copy / paste, it would be inserted on top of the old, so just select the new one and move to the desired location then...

          Comment


            #6
            Originally posted by NinjaTrader_Bertrand View Post
            I would then sugget to redo the .NET framework on this PC as well and then retest...for the trend line copy / paste, it would be inserted on top of the old, so just select the new one and move to the desired location then...
            OK, I'll try that - just to be clear, do you mean fully uninstall all .NET components and then redownload .NET 3.5?

            I did try the moving the old line, but there is no other hiding behind it.

            Comment


              #7
              Yes, uninstall .NET down to 2.0 and then redownload / install 3.5 including it's SP1 fresh, this would be the most thourough option....

              When you paste in the copied line, don't you see the prior one thicken up a little to indicate the new one was pasted in?

              Comment


                #8
                Originally posted by NinjaTrader_Bertrand View Post
                Yes, uninstall .NET down to 2.0 and then redownload / install 3.5 including it's SP1 fresh, this would be the most thourough option....

                When you paste in the copied line, don't you see the prior one thicken up a little to indicate the new one was pasted in?
                No, there's really nothing.

                Regarding the reinstall - all this does work perfectly on 6.5 - is it really likely to be a problem with .NET?

                Comment


                  #9
                  Tried your exact call on two PC's here (different OS) and it works fine - did perhaps change the scaling and AutoScale parameter so it would not be seen?

                  I can understand your point about refreshing .NET, sometimes it's hard to 'predict' related factors so I was just thinking of ways iron some of those out...

                  Comment


                    #10
                    Originally posted by NinjaTrader_Bertrand View Post
                    Tried your exact call on two PC's here (different OS) and it works fine - did perhaps change the scaling and AutoScale parameter so it would not be seen?

                    I can understand your point about refreshing .NET, sometimes it's hard to 'predict' related factors so I was just thinking of ways iron some of those out...
                    OK, next question: how do I do this in Vista, since .NET is built-in?

                    Comment


                      #11
                      Hi palinuro,

                      Perhaps this link can help: http://blogs.msdn.com/astebner/archi...ows-vista.aspx
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_Josh View Post
                        Hi palinuro,

                        Perhaps this link can help: http://blogs.msdn.com/astebner/archi...ows-vista.aspx

                        Thanks Josh.

                        RE the other problem,

                        Does the manual Copy / Paste function for Lines and other chart objects work properly? It doesn't work on either of my computers.

                        Also, I'm having a number of intermittent issues with indicators. E.g., I have a DOM display based on the NT SampleMarketDepth example, and it works on ES 1000K Volume, but not on ES 5 Minute. (This is on the 'good' computer.)

                        I tried the SampleMarketDepth in NT7 (converting the volume type), and it generates an error related to the Insert function:
                        // Checks to see if the action taken by the Ask data was an insertion into the ladder
                        if (e.Operation == Operation.Insert)
                        rows.Insert(e.Position, new LadderRow(e.Price, Convert.ToInt32(e.Volume), e.MarketMaker));

                        Comment


                          #13
                          Copy paste works here. You may have the object pasted on the same spot of the original and you just have to separate out the two by dragging one away.

                          Volume type are longs now, not ints. You would need to convert to long.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by NinjaTrader_Josh View Post
                            Copy paste works here. You may have the object pasted on the same spot of the original and you just have to separate out the two by dragging one away.

                            Volume type are longs now, not ints. You would need to convert to long.
                            1. Copy/Paste: As I said above, that isn't the case. I copy it (I've tried right-clicking and selecting Copy, plus using Ctrl-C), but nothing happens and the Paste function doesn't subsequently appear. Dragging the original just shows that there is only the original.

                            2. Again, as I said above, I did convert the volume type. It compiles fine. The problem comes in execution. The Log says it is an index out of range problem. I've traced it to the Insert section of the code that I've posted above (I added Print statements to check this; it appears to occur when e.Position = 9.)

                            Comment


                              #15
                              1. Works here so I can't reproduce. Please provide exact information as to what object, what you press, etc. that we can use to reproduce.

                              2. Convert.ToInt32(e.Volume)
                              You converted to an int. You should instead be changing the row types to longs, not the data back to what they use to be. If you continue to still have problems you need to check your indexes. Check the amount of rows actually in the row object and make sure you don't exceed the length.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              612 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              355 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              105 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              561 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              564 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X