• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is instantiated strategy updated immediately after re-compile?

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

    Is instantiated strategy updated immediately after re-compile?

    Hi question is this: say I have a strategy that has been running/added to an account, then I update the code and recompile --
    when is the new code going to take effect? Is it sufficient if I enabled/disabled the strategy, or I need to remove the existing instance and add it (as new) again?

    #2
    This is a response from a user while you are waiting for an official answer. You can remove the existing instance and add it (as new) again, as you suggest, but that will require also resetting any customized parameters. An easier method is to right-click the chart and select Reload NinjaScript. Merely disabling and re-enabling a strategy will not cause a newly compiled version to be used.
    Last edited by caveat_lector; 04-04-2020, 07:32 AM.

    Comment


      #3
      Caveat_lector, thank you and appreciate your response - my question was two-prone to know if after I recompile a strategy and then (for other reasons) enable/disable a strategy, it would run the new code, which can be desirable or undesirable ...

      Comment


        #4
        Hi momchi, thanks for your post.

        If you make code changes in the OnStateChanged method, you must remove the script from the chart/control center and re-add the script after compiling. If you change code anywhere else you can press "F5" on your keyboard or right click and select "Reload NinjaScript" after compiling.

        Please let me know if I can assist any further.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by TheNomadicAspie, Yesterday, 12:07 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Marco  
        Started by b16_aln, Today, 02:35 AM
        0 responses
        4 views
        0 likes
        Last Post b16_aln
        by b16_aln
         
        Started by iTrade777, Today, 02:19 AM
        0 responses
        8 views
        0 likes
        Last Post iTrade777  
        Started by RogerLin, Today, 01:20 AM
        1 response
        18 views
        0 likes
        Last Post RogerLin  
        Started by blokinjuka, Today, 01:16 AM
        0 responses
        4 views
        0 likes
        Last Post blokinjuka  
        Working...
        X