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 cmtjoancolmenero, 04-25-2024, 03:58 PM
        14 responses
        57 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by raffu, Yesterday, 11:41 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by cmtjoancolmenero, Yesterday, 11:56 AM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by reynoldsn, 04-21-2024, 07:53 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by cmtjoancolmenero, Yesterday, 03:40 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X