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 NullPointStrategies, Today, 05:17 AM
        0 responses
        48 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        66 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X