Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Overload

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

    Overload

    I am making my first indicator which is just a countdown to the next candle placed next to the candle but I always get this error message
    CandlestickCountdown.cs No overload for method 'Text' takes 10 arguments CS1501 67 18

    I tried reducing the arguments but the fault is always the same with 2 too many arguments.

    Please help!!

    TIA

    #2
    Hello TIA,

    May I confirm you are supplying the required parameters in the correct order that is matching an overload signature?

    Draw.Text(NinjaScriptBase owner, string tag, string text, int barsAgo, double y)
    Draw.Text(NinjaScriptBase owner, string tag, string text, int barsAgo, double y, Brush textBrush)
    Draw.Text(NinjaScriptBase owner, string tag, string text, int barsAgo, double y, bool isGlobal, string templateName)
    Draw.Text(NinjaScriptBase owner, string tag, bool isAutoScale, string text, int barsAgo, double y, int yPixelOffset, Brush textBrush, SimpleFont font, TextAlignment alignment, Brush outlineBrush, Brush areaBrush, int areaOpacity)
    Draw.Text(NinjaScriptBase owner, string tag, bool isAutoScale, string text, DateTime time, double y, int yPixelOffset, Brush textBrush, SimpleFont font, TextAlignment alignment, Brush outlineBrush, Brush areaBrush, int areaOpacity)​


    There are no overload signatures that have 10 parameters.

    There is one with 5, one with 6, one with 7, and two 13.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      This is what I've got

      Draw.Text(this, uniqueTag, // Unique tag
      timeLeft.ToString(), // Text to display (countdown time)
      0, timerY, // Position (x=0, y=timerY)
      Brushes.White, // Text color
      new System.Windows.Media.FontFamily("Arial"), // Font family (optional)
      14, // Font size
      TextAlignment.Center, // Text alignment (centered)
      100); // Z-order (layering)​

      Comment


        #4
        Hello hadyn68,

        This has 10 parameters. There are no overload signatures for Draw.TextFixed() that have 10 parameters, and also non that have a z-order parameter.

        You will need to use a valid overload signature and provide the proper parameters.

        Perhaps you want to use this overload signature?

        Draw.Text(NinjaScriptBase owner, string tag, bool isAutoScale, string text, int barsAgo, double y, int yPixelOffset, Brush textBrush, SimpleFont font, TextAlignment alignment, Brush outlineBrush, Brush areaBrush, int areaOpacity)
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        557 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X