Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Deleting a script

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

  • alexstox
    replied
    Thanks. Everything fine, because as you wrote - NT compiles all scripts.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    Alex, NinjaTrader will always compile all your scripts, as they all would be added to one assembly file to be used at runtime to realize optimal performance - hence it's not uncommon to see compile error from another installed script when compiling an unrelated script.

    Please delete the erroneous scripts or comment out the code causing the compile issues, a double click on the error shown in the editor would directly lead you to the error line / section in your custom code.

    We've compiled a series of steps to resolve compile issues here in this tip -

    Leave a comment:


  • alexstox
    replied
    UP. Please Help! There are similar cases. When copy strategy from code "save as...". And compile this new script - it will has errors from previous script from which were copied.
    And no names of previous strategy in new strategy code.

    Leave a comment:


  • alexstox
    replied
    I've removed it manually. But still have errors.

    I noticed some dependence/succession. I started to lern NT Script and create first script called "Tutorial1". But than just start to write own script there. I rename it as someone suggested at forum - /right mouse - save as - "MyS1"/. After trying to compile it, there were errors with "Tutorial1.cs" as I wrote in previous post. Then I create new script /Tools-NewScript-Strategy-MyS2/, add some conditions. BUT after trying to compile it - there were errors with "Tutorial1.cs" too! What all this mean? Am I doing something wrong? ://
    I delete "Tutorial1.cs" manually. Now in "MyS2" there are errors with "MyS1.cs". Strange dependence, because "MyS2" was created by /Tools...../ without any reference to "MyS1".
    Last edited by alexstox; 04-13-2012, 02:07 PM.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    Originally posted by alexstox View Post
    Can't remove scripts, that I no longer need from Tools-Edit NT Script - Strategy - try to Delete - there is message
    [ATTACH]21610[/ATTACH]
    In others scripts after trying to Compile - there is same error for all
    [ATTACH]21611[/ATTACH]
    alex, I would suggest to try removing the tutorial1.cs strategy manually from the Documents\NinjaTrader 7\bin\Custom\Strategy folder and then recompiling your scripts in the NT editor. Would you be able to compile normally then?

    Leave a comment:


  • Radical
    replied
    Originally posted by jethro View Post
    Thanks for your reply but I'm a little dense right now. What do you mean by *step through your codes *? Look at each line of my code? What would I look for in each line for this referencing?

    Thanks
    The line(s) you're looking for would be something like this, probably in Initialize():

    'Add(nameOfProblemIndicator);'

    Basically, if you use this indicator in any of your strategies, you need to remove the line above before you can delete the indicator source file.

    Leave a comment:


  • alexstox
    replied
    Can't delete script from Edit list

    Can't remove scripts, that I no longer need from Tools-Edit NT Script - Strategy - try to Delete - there is message
    Click image for larger version

Name:	1.PNG
Views:	1
Size:	16.0 KB
ID:	865099
    In others scripts after trying to Compile - there is same error for all
    Click image for larger version

Name:	2.PNG
Views:	1
Size:	9.0 KB
ID:	865100

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    You will need to review your scripts and strategies setup in the wizard for example, when you work with this indicator you're trying to delete (for example work with his returned value in a strategy) you will see issues when you attempt to delete it.

    Leave a comment:


  • jethro
    replied
    Thanks for your reply but I'm a little dense right now. What do you mean by *step through your codes *? Look at each line of my code? What would I look for in each line for this referencing?

    Thanks

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    jethro, you would need to step through your codes created to find the script referencing the custom indicator you with to delete, then either delete the calling script first or just comment out the section calling the custom indicator you wish to delete. Then you should be good to delete it.

    Leave a comment:


  • jethro
    started a topic Deleting a script

    Deleting a script

    Sorry if I didn't post this in the correct forum.

    When I went to delete a custom indicator I made, I had a pop-up message saying............********.cs can not be deleted. This file is likely referenced by other NinjaScript files and these dependncies need to be removed first.

    I searched the forums with *delete script* criteria. I found this

    Number 10 says in part *...open the file that references the file you wish to delete....*.
    I also found this in the forum *You have to remove the reference from the strategy where you are calling this indicator.*

    Please point me in the direction of how to find the script that is doing the referencing. I may have created a custom indicator with the strategy wizard. Could this be the problem child? Do indicators and strategies reference?

    Thank you.

Latest Posts

Collapse

Topics Statistics Last Post
Started by traderqz, Today, 12:06 AM
2 responses
3 views
0 likes
Last Post traderqz  
Started by RideMe, 04-07-2024, 04:54 PM
5 responses
28 views
0 likes
Last Post NinjaTrader_BrandonH  
Started by f.saeidi, Today, 08:13 AM
1 response
7 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by DavidHP, Today, 07:56 AM
1 response
6 views
0 likes
Last Post NinjaTrader_Erick  
Started by kujista, Today, 06:23 AM
3 responses
11 views
0 likes
Last Post kujista
by kujista
 
Working...
X