Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Opacity of BarPlot Indicator

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

    Opacity of BarPlot Indicator

    Anyone figure out how to do an Opacity of 50% for bar plots in an indicator?

    I tried this and it seems to ignore the Opacity of 50% by the time the indicator runs.

    Code:
     [COLOR=#080808]Pen[/COLOR] [COLOR=#080808]m_PinkPen50[/COLOR]=[COLOR=#0000ff]new[/COLOR] [COLOR=#080808]Pen[/COLOR]([COLOR=#0000ff]new[/COLOR] [COLOR=#080808]SolidColorBrush[/COLOR]([COLOR=#080808]Colors[/COLOR].[COLOR=#080808]DeepPink[/COLOR]),[COLOR=#ff8c00]0.5[/COLOR]); 
     [COLOR=#080808]Pen[/COLOR] [COLOR=#080808]m_BlackPen50[/COLOR]=[COLOR=#0000ff]new[/COLOR] [COLOR=#080808]Pen[/COLOR]([COLOR=#0000ff]new[/COLOR] [COLOR=#080808]SolidColorBrush[/COLOR]([COLOR=#080808]Colors[/COLOR].[COLOR=#080808]Black[/COLOR]),[COLOR=#ff8c00]0.5[/COLOR]); 
     
     [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]Brushes[/COLOR].[COLOR=#080808]LimeGreen[/COLOR], [COLOR=#b22222]"LinRegSmoothed"[/COLOR]);
     [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]Brushes[/COLOR].[COLOR=#080808]Red[/COLOR], [COLOR=#b22222]"Slope"[/COLOR]);
     [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]Brushes[/COLOR].[COLOR=#080808]Black[/COLOR], [COLOR=#b22222]"Accel"[/COLOR]);
     [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]m_PinkPen50[/COLOR],[COLOR=#080808]PlotStyle[/COLOR].[COLOR=#080808]Bar[/COLOR], [COLOR=#b22222]"SlopeInt"[/COLOR]);
     [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]m_BlackPen50[/COLOR],[COLOR=#080808]PlotStyle[/COLOR].[COLOR=#080808]Bar[/COLOR], [COLOR=#b22222]"AccelInt"[/COLOR]);

    #2
    That's 1/2 of 1%.


    Comment


      #3
      Okay,

      I think I figured it out... That was WIDTH not Opacity in the PEN constructor. This works:
      Code:
       [COLOR=#080808]Brush[/COLOR] [COLOR=#080808]b_Pink[/COLOR]=[COLOR=#0000ff]new[/COLOR] [COLOR=#080808]SolidColorBrush[/COLOR]([COLOR=#080808]Colors[/COLOR].[COLOR=#080808]DeepPink[/COLOR]);
       [COLOR=#080808]b_Pink[/COLOR].[COLOR=#080808]Opacity[/COLOR]=[COLOR=#ff8c00]0.5[/COLOR];
       
       [COLOR=#080808]Brush[/COLOR] [COLOR=#080808]b_Black[/COLOR]=[COLOR=#0000ff]new[/COLOR] [COLOR=#080808]SolidColorBrush[/COLOR]([COLOR=#080808]Colors[/COLOR].[COLOR=#080808]Black[/COLOR]);
       [COLOR=#080808]b_Black[/COLOR].[COLOR=#080808]Opacity[/COLOR]=[COLOR=#ff8c00]0.5[/COLOR];
       
       [COLOR=#080808]Pen[/COLOR] [COLOR=#080808]m_PinkPen50[/COLOR]=[COLOR=#0000ff]new[/COLOR] [COLOR=#080808]Pen[/COLOR]([COLOR=#080808]b_Pink[/COLOR],[COLOR=#ff8c00]1.0[/COLOR]); 
       [COLOR=#080808]Pen[/COLOR] [COLOR=#080808]m_BlackPen50[/COLOR]=[COLOR=#0000ff]new[/COLOR] [COLOR=#080808]Pen[/COLOR]([COLOR=#080808]b_Black[/COLOR],[COLOR=#ff8c00]1.0[/COLOR]); 
       
       [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]Brushes[/COLOR].[COLOR=#080808]LimeGreen[/COLOR], [COLOR=#b22222]"LinRegSmoothed"[/COLOR]);
       [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]Brushes[/COLOR].[COLOR=#080808]Red[/COLOR], [COLOR=#b22222]"Slope"[/COLOR]);
       [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]Brushes[/COLOR].[COLOR=#080808]Black[/COLOR], [COLOR=#b22222]"Accel"[/COLOR]);
       [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]m_PinkPen50[/COLOR],[COLOR=#080808]PlotStyle[/COLOR].[COLOR=#080808]Bar[/COLOR], [COLOR=#b22222]"SlopeInt"[/COLOR]);
       [COLOR=#080808]AddPlot[/COLOR]([COLOR=#080808]m_BlackPen50[/COLOR],[COLOR=#080808]PlotStyle[/COLOR].[COLOR=#080808]Bar[/COLOR], [COLOR=#b22222]"AccelInt"[/COLOR]);
      hopefully I get the hang of Brushes & Pens soon... Seems complex to do simple things... Think this requires a helper class in my mind.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      670 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      379 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      582 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X