Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Graci117, Today, 09:02 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by ETFVoyageur, Today, 07:55 PM
        0 responses
        7 views
        0 likes
        Last Post ETFVoyageur  
        Started by janio973, Today, 07:24 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by aligator, 01-06-2022, 12:14 PM
        4 responses
        246 views
        0 likes
        Last Post john_44573  
        Started by reynoldsn, Today, 05:56 PM
        0 responses
        14 views
        0 likes
        Last Post reynoldsn  
        Working...
        X