Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No exit on session close in historical run.

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

    No exit on session close in historical run.


    the strategy is set to exit on session close 180sec. when I initiate it just before today's new session starts, it runs through the history of a few days and then waits for the realtime session start.
    I can see the trades marked as closed in history of the 2 days ago exactly like they should .
    but the yesterday trade is NOT closed at session end. and only at the first tick of the REAL TIME session (today's) is executes the EXIT trade.

    I assume settings of the trading hours are correct. otherwise it would also have issues in history even before yesterday.
    So what can be the issue?

    #2
    Hello dadarara,

    Thanks for your post.

    Could you confirm the instrument this has occured on?

    When you test this against other instruments do you see the same issue?

    Yesterday was a quickly scheduled trading holiday and our Trading Hours templates were not updated to reflect yesterday's early closes.

    I look forward to being of further assistance.

    Comment


      #3
      it happened on various stocks I am working on including futures on DAX for example. and it is something that I have seen before yesterday.
      Last edited by dadarara; 12-06-2018, 10:23 AM.

      Comment


        #4
        Hello dadarara,

        Thanks for the reply.

        When I test a sample strategy that simply enters when flat and exits on session close, I see ExitOnSessionCloses as I would expect. Could you confirm if you are getting the same results testing the code below on FDAX?

        Code:
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description                                    = @"Enter the description for your new custom Strategy here.";
                Name                                        = "FDAX ExitOnSessionClose Test";
                IsExitOnSessionCloseStrategy                = true;
                ExitOnSessionCloseSeconds                    = 180;
            }
        }
        
        protected override void OnBarUpdate()
        {
            if(Position.MarketPosition == MarketPosition.Flat)
                EnterLong();
        }
        I look forward to being of further assistance.
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        89 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        135 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        119 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X