Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to detect plot color change according to bar?

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

    Is it possible to detect plot color change according to bar?

    Hi
    I know the following:

    Code:
    protected override void OnStateChange()
    {
    if(State == State.SetDefaults)
    {
    Name = "Example Indicator";
    AddPlot(Brushes.Transparent, "Any");
    }
    }
    
    protected override void OnBarUpdate()
    {
    if (Close[0] > Open[0])
    PlotBrushes[0][0] = Brushes.Blue;
    else
    PlotBrushes[0][0] = Brushes.Red;
    }
    The plot color is drawn differently in each bar depending on the close and open price.

    However, what I want is the opposite.
    There is an indicator that I cant see source.
    I can access this plot in my code and get its value, but I can't get its color.
    Is there any way to implement this?

    I apologize if I didn't explain it well.
    Thanks.
    Last edited by truepenny; 11-13-2024, 11:35 PM.

    #2
    Hello truepenny,

    Thank you for your post.

    To clarify, you want to programmatically get the color the bar is being painted via another closed source script?

    Unfortunately, there are no supported or documented means for checking if the brush color of a third-party indicator's plot is a specific brush color for conditions.

    You could reach out to the developer of the closed source script, and request they implement something so you can obtain this information programmatically, or let you know the logic they're using for painting the bars so you could implement this within your own script.

    Please let us know if you have any further questions.

    Comment


      #3
      Thanks,Gaby.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      652 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      577 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X