Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategies not Available in Ninja Trader 8 Strategy List

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

    Strategies not Available in Ninja Trader 8 Strategy List

    I have developed several strategies that are available to me in Ninja Trader 8 to load unto charts. However, I have a few that are not even listed under the NinjaScript Explorer, hence not available to load on charts. I don't know if the following warning message and build debug message shown below have something to do with it. I appreciate any help you can provide me.

    Warning MSB3270 There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference "PresentationCore", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

    1>------ Build started: Project: NinjaTrader.Custom, Configuration: Debug x64 ------
    1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64 \Microsoft.Common.CurrentVersion.targets(2389,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference "PresentationCore", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
    1>C:\Program Files\dotnet\sdk\8.0.204\Sdks\Microsoft.NET.Sdk.Wi ndowsDesktop\targets\Microsoft.WinFX.targets(211,9 ): error MC1000: Unknown build error, 'Could not find assembly 'InfragisticsWPF4.v15.1, Version=15.1.20151.2055, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.'
    1>Done building project "NinjaTrader.Custom.csproj" -- FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    ========== Build completed at 10:34 AM and took 00.445 seconds ==========


    #2
    Hello,

    I'm sorry for waiting this long to reply to you. The version of NinjaTrader I'm using is 8.1.3.0. I compiled a starter strategy using Strategy Builder, then I opened NinjaScript Editor to use the built in Microsoft Visual Studio to code and compile the strategy without any errors. I exited Microsoft Visual Studio and closed the NinjaScript Editor and restarted NinjaTrader. Now, when I open NinjaScript Editor, the strategy is listed under NinjaScript Explorer>Strategies but when I try to open it I get a pop-up stating that I can only open/edit the strategy using Microsoft Visual Studio. Also, when I launch Microsoft Visual Studio, the strategy is there listed along with my other strategies that I developed using the same process. When I open NinjaScript Editor, right clicked on the canvass, the clicked on Compile, I'm not getting any error messages. I'll greatly appreciate any help you can provide. Again, this a strategy I developed. The strategy appears in the NinjaTrader Editor window when I open a New > NinjaScript Editor and open the Strategies folder. The issue is that it is not appearing, like others I've developed, in the NinjaTrader > Control Center > Strategies list. Thanks
    Last edited by benmarkal; 06-02-2024, 10:16 AM.

    Comment


      #3
      Hello benmarkal,

      If the strategy is not appearing when you try to apply it check the control center log tab to see if you are getting any errors. Any errors in the strategies code when its run will cause it to not show up in the user interface to be selected. That can also happen if you have a naming problem in the strategy. You need to make sure the strategies file name, class name and name being set in SetDefaults are all the same. If you make copies of scripts outside of NinjaTrader that is a common item to happen since the strategy is named in 3 locations.

      As a side note you can initially create strategies using the builder but once you manually edit that code it won't be able to be used in the builder any more. If you created the script in the builder and did not unlock it before editing it visual studio that will be an issue. The steps to manually edit the code would be: Create strategy in builder, Click Unlock, Open strategy in NinjaScript editor, Optionally click VS button to edit in visual studio.

      If you want to still use the builder and are just experimenting with some manual code changes I would suggest using the Save As feature in the builder drop down list of strategy, that lets you save a copy of the strategy that you can unlock and manually edit.If you want to start over you can just save a copy again and edit the copy leaving the original builder strategy in the strategy builder.

      Regarding your original post, the warnings that Visual studio produces can be ignored. You need to make sure the compile was successful by using the NinjaScript editor. Building from visual studio is not supported, you just open and edit files in VS and to compile you save the file, the ninjaScript editor picks up the file change and compiles.
      Last edited by NinjaTrader_Jesse; 06-03-2024, 12:47 PM.

      Comment


        #4
        Hello,

        Thanks for getting back to me. When I create a strategy using Strategy Builder which I'm going to edit using Visual Studio, what is the correct sequence of steps I must take to avoid not having the finished strategy show up in the NinjaTrader Strategies list? For example, after assigning a name for the strategy in the Builder, do I need to compile it first, unlock the code and then use the Visual Studio in NinjaScript Editor to edit and Build or compile it again after editing? This is where I'm confused! Any help you could provide to the proper protocol and/or steps to following when creating a strategy using the Builder and Visual Studio. Thanks

        Comment


          #5
          Hello benmarkal,

          I had mentioned the steps in the last post, here they are:

          As a side note you can initially create strategies using the builder but once you manually edit that code it won't be able to be used in the builder any more. If you created the script in the builder and did not unlock it before editing it visual studio that will be an issue. The steps to manually edit the code would be: Create strategy in builder, Click Unlock, Open strategy in NinjaScript editor, Optionally click VS button to edit in visual studio.
          When you unlock the code that gives you a new file with the code, you would need to have previously compiled in the builder or in the script to see that being used. When you first generate a new file regardless if that is in the builder or the editor that only makes a new file. Compiling is part of the development process that has to be done to see changes in the platform. When using visual studio you save the file after making changes to compile.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          557 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X