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

Add On to control Strategy and Strategy Analyzer

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

    Add On to control Strategy and Strategy Analyzer

    Hi

    I have been reviewing documentation regarding Addons in Ninja development.

    Question1. I want to create an add on that will control my strategy by allowing me to add multiple filters or adding additional criteria to my strategy such as volume, momentum filter to check for volume. Basically strategy has its underlying entry criteria but the add on will be able to add or remove criteria. Is this possible?

    Question2. I want to be able to use the addon to backtest and wslkforward test the strategies in strategy analyzer backtests and walkforward tests. Is this possible?

    Thanks
    Junaid




    #2
    Hello bjunaid, thanks for writing in.

    I made this example in the past on a shared static class where other scripts can attach to a "property changed" event so that they can know when a global property has changed:

    https://ninjatrader.com/support/foru...dsaddonexample

    With this concept, a strategy would be able to use global variables from the addon. Code can not be injected into a strategy from an addon.

    Backtesting an addon would not be possible as the strategy analyzer only looks for scripts that inherit from the strategy class.

    Please let me know if I can assist any further.


    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the response.

      I wi take a look at that code you shared much appreciate it.

      If I want to automate the backtesting or forward testing process in order to find the best optimization for the strategy. What approach or tools are available to me.

      currently I have to change the parameters manually when backtesting my strategy which is a very slow process.

      thanks,

      Comment


        #4
        Hello bjunaid, thanks for your reply.

        Unfortunately, there are no supported ways to automate backtesting in the Strategy Analyzer. I would not be able to give any suggestions on that. Using an optimization will iterate through a set of parameters for you and the data series can also be optimized. Also, you can run an optimization on a list of instruments if you create a custom instrument list through Tools>Instrument Lists and selecting that list in the Strategy Analyzer. The other preliminary settings must be set manually.

        Best regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hi

          Is there a way to run the strategy analyzer using an add on and then back test the strategies?

          Comment


            #6
            Hello bjunaid, thanks for your reply.

            There is no supported way to automatically run backtests in the Strategy Analyzer, unfortunately.

            Please let me know if I can help any further.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            30 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            943 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            9 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by rocketman7, Today, 01:00 AM
            0 responses
            7 views
            0 likes
            Last Post rocketman7  
            Started by wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            28 views
            0 likes
            Last Post wzgy0920  
            Working...
            X