Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating template for Draw.Rectangle...

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

    Creating template for Draw.Rectangle...

    The overload for Draw.Rectangle() specifies "string templateName". How/where do I create that template with code?

    Code:
    Draw.Rectangle(NinjaScriptBase owner, string tag, DateTime startTime, double startY, DateTime endTime, double endY, bool isGlobal, [b]string templateName[/b])

    #2
    Hello funk101,

    Thank you for your note.

    If you were to open a chart, draw a rectangle, tweak its colors, then right click on the drawing object>Properties, then click template, and save the template, for example SnowTemplate.

    You could then pass this drawing template to the rectangle via NinjaScript by including the name of the template in the following syntax.

    Code:
    Draw.Rectangle(NinjaScriptBase owner, string tag, DateTime startTime, double startY, DateTime endTime, double endY, bool isGlobal, [B]string templateName[/B])


    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Ah, duh, ok, I got it. Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 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
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      549 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X