Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Retrieve backtest TimeFrame Parameters in a Ninja Strategy

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

    Retrieve backtest TimeFrame Parameters in a Ninja Strategy

    Hello,

    Is there a way to retrieve, into a backtested Strategy Script, the Time Frame parameters (From and To) that have been entered in the Strategy Analyser backtest panel (TimeFrame Section)?

    Thank you in advance.

    Regards.

    #2
    Hello,

    I don't think this is supported. I will have someone confirm my assumption.
    DenNinjaTrader Customer Service

    Comment


      #3
      Jean-Marc-Molina,

      Unfortunately not. What you can do is to just use the ToDay(Time[0]) to get the dates though. The first return will be the starting date the strategy begins running at and the last date will be the ending date of the strategy.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Josh View Post
        Jean-Marc-Molina,

        Unfortunately not. What you can do is to just use the ToDay(Time[0]) to get the dates though. The first return will be the starting date the strategy begins running at and the last date will be the ending date of the strategy.
        Hello Josh,

        Thank you for your answer. I need this feature in order to print in the output file some custom stats right before the backtest is finished. In the meantime, I will add another "To .. Date" Field for each strategy in the backtest panel and will use this one. Please let me know if this feature is added in future versions.

        Regards.


        JM

        Comment


          #5
          JM,

          You can already do what you want through custom programming. Though it may not be the most convenient route it is already possible.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            What's the best way to do this? Basically, when the backtest is done, I want to call a method that will show me what I need (in terms of custom stats). What I want to know is is there any event that is triggered when the strategy has stopped being backtested? Or do I have to do it another way?

            Cheers

            Comment


              #7
              If you are using NT7 you can try using the OnTermination() method.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Ok great this works. Thanks for the help.

                Phil

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Hwop38, 05-04-2026, 07:02 PM
                0 responses
                168 views
                0 likes
                Last Post Hwop38
                by Hwop38
                 
                Started by CaptainJack, 04-24-2026, 11:07 PM
                0 responses
                322 views
                0 likes
                Last Post CaptainJack  
                Started by Mindset, 04-21-2026, 06:46 AM
                0 responses
                246 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by M4ndoo, 04-20-2026, 05:21 PM
                0 responses
                350 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Started by M4ndoo, 04-19-2026, 05:54 PM
                0 responses
                179 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Working...
                X