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

How to adjust outline opacity in area highlight?

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

    How to adjust outline opacity in area highlight?

    Hello, I would like to set my outline opacity to zero on an auto drawn highlight. Here is my code:
    Code:
    Draw.RegionHighlightY(this, newprice.ToString(), false, newprice+(.25*Ticks_Per_Level), price, Thin_Spot_Color, Thin_Spot_Color, Region_Opacity)
    How would I go about doing this?

    #2
    Hello rbeckmann05,

    Thanks for your post.

    If you want to change the opacity argument for a specific draw object when a specific condition becomes true, you would need to call the Draw.RegionHighlightY() method again using the same exact Tag name and pass the new opacity value you want to use (0) in the 'int areaOpacity' argument.

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

    From the help guide:

    Tag:
    A user defined unique id used to reference the draw object.
    For example, if you pass in a value of "myTag", each time this tag is used, the same draw object is modified. If unique tags are used each time, a new draw object will be created each time.


    See the help guide documentation below for more information.

    Draw.RegionHighlightY(): https://ninjatrader.com/support/help...highlighty.htm
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Hi Brandon,

      Thank you for the quick response. I am not necessarily interested in changing the area opacity, but instead the outline opacity. More specifically setting it to zero. I know its possible in manually drawn region highlights, so I figured it is possible with auto drawn highlights. Is there a different method I can use to change the outline opacity instead of area opacity?

      Comment


        #4
        Hello rbeckmann05,

        Thanks for your notes.

        You may consider creating and saving a Drawing Tool Template for the Region Highlight Y drawing tool and then use the Draw.RegionHighlightY() syntax that allows you to specify a template name.

        The name of the Drawing Tool Template you saved could be passed into the 'string templateName' argument so the Region Highlight Y drawing tool is drawn on the chart using the saved template parameters.

        Draw.RegionHighlightY(NinjaScriptBase owner, string tag, double startY, double endY, bool isGlobal, string templateName)

        See the Draw.RegionHighlightY() help guide document link on post # 2 for more information.

        Here is a help guide page about Understanding Drawing Object Templates: https://ninjatrader.com/support/help..._tools__ob.htm
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          That worked, thanks for the help!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Started by Fitspressorest, Today, 01:38 PM
          0 responses
          2 views
          0 likes
          Last Post Fitspressorest  
          Started by Jonker, Today, 01:19 PM
          0 responses
          2 views
          0 likes
          Last Post Jonker
          by Jonker
           
          Started by futtrader, Today, 01:16 PM
          0 responses
          8 views
          0 likes
          Last Post futtrader  
          Started by Segwin, 05-07-2018, 02:15 PM
          14 responses
          1,792 views
          0 likes
          Last Post aligator  
          Working...
          X