Draw.RegionHighlightY(this, newprice.ToString(), false, newprice+(.25*Ticks_Per_Level), price, Thin_Spot_Color, Thin_Spot_Color, Region_Opacity)
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!
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
NinjaTrader
How to adjust outline opacity in area highlight?
Collapse
X
-
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:Tags: None
-
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.htmBrandon H.NinjaTrader Customer Service
-
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
-
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.htmBrandon H.NinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by llanqui, Today, 03:53 AM
|
0 responses
2 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
14 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
||
Started by strategist007, Yesterday, 07:51 PM
|
0 responses
14 views
0 likes
|
Last Post Yesterday, 07:51 PM |
Comment