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

Modifying the Optimization

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

    Modifying the Optimization

    Hi,

    I want to edit the optimization function at bit so I can provide it a range of values (factors that will multiply the ATR) so that and I cand find which factor multiplied by the ATR provides the best trailing stop loss.

    I basically need to add a few fields to it but dont know where to add the code.

    Any advice would be much appreciated.

    Mike

    #2
    Mike,

    You can only optimize on user parameters you create in the code. To create a user parameter you will have to custom program it into your strategy. Please take a look at the SampleMACrossOver strategy for an example. You can see how it creates the parameters for Fast and Slow. Pay special attention to what is in the Variables region of the code and the Properties region of the code. Make sure you are mindful as to what is capitalized and what is not.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh.

      Also, is there a way to autmate a lot of this backtesting and print the results to a text file / excel file. Its just we want to apply the strategy to over 1000 stocks and analyze the results.

      Thanks

      Mike

      Comment


        #4
        mcirl2,

        You can basket backtest your stocks all at once. As far as writing to an Excel file is beyond the scope of what we support. You can write to files, but that needs to be done with some more advanced C# programming in your strategy itself.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by cshox, Yesterday, 11:11 AM
          4 responses
          23 views
          0 likes
          Last Post cshox
          by cshox
           
          Started by EliIsrael, Today, 08:15 AM
          0 responses
          4 views
          0 likes
          Last Post EliIsrael  
          Started by ETFVoyageur, Today, 02:15 AM
          1 response
          16 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by lorem, 04-25-2024, 09:18 AM
          21 responses
          90 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by mlprice12, 12-21-2021, 04:55 PM
          5 responses
          309 views
          0 likes
          Last Post paypachaysa  
          Working...
          X