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

How do I import a visual studio project into NinjaTrader?

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

    How do I import a visual studio project into NinjaTrader?

    I created a Windows Forms .NET 4.5 solution in Visual Studio.
    How do I get it to work the same way OnBarUpdate() of NinjaTrader?
    Other classes exist, methods, etc exist.

    I am currently recreating the project in Ninjatrader, but I'm getting an InitializeComponent does not exist in the current context error.

    My question is, is there an easy way to import the solution, or do I have to recreate the classes, methods, resources in NinjaTrader?

    I would assume that the easiest solutions was to call the solution in onbarupdate..

    Thanks IA.

    #2
    Hello lakersfan,

    If you are trying to edit NinjaScripts in Visual Studio, click the Visual Studio icon on the top toolbar of the NinjaScript Editor.

    You will not be able to compile in Visual Studio. But if you save a file you have edited in Visual Studio while the NinjaScript Editor is open, NinjaTrader will detect the changes to the file and automatically trigger a compile.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello lakersfan,

      If you are trying to edit NinjaScripts in Visual Studio, click the Visual Studio icon on the top toolbar of the NinjaScript Editor.

      You will not be able to compile in Visual Studio. But if you save a file you have edited in Visual Studio while the NinjaScript Editor is open, NinjaTrader will detect the changes to the file and automatically trigger a compile.

      https://ninjatrader.com/support/help..._debugging.htm
      Hi Chelsea,

      I was able to recreate the Windows Form in NT8, however, I am getting "calculating" on the chart. It seems as though the windows forms application "pauses" onbarupdate. Once I close the forms application, onbarupdate continues. Do you know what I can do maintain the forms application open, and continue with onbarupdate and the chart?

      Comment


        #4
        Hello lakersfan,

        It sounds like you are trying to do something that is not supported by NinjaTrader like make a new windows form window..

        Is all of the code in the script documented in the NinjaTrader Help Guide?


        As a heads up, NinjaTrader 8 uses WPF and does not use WinForms..

        Below is a link to an example that opens a new window (but does not use WinForms).
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Hello lakersfan,

          It sounds like you are trying to do something that is not supported by NinjaTrader like make a new windows form window..

          Is all of the code in the script documented in the NinjaTrader Help Guide?


          As a heads up, NinjaTrader 8 uses WPF and does not use WinForms..

          Below is a link to an example that opens a new window (but does not use WinForms).
          https://ninjatrader.com/support/foru...686#post492686
          Thank you!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CortexZenUSA, Today, 12:53 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Started by CortexZenUSA, Today, 12:46 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Started by usazencortex, Today, 12:43 AM
          0 responses
          5 views
          0 likes
          Last Post usazencortex  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          168 responses
          2,265 views
          0 likes
          Last Post sidlercom80  
          Started by Barry Milan, Yesterday, 10:35 PM
          3 responses
          11 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X