Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Why the deleted code still works?

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

    Why the deleted code still works?

    I noticed this for quite a while. The first time I notice this is the target profit taking. I set a target profit taking when creating the scipt using the wizard. After I created, I deleted or blocked those codes. However, when I run the script, it still runs. Then, I have to create a blank script and copy only the code I need.

    Recently, I noticed again. I have some code as log statement for debugging purpose. After debugging, I deleted them. However, after I compiled the program and run it again, those log content is still there. All these are happened in the initialization, and I noticed that the initialization runs several time when start to run the script.

    This make me really doubt about the stability of this software, and make me confused because I am not sure the program really runs my new code or not. Can anybody clarify on this issue? Or any fix? I am really tired of creating new blank script for each code change.

    #2
    atrader, I'm not sure I fully follow in which order you try to work your changes in - for the wizard you want to for example change your target value, compile the changes in and then reload working NinjaScript's by pressing F5 on the chart (or right click > reload NinjaScript).

    For the Initialize(), it's expected seing it called more than once, believe up to 3 times...
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thans, Bertrand! It does work as you indicated. I hoped that I asked this earlier. I spend months try to deal with this because I thought it is a little bug of the software. However, the way I uesed is deleting the stragedy in the chart, and click OK, and then add it again (newly compiled), then click OK. I think it should be the same as using reload. Anyway, I know that I should use reload now. Thanks again!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,404 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      95 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      8 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      159 views
      0 likes
      Last Post loganjarosz123  
      Started by Belfortbucks, Yesterday, 09:29 PM
      0 responses
      8 views
      0 likes
      Last Post Belfortbucks  
      Working...
      X