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 cmoran13, 04-16-2026, 01:02 PM
        0 responses
        43 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        162 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        158 views
        2 likes
        Last Post CaptainJack  
        Working...
        X