Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

[FEATURE REQUEST] Strategy backtest completed callback

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

    [FEATURE REQUEST] Strategy backtest completed callback

    Hello guys,

    would it be possible to add new virtual method which will be executed when Backtesting is completed.


    PHP Code:

    protected override void OnBacktestingCompleted(TradeCollection trades) { /* single*/ }
    protected 
    override void OnBacktestingCompleted(TradeCollection[] trades) { /* or multiple/optimization/etc */ }

    // OR        

    protected override void OnBacktestingCompleted(SystemPerformance performance) { /* single */ }
    protected 
    override void OnBacktestingCompleted(SystemPerformance[] performance) { /* or multiple/optimization/etc */ 

    I know I can get almost but not the same with code below (but issue here that I never will get last closed trade which was closed by NT by On Session Close because of End of historical period):

    PHP Code:
    if (CurrentBars[BarsInProgress] == BarsArray[BarsInProgress].Count-2) {} 

    So please if you could add this feature into your backlog would be very great.

    Thanks!



    #2
    Hi login_dejavu, thanks for your post.

    I will submit a feature request and report back here with a tracking ID. We appreciate your input. We do have the IsInStrategyAnalyzer property and with the detection of the State.Terminated one can know when a backtest is over.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hi login_dejavu, thanks for your post.

      I will submit a feature request and report back here with a tracking ID. We appreciate your input. We do have the IsInStrategyAnalyzer property and with the detection of the State.Terminated one can know when a backtest is over.
      Hi Chris,

      I didn't know about IsInStrategyAnalyzer, checked, it works as expected. So I guess you can ignore my feature request then. I understand that maybe in terms of code it is not much to add, but with all documentation/etc... to be production ready can be to much worry.


      Thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Shansen, 08-30-2019, 10:18 PM
      24 responses
      942 views
      0 likes
      Last Post spwizard  
      Started by Max238, Today, 01:28 AM
      0 responses
      9 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by rocketman7, Today, 01:00 AM
      0 responses
      4 views
      0 likes
      Last Post rocketman7  
      Started by wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      28 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      33 views
      0 likes
      Last Post wzgy0920  
      Working...
      X