Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

last bar of backtest

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

    last bar of backtest

    is there a method to call the last bar of a back test (strategy analyzer)? I am printing some results to a file and I want to wait until the backtest is over to print, in order to save processing time printing on each bar update

    I tried Bars.PercentComplete but it just printed on each bar

    #2
    Hello eurostoxx trader,
    There is no way to know the last bar while backtesting. However if you want to know when the backtest has ended, then you can append the note in the OnTermination code to do it.
    Code:
    protected override void OnTermination()
    {
    	Print("Backtesting done");
    }
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Perfect, thanks so much.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      68 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X