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

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 pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    11 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    16 views
    0 likes
    Last Post AaronKoRn  
    Working...
    X