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 Haiasi, 04-25-2024, 06:53 PM
      2 responses
      16 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      3 views
      0 likes
      Last Post Creamers  
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,785 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,407 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Working...
      X