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

Strategy Analyzer Issue

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

    Strategy Analyzer Issue

    Hi,

    For whatever reason the Strategy Analyzer in NT8 does not seem to be working correctly. The issue is that if I make a change to a strategy, and recompile it (no errors), the analyzer keeps using the old strategy. It doesn't seem to recognize that the strategy script has been updated. Moreover, I have several strategies and it is not picking them up in the strategy field in the property dialog.Is ther eany way to reset the Strategy Analyzer so it works with the correct script? Thank you.

    #2
    Hello Zeos6,

    Thanks for your post.

    If your strategies are not showing up in the drop-down list of strategies of the analyzer then that suggests there is an issue with the strategies themselves.

    Keep in mind that while it may compile successfully, the compiler cannot check "run time" type conditions which can only occur when you run (or load) the strategy.

    A good first step here is to check the "Log" tab of the Ninjatrader Control center and look for any errors related to the strategies as if there is a run time error is would show in the log tab.

    If there are no log errors, check (in the Ninjascript editor open each strategy) to see if the strategies have the same name (IE you made a copy of the strategy and made your changes but unintentionally left the name the same as an existing one).

    In general, you want the filename of the strategy (this is what Ninjascript editor uses to open the script) to be the same as the public class name and most importantly that inside OnStateChange and within State.SetDefaults, the Name = field (This is what the drop-down or strategy selector uses) shows the same name as the public class name.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul,

      Thank you for your reply. Your answer was right on point and resolved my issue immediately. The problem lay in the name field used in OnStateChange(). I had renamed my strategies and hadn't updated that field correctly. Everything works perfectly now. Thank you very much for your help. Really appreciate it.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by algospoke, 04-17-2024, 06:40 PM
      5 responses
      46 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by arvidvanstaey, Today, 02:19 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by mmckinnm, Today, 01:34 PM
      3 responses
      5 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by f.saeidi, Today, 01:32 PM
      2 responses
      8 views
      0 likes
      Last Post f.saeidi  
      Started by alifarahani, 04-19-2024, 09:40 AM
      9 responses
      55 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X