Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsType bars.ToDate does not seem to be read only

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

    BarsType bars.ToDate does not seem to be read only

    Dear Team,
    I'm using a variable tempDate = bars.ToDate to read the value of DataSeries/Time frame/End date as a reference point.
    This works fine until I display an indicator, and the then tempDate variable seems to track the date of the indicator as it is loaded in (I have Tick Replay enabled on the Data Series), rather than keeping its original value, which I would have thought would be a read only end date, as shown in the UI.

    Is there a way to ensure that bars.ToDate is a read only (fixed) date ?
    Or is there another way to get DataSeries/Time frame/End date that ensures it's read only ?

    Thanks,
    Louis

    #2
    Hello Louis365,

    Thanks for your post.

    This property is not documented/unsupported, so we may come across some behavior that we do not expect, especially when using Tick Replay. Through my testing, I see where this value changes in OnBarUpdate when using Tick Replay. I would instead suggest accessing this value in State.DataLoaded and to save it to a private variable so you can access it in OnBarUpdate when it is not changing.

    Considering that this value gives us the ToDate from the DataSeries window, this value could also update when the indicator has run for longer than a day. It may also be helpful to update the variable when OnBarUpdate is processing State.Realtime.

    As this item is unsupported, our recommendations would be limited to our immediate observations. However, I hope this information will be helpful for you to attain your goal.

    If you have any other inquiries, please don't hesitate to open a new thread.

    Comment


      #3
      Thanks Jim, excellent response.
      Thanks for your help.
      Louis

      Comment

      Latest Posts

      Collapse

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