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

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

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        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  
        Working...
        X