Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

gradual opacity for backbrush

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

    gradual opacity for backbrush

    Hello,
    with regard to indicator VolumeSpickeNT8 small body candles are not clearly visible when overlapped by backbrush. I have tried to solve this by modifying the code as follows:
    {
    //BackBrush = Brushes.Green;
    Draw.RegionHighlightX(this, @"longSignal_1 " + Convert.ToString(CurrentBars[0]), 1, 0, Brushes.Transparent, Brushes.Green, Convert.ToInt32(Opacity));
    }
    But in this way the background color does not exactly overlap to the bar as it was the case before using BackBrush. Is there a way to have selectable opacity for the BackBrush? so that the color is centered on the candle? Thx.
    Click image for larger version

Name:	ES 06-20 (7 Minute) 2020_05_04 (20_33_47).png
Views:	480
Size:	127.5 KB
ID:	1099035


    #2
    Hello guidoisot,

    Thanks for your post.

    The Draw methods will draw from the center of one bar to the center of another bar.
    The BackBrush method has been designed to be centered on the bar that it is applied to.

    You can create a brush and set its opacity as you wish, that brush can then be applied to the BackBrush method.

    Here is an example, done in State.Configure:

    Brush temp = PanelColorCrossAbove.Clone(); // Create a temporary copy of the user created Brush PanelColorCrossAbove
    temp.Opacity = BackgroundOpacity / 100.0; // set the desired opacity
    temp.Freeze(); // freeze the brush (required)
    PanelColorCrossAbove = temp; // assign the temp brush to the brush that will be used later in OnBarUpdate[/CODE]




    Comment


      #3
      Thank you Paul. I remember now you already explained this, or something very similar, in a previous post ... apologies for duplicating the question. Best.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      105 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      52 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      34 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      38 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      74 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X