Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ignore session close

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

    Ignore session close

    I have changed IsExitOnSessionCloseStrategy = false; from true to false and it continues to close at the session end. Is there something else that I need t do?
    ExitOnSessionCloseSeconds = 30;


    #2
    Hello galsermil,

    Did you re apply the strategy after making that change? Any changes to State.SetDefaults would require re applying the script to see that change.

    Comment


      #3
      Jesse,

      I need to get clear on applying. If I make a change in <OnBarUpdate>, all that is required is Update Ninja Script but other changes require a script update. My question is what is an update? If I remove it from a strategy and reload it, obviously that is reloaded but if a strategy is disabled and a change is made followed by enabled, is that reloaded?

      Comment


        #4
        Hello galsermil,

        Reloading NinjaScript by using F5 or disabling/re enabling a strategy just restarts the script using the existing settings that were defined when you applied it. If you change a default setting the scripts that are already running wont reflect that change even when doing a F5 or disabling/re enabling, its using the original defaults from when it was applied. You have to remove and re apply a script any time you change OnStateChange items so the script can reflect those changes.

        F5 or disabling/re enabling will restart the script so you will see code changes to later parts of the script like OnBarUpdate. In general its best to just re apply a script any time you make a change and don't get the expected outcome.

        Comment


          #5
          Many thanks Jesse. I believe that I did not correctly reapply the script and that is why I got the wrong result.

          Comment


            #6
            Originally posted by galsermil View Post
            I have changed IsExitOnSessionCloseStrategy = false; from true to false and it continues to close at the session end. Is there something else that I need t do?
            ExitOnSessionCloseSeconds = 30;
            My issue has been solved. Many Thanks.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            56 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            133 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            73 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X