Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Code fails in NT7

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

    Code fails in NT7

    I have the following code in 6.5 and it works.

    DrawLine(
    "lowertimeline", 1, High[0]- (TickSize*Bars.Period.Value), 0, High[0]- (TickSize*Bars.Period.Value) , Color.Black, DashStyle.Solid, 2);

    I imported it into NT7 and I get the following error when compiling:

    No overload for method 'DrawLine' takes 8 arguments.

    Where am I going wrong?

    thanks

    #2
    Here is the new DrawLine signature:
    public Gui.Chart.ILine DrawLine(string tag, bool autoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Color color, DashStyle dashStyle, int width)

    You also should see the available signatures in the editor's intellisense.

    Comment


      #3
      thanks, I got it work with the following.

      DrawLine("uppertimeline",false, 1, Low[0]+ (TickSize*Bars.Period.Value), 0, Low[0]+ TickSize *Bars.Period.Value, Color.Black, DashStyle.Solid, 2);

      Comment


        #4
        Velocity,

        I've run into this DrawText command/argument challenge again and as follows;

        DrawText(objName, "h", objOffset, objVal, objColor, textFont, StringAlignment.Center, Color.Empty, Color.Empty, objectOpacity);
        break;


        You will note that it is the DrawText command now, and the number of arguments is 10. I inserted "false" after "objName" but I still got the No overload method 'DrawText' takes 11 message; the "false" I inserted now makes the statement to have 11 arguments.

        I shall appreciate your assistance once again.

        Lolu

        Comment


          #5
          NinjaScript editor intellisense will show you the available signature for DrawText just as you start typing "DrawText(". You need to match the number and type (!) of your parameters exactly in order to write compilable code.

          Comment


            #6
            Originally posted by NinjaTrader_Dierk View Post
            NinjaScript editor intellisense will show you the available signature for DrawText just as you start typing "DrawText(". You need to match the number and type (!) of your parameters exactly in order to write compilable code.
            Yes, I saw that in the Script editor. Ok, Ok. I'll do that.

            Thanks, Derk.

            Lolu

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            621 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            359 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            562 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            567 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X