Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exporting Ninja Script Problems

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

    Exporting Ninja Script Problems

    I am getting errors compiling export sources. Error CS0103 The name nBars Down does not exist in current context.

    what is up with this?

    The same problem happens when my strategy has Bollinger Indicators as well.

    Please advise.

    #2
    Ironplates,

    I am happy to assist you.

    There is probably a file somewhere else that is causing this issue. NinjaTrader compiles all indicators at the same time.

    Please follow the instructions below to see where the errors are coming from after compiling the indicator. 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 indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.
    • Open NinjaTrader
    • From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
    • Select an indicator and double click on it.
    • 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 indicator or debug it to be able to compile again.
    • If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.


    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 CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

    We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip on our forums - http://www.ninjatrader.com/support/f...ead.php?t=4678
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Compiling

      Compiling a strategy, compiles all strategies and or indicators?

      I did as instructed, compiled the indicators that were logged as trouble makers. Did not find any problem report area to comment in, nor understand what that all means.

      Export did not work again thereafter

      Comment


        #4
        Originally posted by Ironplates View Post
        I am getting errors compiling export sources. Error CS0103 The name nBars Down does not exist in current context.

        what is up with this?

        The same problem happens when my strategy has Bollinger Indicators as well.

        Please advise.
        Is the part that I highlighted in red printed exactly as you stated, including the spacing thereof?

        Comment


          #5
          Ironplates,

          Please see the screenshot attached. The error area is below and shows an error that I made in this indicator.

          It will also show errors in other indicators/strategies in that area if there are any because ALL indicators and ALL strategies are compiled at the same time when you hit the compile button.
          Attached Files
          Adam P.NinjaTrader Customer Service

          Comment


            #6
            no it is not exact

            Comment


              #7
              none of the indicators are displaying this.

              I build the strategy with the wizard.

              Comment


                #8
                Ironplates,

                Perhaps you should contact us at support at ninjatrader dot com and we can schedule a support call to observe the behavior, as its still unclear to me at least what is going on here.
                Adam P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by Ironplates View Post
                  no it is not exact
                  Kindly print the exact message. Unfortunately, computers are inately stupid, so we must see exactly what they spit at us in order to detemine what mistakes have been made.

                  Comment


                    #10
                    This is a stale thread, but on the chance that anyone stumbles across it while trying to solve a problem, as I did, this might be the solution. If you reference a built-in indicator in your custom indicator, you need to export the built-in indicator along with your custom indicator. In this specific case, the problem might have been resolved by including the @NBarsDown indicator System indicator along wih the custom indicator per the attachment.
                    Attached Files

                    Comment


                      #11
                      awesome, that works!

                      Comment


                        #12
                        error exporting custom strategy

                        Hello, could you help me to solve the error I get when I try to export a strategy?
                        this is what I get in the log file:

                        -See Help Guide section 'Export Problems' (http://www.ninjatrader.com/support/h...t_problems.htm) for additional instructions
                        -Error compiling export sources: c:\Users\PEP\Documents\NinjaTrader 7\bin\Custom\Indicator\anaSqueeze.cs(37,11) : error CS0433: El tipo 'NinjaTrader.Indicator.StdDev' existe tanto en 'c:\Users\PEP\Documents\NinjaTrader 7\bin\Custom\NP_CPHTChopFree.dll' como en 'c:\Users\PEP\Documents\NinjaTrader 7\bin\Custom\ncatSpreadScalper.dll'
                        -Error compiling export sources: c:\Users\PEP\Documents\NinjaTrader 7\bin\Custom\Indicator\anaSqueeze.cs(36,11) : error CS0433: El tipo 'NinjaTrader.Indicator.SMA' existe tanto en 'c:\Users\PEP\Documents\NinjaTrader 7\bin\Custom\NinjaTrader.Vendor.dll' como en 'c:\Users\PEP\Documents\NinjaTrader 7\bin\Custom\NP_CPHTChopFree.dll'

                        thank you

                        Pep
                        Last edited by PEPBOSCH; 04-26-2015, 05:40 AM.

                        Comment


                          #13
                          Hello,

                          Thank you for the question.

                          Because this is not necessarily related to this thread, I would like to follow up with you through our support email.

                          Please send this inquiry to: platform support @ ninjatrader .com

                          and please provide a link to this thread and the ticket number: 1304415

                          This error could mean a few things, rather than further extending this thread it would be best to troubleshoot through email.

                          I look forward to being of further assistance.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                          0 responses
                          637 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          366 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          107 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          569 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          571 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X