Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Programming errors

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

    Programming errors

    Hello when I wanted to add the previous indicators,this error shows up/ How can I fix it? Thank you

    #2
    Hello Gamarismayilova,

    Thank you for your post.

    Please follow the instructions below to see where the errors are coming from after compiling your NinjaScript files. This will allow you to debug the indicator/strategy causing the issue 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 8:
    • Open NinjaTrader
    • From the Control Center select the New menu--> select NinjaScript Editor
    • 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 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 the Windows Snipping Tool.
    • Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot 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.
    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
      Hi Kate

      I have followed your steps and found files with errors when i select file and click Exclude From Compilation, it still shows the same file after i compile it again

      Please let me know how to fix it
      Thanks

      Comment


        #4
        Hello Gamarismayilova,

        Thank you for your reply.

        The compile errors you are seeing in the NinjaScript Editor indicate you are missing references to .DLL files in your installation or the .DLL files do not exist in your installation. Please follow the steps below to rectify the errors.
        1. From the Control Center please select New--> NinjaScript Editor
        2. In the NinjaScript Editor please right click and select References.
        3. In the Reference window look for the .DLL file reference in the compile error by name (in the error the file name has a .cs at the end)
        4. If you see the .DLL file reference please left click on the reference and select Remove
        5. If you removed the reference in the previous step or you do not see the .DLL file reference then please select Add
        6. The Add option will open a File Explorer, from the path that was opened please locate the .DLL file
        7. If you find the .DLL please left click to select it and then select Open--> then select OK in the References window--> then right click in the NinjaScript Editor--> select Compile
        8. If you do not find the .DLL in the File Explorer please close the File Explorer and References windows--> then navigate to Documents\NinjaTrader 8\bin\Custom on your PC--> and delete the .cs file referenced in the compile error--> then right click in the NinjaScript Editor--> Compile
        You will need to repeat the above steps for each file name seen until there are no further errors.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          I have checked references. but didnt see the cs. at the end for any of them. Should I delete all dll files ?

          Comment


            #6
            Hello Gamarlsmayilova,

            Thank you for your reply.

            You're not looking for references ending in .cs - you're looking for ones ending in .DLL with the same names as before the .cs in the References window. If you don't see one that matches the file name, click add and look for a .DLL file in the Custom folder with a matching name. When you find it, click on it to select it, then click ok to add the reference and Ok on the references window, then run a compile. Repeat these steps until no more errors are seen.

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by pjsmith, 09-25-2022, 07:13 AM
            7 responses
            57 views
            0 likes
            Last Post pjsmith
            by pjsmith
             
            Started by elliot5, Today, 03:28 AM
            0 responses
            9 views
            0 likes
            Last Post elliot5
            by elliot5
             
            Started by knarfoe, 09-23-2021, 05:19 AM
            7 responses
            66 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by EstheYund, Today, 01:56 AM
            0 responses
            12 views
            0 likes
            Last Post EstheYund  
            Started by Daveman0, 09-25-2022, 11:14 PM
            4 responses
            46 views
            0 likes
            Last Post jeronymite  
            Working...
            X