Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Filled Rectangle with filled diagonal strips

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

    Filled Rectangle with filled diagonal strips

    Hello,

    I want to draw a filled rectangle with vertical 45° diagonal stripes as an addition to the standard rectangle.

    I did not find an example here in the forum. How can I draw this in the easiest way?

    Attached is an example drawn in PowerPoint.

    Kind regards
    Gerik
    Attached Files

    #2
    Hello Gerik,

    Thanks for your post.

    The Draw.Rectangle() method used to draw rectangles on the chart does not have the ability to specify vertical 45° diagonal stripes for the rectangle being drawn on the chart.

    Something you could try is using SharpDX with OnRender() along with your own custom logic to custom render the specific rectangle you want on the chart.

    See the help guide documentation below for more information.

    Using SharpDX for Custom Chart Rendering: https://ninjatrader.com/support/help..._rendering.htm
    OnRender(): https://ninjatrader.com/support/help...8/onrender.htm
    RenderTarget.DrawRectangle: https://ninjatrader.com/support/help...wrectangle.htm

    You may also study the SampleCustomRender indicator script that comes default with NinjaTrader. To view the script open a New > NinjaScript Editor window, open the Indicators folder, and double-click on the SampleCustomRender file.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hello Brandon,

      thank you for your answer.

      Your referenced sample unfortunately is fixed on the screen and not moving with the chart.

      Can you recommend another easy sample script for reference?

      Kind regards
      Gerik

      Comment


        #4
        Hello Gerik,

        Below is a link to an example of logic for a rendered sharpdx object at the coordinates of a specific bar.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea,

          thank you for the link. Using a rendered object, I am not able to double click on the object and see what is the price and time the rendered object is using comparing to the object draw.rectangle. With draw.rectangle I could double click on the object.

          Would it be possible to submit a feature request?

          Kind regards
          Gerik

          Comment

          Latest Posts

          Collapse

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