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 Balage0922, Today, 07:38 AM
                0 responses
                3 views
                0 likes
                Last Post Balage0922  
                Started by JoMoon2024, Today, 06:56 AM
                0 responses
                6 views
                0 likes
                Last Post JoMoon2024  
                Started by Haiasi, 04-25-2024, 06:53 PM
                2 responses
                19 views
                0 likes
                Last Post Massinisa  
                Started by Creamers, Today, 05:32 AM
                0 responses
                6 views
                0 likes
                Last Post Creamers  
                Started by Segwin, 05-07-2018, 02:15 PM
                12 responses
                1,786 views
                0 likes
                Last Post Leafcutter  
                Working...
                X