Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Conditional PlotBrush Color and Size

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

    Conditional PlotBrush Color and Size

    Hi,

    I am struggling with getting my indicator to plot in a sub panel a small dot when the code doesn't meet the criteria and then if either of the two conditional statements is true, I would like it to enlarge only the dot that meets either of the two criteria. The dots color correctly, however, they all either go small or large in all previous bars.

    Please consider the following script:

    Plots[0].Width = 1;
    PlotBrushes[0][0] = Brushes.DimGray;

    if (Value[0] > .92 && Trend1 > (Trend2 - 6*TickSize))
    {
    Plots[0].Width = 3;
    PlotBrushes[0][0] = Brushes.LimeGreen;
    }
    if (Value[0] < .08 && Trend1 < (Trend2 + 6*TickSize))
    {
    Plots[0].Width = 3;
    PlotBrushes[0][0] = Brushes.Fuchsia;
    }

    Thanks in advance for your help.​

    #2
    Hello zoom zoom 126,

    Thank you for your post.

    Unfortunately, there are no documented or supported means for changing the width of a segment of a plot. The width can be set for the entire plot, however, not for a specific section of the plot.

    That said, this thread will be open for other community members to share their insight on possible undocumented ways to accomplish this.

    Please let us know if you have any further questions. ​

    Comment


      #3
      Originally posted by zoom zoom 126 View Post
      Hi,

      I am struggling with getting my indicator to plot in a sub panel a small dot when the code doesn't meet the criteria and then if either of the two conditional statements is true, I would like it to enlarge only the dot that meets either of the two criteria. The dots color correctly, however, they all either go small or large in all previous bars.

      Please consider the following script:

      Plots[0].Width = 1;
      PlotBrushes[0][0] = Brushes.DimGray;

      if (Value[0] > .92 && Trend1 > (Trend2 - 6*TickSize))
      {
      Plots[0].Width = 3;
      PlotBrushes[0][0] = Brushes.LimeGreen;
      }
      if (Value[0] < .08 && Trend1 < (Trend2 + 6*TickSize))
      {
      Plots[0].Width = 3;
      PlotBrushes[0][0] = Brushes.Fuchsia;
      }

      Thanks in advance for your help.​
      You can not change the plot width. But you can use the same criteria to just change the color of the plot. You can also use Draw tools to draw an arrow or a dot, etc. when Plot[0] crosses the 0.92 or 0.08 lines with the colors that mactch your criteria for visual or as a buy sell / signal.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      556 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X