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 kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      90 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