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 kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      89 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      92 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      70 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      87 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      64 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X