Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Region highlight y with specific height.

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

    Region highlight y with specific height.

    Hello

    I want to highlight a region like "Region Highlight Y". i want to draw this region with a specific height wherever that i click the mouse button on the screen. i want the mouse click to be the middle line of the region and i can be able to define the value for height in ticks or percent or ....

    How can i do this?

    #2
    Hello faridsep,

    Thanks for your post.

    To clarify, are you trying to program your own custom indicator to draw a RegionHighlightY draw object on the chart? Or, are you trying to program you own custom DrawingTool script?

    The startY and endY arguments could be passed into the Draw.RegionHighlightY() method in a script to draw the region from one value to another value to give it a certain 'height'.

    Draw.RegionHighlightY(NinjaScriptBase owner, string tag, bool isAutoScale, double startY, double endY, Brush brush, Brush areaBrush, int areaOpacity)

    Note that you would need to click on the upper/lower lines drawn on the chart to open the draw object in the Drawing Objects window to modify its values. You could change the StartY/EndY parameters in the Drawing Objects menu to specify a certain value. The RegionHighlightY drawing object cannot define a value in ticks or percentages. You must pass in a specific value.

    Draw.RegionHighlightY(): https://ninjatrader.com/support/help...gionhighlighty
    <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
      Thank you for your reply,
      I am trying to program my own custom DrawingTool script. and i want to draw a RegionHighlightY wherever on the chart that i click. When i click wherever on the chart, a region with a predefined value of height is drawn. And that i can define the value of height before drawing the region.

      Comment


        #4
        Hello faridsep,

        Thanks for your notes.

        You could create a custom DrawingTool Script that uses two anchors in the drawing tool and come up with your own custom logic to accomplish this specific goal.

        You could view the existing DrawingTool scripts that use multiple anchors and come default with NinjaTrader for an example of how to do anchor placement and reading values of anchors.

        For example, the RegionHighlight DrawinTool script demonstrates using multiple anchors. To view a DrawingTool script, open a New > NinjaScript Editor window, open the DrawingTools folder, and double-click on the DrawinTool script file you want to view.

        Below are some help guide documentation for more information.

        DrawingTools: https://ninjatrader.com/support/help...wing_tools.htm
        Anchors: https://ninjatrader.com/support/help...t8/anchors.htm
        OnRender(): https://ninjatrader.com/support/help...8/onrender.htm
        <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

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        592 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
        554 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X