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 -

    http://www.ninjatrader.com/support/f...ead.php?t=4678

    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
    http://www.ninjatrader-support2.com/...ead.php?t=4678
    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 JollyWizard, 10-02-2022, 07:37 AM
2 responses
57 views
0 likes
Last Post JollyWizard  
Started by b16_aln, Today, 06:33 AM
6 responses
63 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by Robotman, 09-29-2022, 01:17 PM
16 responses
328 views
0 likes
Last Post zslyr
by zslyr
 
Started by trdninstyle, Yesterday, 09:32 AM
23 responses
154 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by music_p13, Today, 08:45 AM
2 responses
29 views
0 likes
Last Post music_p13  
Working...
X