Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 geotrades1, Today, 10:02 AM
                0 responses
                3 views
                0 likes
                Last Post geotrades1  
                Started by rajendrasubedi2023, Today, 09:50 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by ender_wiggum, Today, 09:50 AM
                0 responses
                4 views
                0 likes
                Last Post ender_wiggum  
                Started by bmartz, Today, 09:30 AM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by geddyisodin, Today, 05:20 AM
                3 responses
                24 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X