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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      144 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      71 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      125 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      79 views
      0 likes
      Last Post PaulMohn  
      Working...
      X