Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

There are PlotBrushes[0][0] but what about PlotStrokes[0][0]?

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

    There are PlotBrushes[0][0] but what about PlotStrokes[0][0]?

    Hello,

    This is just a general question. I am interested in more flexibility when modifying a plot line.

    I would like to vary the Opacity of an AddPlot line on a subpanel. Using Plots[0] I can vary the Opacity, Width, and Color. My problem with this method color is changed for the entire plot line not just a single or more bars like PlotBrushes[0][0] can. Unfortunately, I have found that PlotBrushes[0][0] does not provide Opacity as a changeable option.

    If instead of PlotBrushes[0][0], PlotStrokes[0][0] existed, it could provide color changes, Opacity, and by extension Width all per-bar?

    If it is not available now, is it planned? If not, could you shed some light on why not.

    #2
    Hello MartinT,

    You can use opacity with PlotBrushes but you need to make your own brush that has opacity. Brushes by default have 100% opacity meaning their completely solid.

    To make a brush that has opacity you need to define a new brush, set its opacity and then freeze it before setting to to PlotBrushes.

    https://ninjatrader.com/support/help...ghtsub=brushes

    Code:
    SolidColorBrush myBrush = new SolidColorBrush(Brushes.Red.Color);
    myBrush.Opacity = 0.25;
    myBrush.Freeze();
    ​​

    Comment


      #3
      Hi Jesse,

      Hey, Very Cool. Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      93 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      138 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      123 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      73 views
      0 likes
      Last Post PaulMohn  
      Working...
      X