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 judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Today, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Today, 07:39 PM
      0 responses
      7 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Today, 03:01 PM
      2 responses
      21 views
      0 likes
      Last Post helpwanted  
      Started by cre8able, Today, 07:24 PM
      0 responses
      10 views
      0 likes
      Last Post cre8able  
      Working...
      X