Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting candle outline color via ChartControl

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

    Getting candle outline color via ChartControl

    Hello,

    I am currently having trouble getting the default color of the candle outline (the color set in the chart's 'Data Series' dialog). I'm fairly certain the following has worked for me in the past but it keeps returning an empty color (0, 0, 0) no matter what I try.

    I am attempting to store the candle outline color to colorvariable as the first few bars of the chart are plotted like so:

    if (CurrentBar < 3)
    {
    if (ChartControl != null)
    {
    colorvariable = ChartControl.CandleOutlineColorSeries[0];
    }
    return;
    }

    Does ChartControl.CandleOutlineColorSeries[0] return an empty color value for anyone else?

    #2
    Hello,

    Thank you for the post.

    Getting the Default value is not a documented property but is possible. The code you are currently using is only a Place Holder series meaning that a Color would need to be set for the bar being checked for the value to not be empty.

    For getting the default values from the ChartControl, you could see the following posts where users have used some of the various properties. For this specifically you would need to use the ChartControl.ChartStyle.Pen object.




    I look forward to being of further assistance.

    Comment


      #3
      Perfect, that's what I needed. Thanks!

      Updated code:
      if (CurrentBar < 3)
      {
      if (ChartControl != null)
      {
      colorvariable = ChartControl.ChartStyle.Pen.Color;
      }
      return;
      }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      585 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      340 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X