Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change the Opacity of a Ray

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

    Change the Opacity of a Ray

    Hi

    I try to paint an area from a certain bar (High an Low of that bar) until that area has been broken by price (when I remove the draw object).

    I use a Ray object to do this and it contains with a certain width. But the problem is that I cannot see the background any more. How could I change the opacity of a ray?



    The documentation mentions on Draw.Ray() :
    templateName The name of the drawing tool template the object will use to determine various visual properties (empty string could be used to just use the UI default visuals instead)
    But I don't understand that. Is this the way to change the opacity ? Does anyone know any examples of using the templateName ?

    Thanks


    #2
    Hello investor,

    You can use a Brush variable to create a new brush with opacity and supply this to the draw method call. When doing this the brush must be frozen with Freeze() before use.
    https://ninjatrader.com/support/help...gcustombrushes
    https://ninjatrader.com/support/help...#Errorhandling

    Or you can use the interface to select a color with opacity, and then save this as the default template for the draw object.
    https://drive.google.com/file/d/1JPc...ew?usp=sharing
    https://ninjatrader.com/support/help...bjectTemplates

    The template name would be the name you save the template with in the interface.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X