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 zstheorist, Today, 07:52 PM
      0 responses
      3 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      149 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      5 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Started by tkaboris, Today, 05:13 PM
      0 responses
      5 views
      0 likes
      Last Post tkaboris  
      Working...
      X