Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access From Date

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

    Access From Date

    Hi,

    I need to access the From Date when doing a backtest. Ideally this could be accessed from the Initialize or OnStartup methods, as I need this information to load historical parameters from a database before the strategy turn on.

    I guess this information is contained in StrategyBase? How can I access this, apart from creating a seperate (and superfluous) input in my own strategy?

    Thanks

    #2
    benoirat, unfortunately there would be no supported programmatic access we could offer for this user property set from the UI - so the custom input you create would be best workaround at this time. We have exposing this info on our feedback list for future consideration though, I've just added your vote in.

    Comment


      #3
      Originally posted by benoirat View Post
      Hi,

      I need to access the From Date when doing a backtest. Ideally this could be accessed from the Initialize or OnStartup methods, as I need this information to load historical parameters from a database before the strategy turn on.

      I guess this information is contained in StrategyBase? How can I access this, apart from creating a seperate (and superfluous) input in my own strategy?

      Thanks
      Just find the DateTime of Bar0.

      Code:
       
      if (CurrentBar == 0) StartDate = Time[0].Date;

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      72 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      44 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      26 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      31 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      61 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X