• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator failing to compile

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

    Indicator failing to compile

    Hello,

    I am new to Ninja trader script writing.
    I wrote attached moving average crossover strategy which is very simple, but doesn't compile.
    Please help.
    thanks,
    Attached Files

    #2
    Hello alisidd,

    Thanks for your post and welcome to the forums!

    When you compile, the Ninjascript editor will list error messages at the bottom of the code window. In NinjaTrader, all Ninjascript (indicators/strategies/etc..) are all compiled together, so an error in any file will be shown in the file that is open.

    In the left column of the error messages will be the name of the file that contains the error. If the name does not match your strategy file name then the error is not within the strategy you posted.

    You will need all of your (files) code to be correct before the system can successfully compile. If you have created a file that is causing compilation issues and the file is no longer needed you can remove it from the folder, then open another strategy or indicator and compile to see if that resolves the error.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Indicator failing to compile

      Hi,

      Thanks for your prompt reply.
      I actually followed this video

      https://www.youtube.com/watch?v=4z6WrkOOWpQ

      and expected it to compile without any errors.

      Now I can't figure out why it's not compiling.

      Any help will be appreciated.

      Comment


        #4
        Hello alisidd,

        Thanks for your post.

        As I tried to advise, the issue may not be with what you created but with another file.

        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.

        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 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 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 Window's Snipping Tool.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by saeed, Today, 12:32 PM
        3 responses
        27 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by motog4, Today, 11:42 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by derivtrader, Today, 11:20 AM
        5 responses
        27 views
        0 likes
        Last Post derivtrader  
        Started by TAJTrades, Today, 10:34 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by timcjpfx, Today, 10:20 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X