Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Background Color

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

    Chart Background Color

    I'd like the background of a chart to be a certain color for a given time period everyday.
    My chart uses range bars.
    In this case, I'm using market replay.
    I tried myself but so far no luck.

    Help is appreciated.

    #2
    There is this indicator that I have used before.
    Multi functional repeater of up to 10 X and/or Y Highlight regions daily or day of week. User interface expands for up to 10 events. Each event configurable as a time region, price region, fixed rectangle or dynamic rectangle (adjusts on price), select a day of the week or daily. Update 6/18/2018 V2.2 ‐ Added […]

    You could use that, or use the Editor to open it up and look how they do it.

    Comment


      #3
      Hello reynoldsn,

      Thank you for your post.

      You may use the BackBrush property to paint the chart panel's background color for the current bar. In the example below, I use the ToTime() method to specify a given time period.

      Code:
      protected override void OnBarUpdate()
      {
      if (CurrentBar < 1)
      return;
      if (ToTime(Time[0]) >= ToTime(9, 45, 00) && ToTime(Time[0]) <= ToTime(12, 45, 00))
      BackBrush = Brushes.Red;
      // Sets the color of the background on the current bar as red
      }
      For more information, please consult the following Help Guide pages:Please let me know if I may be of any further assistance.​

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      81 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      150 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      79 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      52 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      59 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X