Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Session background color - in the future/not bars-based

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

    Session background color - in the future/not bars-based

    Hi,

    I'm looking to color session backgrounds -- in the future -- before any bars exist at those times.
    - e.g. background color the New York session --- at the bell --- before any bars come in.

    All the examples I find are after-the-fact, after there are bars.
    A few provide links to https://ninjatraderecosystem.com/ that is too slow to use and search doesn't work.

    Is there no way to do this?
    -- Draw.Region appears to require bars yet provides a start/end time version I can't get to work.

    Thanks,
    trober

    #2
    Hello trober,

    Thank you for your post.

    You could use custom rendering to achieve this. You can custom render a rectangle to the right of the bars.

    I recommend taking a look at the SampleCustomRender indicator in the platform, which demonstrates coloring the background.



    Please let us know if you have any further questions.

    Comment


      #3
      Thank you for reply.


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

      So, Draw.Region does *not* provide a *time-based only* way to do this?
      Last edited by trober; 11-19-2024, 12:36 PM.

      Comment


        #4
        Hello,

        Drawing into the future is not supported with Draw objects, which is why custom rendering is suggested. Draw objects are meant to be anchored to specific bars or bar time stamps that have already occurred.

        You could try to use the Draw.Region() overload which allows you to specify startTime and endTime. However, note that this would only work for time-based bars where the future timestamps are already known - and as it's not supported, we can't guarantee that the object will function as expected.

        The supported solution would be to custom render.

        Please let me know if you have any further questions.
        Last edited by NinjaTrader_Gaby; 11-19-2024, 12:55 PM.

        Comment


          #5
          No further questions. I do appreciate the reply. It's saved me a lot of time making more attempts at this.

          My solution: set the charts Appearance background color accordingly - to match the NY session background. Then, overwrite the globex session with another shade.

          That way, the color into the future matches although there are no bars.

          Thank you

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          596 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 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
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          554 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X