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 kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      127 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      105 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      85 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      105 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      86 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X