Announcement

Collapse
No announcement yet.

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...

    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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      646 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      367 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X