Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Corrupt .cs file

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

    Corrupt .cs file

    NT 8 Version 8.0.24.2 64-bit

    I was working on an indicator of my own (actually adjusting a few at once) in the editor when I got a sudden lightening power surge. After restarting and going back to the editor the main indicator I was working on when I open it in the editor is blank with the following error.

    "Extern Alias declarations, using clauses, assemblymodule attributes, or namespace/type declarations expected"

    When I check the cs.file it shows a size of 17.3kb but basically nothing when I open with notepad. The indicator is still showing as normal on the historical chart after closing and reopening and was also saved as default. I am not game to use Reload Ninjascript or experiment to find out if I have lost it completely without some guidance first.

    1. Is there any way to rebuild the .cs file or delete it and it will rebuild on reboot ?

    I have run a compile but my indicator does not show up in the list of errors. There are 112 of 3rd party indicator errors. Mainly "The type of namespace name '3rd party name' does not exist in the namespace etc" I have had to fix these before but I no longer use 3rd party indicators anyway.

    2. Is there a way to completely delete a 3rd party indicator with no remnants left behind that could cause future problems. What would I need to do besides deleting all cs and .dll files to completely delete them. They don't all come up in Remove Ninjascript Assembly or i would have deleted them before. Now that I have 112 problems to fix before I can compile again I would rather just delete them rather than fix and delete.

    Thank you for any help

    #2
    Hello Ray12345,

    Thank you for your post.

    To your first question, it most likely is corrupted and it is quite possible that it may not be able to be restored. While there may be some deep text reading tools out there that can read a partial or damaged file, and you may be able to recover some of the text inside using one, we don't have anything specific we can suggest. However, I'll leave this open in case our community here has any recommendations on how you may be able to recover it.

    As far as deleting third party indicators, this generally should be done through Remove NinjaScript Assembly as this will automatically remove the reference to the assembly as well as the assembly itself. If an addon that you know is third party does not show up there, it likely is an open source script and would be listed in the right hand pane of the NinjaScript Editor under the folder associated with its type. Custom open source add-ons will show an icon that looks like a sheet of paper with lines. These may be deleted by right clicking on them and selecting Remove.

    If you simply delete the .DLL and .CS files from the Custom folder, these will leave references behind that will need to be removed. You can remove the associated reference by right clicking on the NinjaScript Editor > References > find the reference in the list that has the DLL file name > click Delete > Ok. Once the reference is removed you should run a compile to see any remaining errors. This process would need to be completed for all removed compiled assemblies before the platform will compile without error.

    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 rocketman7, Today, 01:00 AM
    0 responses
    1 view
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    27 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 04-23-2024, 09:53 PM
    2 responses
    74 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    193 views
    0 likes
    Last Post Hasadafa  
    Working...
    X