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

Drawing box at the bottoom of each bar

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

    Drawing box at the bottoom of each bar

    Using rendertarget how do we draw a box at every candle but at every bar? Similar to this


    : ​Click image for larger version

Name:	image.png
Views:	39
Size:	3.2 KB
ID:	1304126

    #2
    Hello ttrader23,

    Thanks for your post.

    You would need to come up with your own custom logic that uses the RenderTarget.DrawRectangle() method in OnRender() to custom render a rectangle on the chart.

    You can override OnRender using SharpDX to render anything you want to the render target. We have an example here demonstrating the technique:​

    This is a conversion of the Spread Indicator with Candlesticks. Please contact the original author for any questions or comments.


    See the help guide documentation below for more information.

    Using SharpDX for Custom Chart Rendering: https://ninjatrader.com/support/help..._rendering.htm
    RenderTarget.Draw.Rectangle: https://ninjatrader.com/support/help...wrectangle.htm
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      I realize that we can use rendertarget. i just cant find any examples of how to place them on the lower side of the chart panel.

      Comment


        #4
        Hello ttrader23,

        Thanks for your notes.

        You could view the SampleCustomRender sample that comes with NinjaTrader which demonstrates rendering text on the lower right corner of the chart. You could implement similar logic in your script to custom render an object in the lower right of the chart. This is a good sample to use to see how to render at the bottom right. See the lowerTextPoint declaration.

        To view the SampleCustomRender sample, open a New > NinjaScript Editor window, open the Indicators folder, and double-click on the SampleCustomRender file.

        To custom render the object in the specific spot to suit your needs, you would need to come up with your own custom logic and test the script to locate the exact spot you want to render the object on the chart.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by crewtrades, 06-13-2024, 10:50 AM
        4 responses
        30 views
        0 likes
        Last Post crewtrades  
        Started by kingsteven, Today, 08:34 PM
        1 response
        3 views
        0 likes
        Last Post bltdavid  
        Started by biegea, Today, 08:54 PM
        0 responses
        3 views
        0 likes
        Last Post biegea
        by biegea
         
        Started by rene69851, Today, 08:36 PM
        0 responses
        2 views
        0 likes
        Last Post rene69851  
        Started by chartish, 04-11-2019, 12:40 PM
        15 responses
        3,832 views
        0 likes
        Last Post joselube001  
        Working...
        X