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:	386
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]




    Paul H.NinjaTrader Customer Service

    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 helpwanted, Today, 03:06 AM
      0 responses
      3 views
      0 likes
      Last Post helpwanted  
      Started by Brevo, Today, 01:45 AM
      0 responses
      7 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by aussugardefender, Today, 01:07 AM
      0 responses
      5 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      242 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      384 views
      1 like
      Last Post Gavini
      by Gavini
       
      Working...
      X