Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No overload for method 'DrawText' error

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

    No overload for method 'DrawText' error

    I have a custom indicator which used to work fine on version 6.5.
    I tried to compile it on version 7 but I got an error message saying
    No overload for method 'DrawText' CS1501.

    Code is as follows.

    DrawText("tot"+totcntr, ". " + tot.ToString() + " .", 0, getY(lowestprice)-TickSize, Color.White, fnt2, StringAlignment.Center, Color.Black, Color.Black, 6);

    Please let me know how to fix the problem.
    Thanks.

    #2
    The DrawText overloads were amended for NT7, you miss the autoScale parameter in yours - http://ninjatrader.com/support/helpG...7/drawtext.htm

    Comment


      #3
      i have tried all of the indicated changes, to no avail.

      for what it is worth:

      systems that i am still testing as part of the beta test team include:
      win7, win xp sp3. and both also running on macbook pro w/parallels 5.0.


      with the changes you recommended, the indicator works when running nt6.5 on win7.

      works when running in nt7 on win xp sp3

      it only fails to run when running in nt7 (r15) on win7

      I believe this is a problem, as have double checked the drawtext parameters numerous time, including a cut & paste of the text support has sent back. they are correct. as well as using a copy of the indicator .cs file that works in nt7 on win xp!!!!

      Here is an interesting phenom....

      1. when you get all the corrections right, NT7 tries to save the indicator to a directors that does not exist.

      2. this is true even though it retrieved the file from the nt7:bin:custom directory.

      3. when I created a second "custom" directory inside of the existing custom directory i.e. path: nt7\bin\custom\custom it saves the revised .cs file to that new subdirectory. (verified by checking file timestamp)

      4. however, when you try to compile the ninja scripts, it recalls the file from the first directory. make changes and it resaves to the custom\custom subdirectory.

      5. this only happens when running nt7 with win7. am wondering if perhaps nt7 still has a problem with the new win7 subdirectory structure:
      i.e.: c:\libraries\documents\mydocuments\ninjatrader7\bi n\custom.

      6. this concern arises from the fact that the indicators runs and compiles ok when running nt7 in win xp sp3.


      thx in advance for response.

      Comment


        #4
        Originally posted by nanook77 View Post
        ...

        it only fails to run when running in nt7 (r15) on win7

        ...

        1. when you get all the corrections right, NT7 tries to save the indicator to a directors that does not exist.

        2. this is true even though it retrieved the file from the nt7:bin:custom directory.

        3. when I created a second "custom" directory inside of the existing custom directory i.e. path: nt7\bin\custom\custom it saves the revised .cs file to that new subdirectory. (verified by checking file timestamp)

        4. however, when you try to compile the ninja scripts, it recalls the file from the first directory. make changes and it resaves to the custom\custom subdirectory.

        5. this only happens when running nt7 with win7. am wondering if perhaps nt7 still has a problem with the new win7 subdirectory structure:
        i.e.: c:\libraries\documents\mydocuments\ninjatrader7\bi n\custom.

        6. this concern arises from the fact that the indicators runs and compiles ok when running nt7 in win xp sp3.
        Nanook, first of all, what exactly is going wrong ("it only fails to run b15 win7")? Are there any errors in the log (right-most tab of Control Center)? What about in the trace files (My Documents/NinjaTrader 7/trace)?

        To answer your questions:
        1) NT7 always saves indicators in the My Documents/NinjaTrader 7/bin/custom/indicator folder.

        2) It retrieves the indicators from the above folder (/bin/custom/indicator).

        3,4) Please do not create any sub-directories in the /bin folder. This can (and does!) mess up your NinjaTrader installation.

        5) That is not the physical path to the My Documents folder, it is just a "representation" using the libraries feature. The correct path for the My Documents folder is C:\Users\<username>\My Documents\, which is what NT uses. The folder C:\libraries\ does not exist.

        Please let us know if you have any other questions.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        597 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X