Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can draw dot, arrow, etc. but cannot draw line

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

    Can draw dot, arrow, etc. but cannot draw line

    This is really weird, somehow my strategy stopped drawing lines on my chart. This was working before. So I added some DrawDot calls just before the DrawLine, using the same coordinates. The dots draw fine but the line does not. I can't figure out how I can draw two dots but a line between them.

    Is there any way this could be possible?

    I use exactly the same coordinates. Here is the code:

    Code:
    DrawDot("Dot1"+CurrentBar, true, status.startIndex, High[status.startIndex]+10, Color.Pink);
    DrawDot("Dot2"+CurrentBar, true, status.endIndex, High[status.endIndex]+10, Color.HotPink);
    DrawLine("Line1"+CurrentBar, true, status.startIndex, High[status.startIndex]+10, status.endIndex, High[status.endIndex]+10, Color.HotPink, DashStyle.Solid, 2);
    I even tried this and I don't get any line:

    Code:
    DrawLine("Line2"+CurrentBar, true, 5, 745, 1, 745, Color.HotPink, DashStyle.Solid, 2);
    So I then created a new strategy and pasted the above line in the OnBarUpdate. No line is drawn! So I think it has something to do with my system, windows, the drawing api, or something. I don't think it's a bug with Ninjatrader. But how can I figure it out?
    Last edited by cunparis; 03-18-2009, 02:14 AM.

    #2
    Hi cunparis, did you try an even simpler call such as DrawHorizontalLine to troubleshoot?

    Do you see any errors coming up in the Log tab?

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi cunparis, did you try an even simpler call such as DrawHorizontalLine to troubleshoot?

      Do you see any errors coming up in the Log tab?
      I didn't try draw horizontal line, but did use dot & arrow down.

      I think NT thinks that the line is drawn. There are no errors. I think it's windows that is not drawing the line.

      Comment


        #4
        Have you already tried reinstalling the .NET framework? - http://www.ninjatrader.com/webnew/su...ationguide.htm

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Have you already tried reinstalling the .NET framework? - http://www.ninjatrader.com/webnew/su...ationguide.htm
          The install program says it's built into Vista so I can't install it, and the service packs say they're not available for Vista. I don't think there's anything I can do here.

          I exported my strategy and tested on another pc and it draws the line so it's definitely something wrong with my computer. Can you tell me what API you use to draw the line? Maybe we can find something that way.

          Comment


            #6
            NinjaTrader just uses the .NET framework. Please try using this link: http://www.microsoft.com/downloads/d...displaylang=en
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              NinjaTrader just uses the .NET framework. Please try using this link: http://www.microsoft.com/downloads/d...displaylang=en
              Do you use .NET 2.0 or 3.5? The page on your website links to 2.0.

              Comment


                #8
                cunparis,

                On Vista, it generally already comes with 3.0 and above. Please install 3.5 sp1 and see if it resolves the issue.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Josh View Post
                  cunparis,

                  On Vista, it generally already comes with 3.0 and above. Please install 3.5 sp1 and see if it resolves the issue.
                  I did, it gave me options of repair or uninstall. I first tried repair but that didn't make a difference so I did uninstall and then I reinstalled it. Still doesn't work.

                  I guess the next step is to uninstall NT and reinstall it. Any other ideas?

                  Comment


                    #10
                    Uninstall both. Clear web browser cache, delete My Documents\NinjaTrader 6.5, reinstall both.

                    Be sure to backup anything you want to keep. You will lose all of your NinjaScript files, data, workspaces, etc.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Josh View Post
                      Uninstall both. Clear web browser cache, delete My Documents\NinjaTrader 6.5, reinstall both.

                      Be sure to backup anything you want to keep. You will lose all of your NinjaScript files, data, workspaces, etc.
                      I did 2 backups, one with my database and one without (the without is because I need to delete all my historical data due to changing the timezone on my PC)..

                      I then uninstalled Ninjtrader, and renamed the folders in my documents folder.

                      I then installed Ninjtrader and created a new line test strategy and it works.

                      I then restored my backup and tested it again and it works.

                      So this fixed it! Thanks for the help.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      648 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      369 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      108 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      572 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      574 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X