Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Functions from System.Drawing namespace

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

    Functions from System.Drawing namespace

    The Custom Drawing section of the Help Guide (under Shared Draw Methods and Properties) states the following:

    There are virtually no limits for custom drawing on a chart panel. Since NinjaScript is based on Microsoft C#, the entire System.Drawing namespace is available for use. Custom drawing is an advanced programming topic and should only be considered by programmers familiar with Microsoft C# and the .NET Framework.

    I would like to draw variable-width rectangles on my charts, but the drawing functions described in the help guide don't seem to have a property by which to scale the size of the object that is drawn.

    Can you please point me in the right direction with C#/.NET for calling a drawing function that will basically operate the same as the DrawSquare function, but which will allow me to control the width by way of a variable reference? I looked through the System.Drawing documentation on the MSDN website, but I don't even know where to begin in terms of identifying a specific function to call.

    Thank you.


    Regards,

    #2
    Unfortunately this is beyond what we provide support for.

    I suggest taking a look at CustomPlotSample indicator and take it from there.

    Comment


      #3
      Try graphics.DrawRectangle

      Comment


        #4
        Originally posted by Elliott Wave View Post
        Try graphics.DrawRectangle

        Many thanks, EW. I overlooked that function thinking it worked the same way as DrawDot and DrawSquare (i.e., non-scalable).


        Regards,

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        581 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        338 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X