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

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.
    Brandon H.NinjaTrader Customer Service

    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 Haiasi, 04-25-2024, 06:53 PM
          2 responses
          17 views
          0 likes
          Last Post Massinisa  
          Started by Creamers, Today, 05:32 AM
          0 responses
          5 views
          0 likes
          Last Post Creamers  
          Started by Segwin, 05-07-2018, 02:15 PM
          12 responses
          1,786 views
          0 likes
          Last Post Leafcutter  
          Started by poplagelu, Today, 05:00 AM
          0 responses
          3 views
          0 likes
          Last Post poplagelu  
          Started by fx.practic, 10-15-2013, 12:53 AM
          5 responses
          5,408 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Working...
          X