Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit on session close

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

    #16
    Hello ozziyhtomit,

    Thank you for your reply.

    If you're setting them in OnStateChange you can do that from either State.SetDefaults or State.Configure, you may override the platform settings for IsExitOnSessionCloseStrategy and ExitOnSessionCloseSeconds and these will be used for the strategy in question instead of the set defaults in the platform:


    Code:
    protected override void OnStateChange()
    {
        if (State == State.SetDefaults)
        {
            // Triggers the exit on close function 30 seconds prior to trading day end
            IsExitOnSessionCloseStrategy = true;
            ExitOnSessionCloseSeconds = 30;
        }
    }
    Please let us know if we may be of further assistance to you.

    Comment


      #17
      I want it to exit at close but want the strategy to stay open. The funding rules says you cannot trade between 5 and 6 pm. Thx.

      Comment


        #18
        Hello JTizz,

        Thank you for your note.

        If IsExitOnSessionClosedStrategy is set to true, the strategy will cancel all strategy-generated orders and close all open strategy positions at the close of the session. This does not disable the strategy - it will still "stay open" and enabled to place trades the next time that the entry conditions become true. Please see the following help guide pages for more information about IsExitOnSessionCloseStrategy and ExitOnSessionCloseSeconds:Another option you may want to consider for placing trades during certain hours is using a time filter. We have a reference sample for using a time filter to limit trading hours that may be found here:


        Please feel free to reach out with any additional questions or concerns.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        62 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        134 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 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
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X