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

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 Tim-c, Today, 03:54 AM
        0 responses
        1 view
        0 likes
        Last Post Tim-c
        by Tim-c
         
        Started by FrancisMorro, Today, 03:24 AM
        0 responses
        2 views
        0 likes
        Last Post FrancisMorro  
        Started by Segwin, 05-07-2018, 02:15 PM
        10 responses
        1,770 views
        0 likes
        Last Post Leafcutter  
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        31 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        945 views
        0 likes
        Last Post spwizard  
        Working...
        X