Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

error when exporting ninjascript

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

    error when exporting ninjascript

    Hi there,
    I've created a strategy on my laptop. Now I also u a PC and would like to export the strategy so I can import it in my PC. I get an error while exporting.
    I got error CS0246 It says that the name is not found of certain indicators that I used in the strategy. How can I fix this ?

    Greetings,
    Sebastiaan

    #2
    Hello SebastiaanR,

    Thank you for your post.

    Please follow the instructions below to see where the errors are coming from after compiling your script. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one script, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.

    For NinjaTrader 7:
    • Open NinjaTrader
    • From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
    • Select ANY indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
    • A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
    • At the bottom of the window, a new section will appear where you can find the error locations.
    • From there you have the option to comment out offending code sections, remove the complete script or debug it to be able to compile again.

    For NinjaTrader 8:
    • Open NinjaTrader
    • From the Control Center select the New menu--> select NinjaScript Editor
    • Double click on the Indicators folder--> then double click on any of the indicators
    • Once the indicator code is in view right click in the window and select Compile to compile all NinjaScript objects
    • At the bottom of the NinjaScript Editor window, a new section will appear where you can find the error locations
    • You can exclude the file referenced in the editor by double clicking on the appropriate object type on the right of the NinjaScript Editor window. This will expand the object type folder. You can then select the file with a left click--> right click on the object--> then select Open to begin debugging the file, Exclude From Compilation, or Remove to delete the file.

    If you are unsure as to what the error is indicating, please post a screenshot of the NinjaScript File column and Error column fully visible (not to be confused with the Code column)

    To send a screenshot with Windows 7 or newer I would recommend using the Windows Snipping Tool.

    Click here for instructions

    Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

    Click here for detailed instruction

    We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip in our Help Guide:
    Please let us know if we may be of further assistance.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello SebastiaanR,

      I just wanted to check in with you to see if you were able to resolve your compilation issue. Can you confirm, were you able to resolve your inquiry?

      Thanks in advance; I look forward to assisting you further.
      Kate W.NinjaTrader Customer Service

      Comment


        #4
        Hi Kate,

        Thanks for the follow up. I didn't have time to check it yesterday.
        I just checked and I'm not able to fix the problem. I don't have any compiling errors in my strategy. I just have an error when I try to export the strategy as an add on via tools ->export ->ninjascript add-on.
        I added the errors that I see in the log.
        Error compiling export assembly: c:\Users\reynd\Documents\NinjaTrader 8\bin\Custom\Strategies\MAtrend.cs(32,11) : error CS0246: Het type of de naamruimtenaam MovingAverageRibbon is niet gevonden (ontbreekt er een gebruiksinstructie of assembly-verwijzing?)
        Error compiling export assembly: c:\Users\reynd\Documents\NinjaTrader 8\bin\Custom\Strategies\MAtrend.cs(31,11) : error CS0246: Het type of de naamruimtenaam MovingAverageRibbon is niet gevonden (ontbreekt er een gebruiksinstructie of assembly-verwijzing?)
        Error compiling export assembly: c:\Users\reynd\Documents\NinjaTrader 8\bin\Custom\Strategies\MAtrend.cs(33,11) : error CS0246: Het type of de naamruimtenaam ADX is niet gevonden (ontbreekt er een gebruiksinstructie of assembly-verwijzing?)
        Error compiling export assembly: c:\Users\reynd\Documents\NinjaTrader 8\bin\Custom\Strategies\MAtrend.cs(30,11) : error CS0246: Het type of de naamruimtenaam MovingAverageRibbon is niet gevonden (ontbreekt er een gebruiksinstructie of assembly-verwijzing?)
        Translation is the type of the namespace ... is not found

        Greetings,
        Sebastiaan

        Comment


          #5
          Hello SebastiaanR,

          Thank you for your reply.

          We'll need to take a look at the code for the strategy along with any dependencies (indicators that it uses). Please email us at platformsupport [at] ninjatrader [dot] com and attach the strategy and its dependencies to that email - they can be found in Documents > NinjaTrader 8 > bin > Custom > Strategies and Documents > NinjaTrader 8 > bin > Custom > Indicators. Please place "2518084 ATTN Kate W." in the subject line.

          Thanks in advance; I look forward to assisting you further.
          Kate W.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          14 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          14 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,983 views
          3 likes
          Last Post jhudas88  
          Working...
          X