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 haas88, 03-21-2024, 02:22 AM
      18 responses
      208 views
      0 likes
      Last Post haas88
      by haas88
       
      Started by Board game geek, Today, 02:20 AM
      0 responses
      2 views
      0 likes
      Last Post Board game geek  
      Started by knighty6508, Today, 01:20 AM
      2 responses
      14 views
      0 likes
      Last Post knighty6508  
      Started by franatas, Today, 01:53 AM
      0 responses
      3 views
      0 likes
      Last Post franatas  
      Started by knighty6508, Today, 01:17 AM
      0 responses
      9 views
      0 likes
      Last Post knighty6508  
      Working...
      X