Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with old 6.5 indicator working in NT 7

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

    Problem with old 6.5 indicator working in NT 7

    Hi

    I have an old indicator that works fine in NT 6.5 but when I tried to import it it would not let me import and said

    "Import failed. The NijaScript archive file may contain duplicate method names that already exist on your pc or there is a required file missing on either your PC or in the import archive"

    So I copied the indicator file into the indicators folder directly and then opened it to complie it and got three CS1501 errors saying "No Overload for method 'DrawText' takes '11' arguments."

    The code with errors in is as below.


    privatevoid TDSetupDrawText(string strText, Color colorColor, int intFontSize)
    {
    this._intObjectCount++;
    DrawText(
    this._intObjectCount.ToString(),
    false,
    strText,
    0,
    this._dsYLocation[0],
    colorColor,
    new Font(FontFamily.GenericSansSerif, intFontSize, FontStyle.Bold, GraphicsUnit.Pixel),
    StringAlignment.Center,
    Color.Transparent,
    Color.Transparent,
    0);
    this._strSetupTags.SetValue(this._intObjectCount.ToString(), _intSetupCount-1);
    }
    #endregion
    Can anyone point to any reason why this would be fine in NT 6.5 but NT7?

    Many thanks

    Mark

    #2
    Hi Mark,

    You can resolve this by formatting DrawText according to supported method signatures. Some draw method signatures were removed from version 6.5 to 7.

    You can see all supported method signatures for this here:


    Code breaking changes for version 7 is available here.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan, thanks. I have been through the guide though and am still at a loss to see what method signature is incorrect. Based on the link you posted all the signatures used seem to be fine?

      Comment


        #4
        Never mind.....found it. Was missing the offset int.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        599 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        344 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
        558 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        557 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X