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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      596 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      343 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      556 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      554 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X