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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      42 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      29 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      46 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X