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 carnitron, Today, 08:42 PM
    0 responses
    5 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    6 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,974 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    8 views
    0 likes
    Last Post rbeckmann05  
    Started by rhyminkevin, Today, 04:58 PM
    4 responses
    58 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Working...
    X