• 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

"Exit on session close" bug

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

    "Exit on session close" bug

    Hello!

    NT 8.0.6.0 64-bit (Multi-Broker). I've been testing a strategy on Sim account in real time since yesterday night (Utc). There was an erroneous "exit on session close" today at about 4 AM (Utc). Please, look at the pictures with my settings. Note, that I have 'Tools-Options-General-Time zone' set to UTC. No other specific settings. And have a look at the Excel file with the Strategy Performance exported data.

    Just in case, my strategy code settings are standard:

    Code:
    if (State == State.SetDefaults)
    {
        Name                                        = "NGenicClientStrategy";
        Calculate                                    = Calculate.OnPriceChange;
        EntriesPerDirection                            = 1;
        EntryHandling                                = EntryHandling.AllEntries;
        IsExitOnSessionCloseStrategy                = true;
        ExitOnSessionCloseSeconds                    = 60;
        IsFillLimitOnTouch                            = false;
        MaximumBarsLookBack                            = MaximumBarsLookBack.TwoHundredFiftySix;
        OrderFillResolution                            = OrderFillResolution.Standard;
        Slippage                                    = 0;
        StartBehavior                                = StartBehavior.AdoptAccountPosition;
        TimeInForce                                    = TimeInForce.Gtc;
        TraceOrders                                    = false;
        RealtimeErrorHandling                        = RealtimeErrorHandling.StopCancelClose;
        StopTargetHandling                            = StopTargetHandling.PerEntryExecution;
        BarsRequiredToTrade                            = 0;
    }
    There are no code statements or calls that can force the strategy to exit on session close unexpectedly. In fact the strategy code is very simple, it just uses some external signals to submit orders, there is no space for errors and it works perfectly.

    I think there is a bug in NT related to general time zone settings. Please check it.
    Attached Files
    Last edited by quicktrick; 04-21-2017, 04:57 AM.

    #2
    Hello quicktrick,

    Could you please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and attach the log and trace files for the day in subject which you can find in My Documents>NinjaTrader8>Log and My Documents>NinjaTrader8/Trace folders.

    I look forward to you reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello Alan,

      I found the problem. I have my general time zone setting set to UTC, my Data Series "Trading hours" template set to "Default 24 x 7" and the ES instrument "Trading hours" template set to default "CME US Index Futures ETH".

      I expected "exit on session close" 30 seconds before the instrument trading hours EOD (about 21:00 UTC). But it exits at Data Series trading hours EOD (about 4:00 UTC). So I should change the Data Series trading hours template to get the desired (btw, "Default 24 x 7" and "CME US Index Futures ETH" templates are in different time zones, and it's confusing too).

      My bad, sorry for this issue. I think you should describe this behavior more clearly here http://ninjatrader.com/support/helpG...oseseconds.htm, because it refers to some "strategy's Trading Hours template", but, to be honest, I don't know what it means.

      Sorry again for the inconvenience.

      Alex
      Last edited by quicktrick; 04-25-2017, 03:32 AM.

      Comment


        #4
        Hello Alex,

        Thank you for following up.

        I will submit a feature request which suggests the help guide be more clear that Exit On Close will look at the end time of the Trading hours template chosen in the data series the strategy is applied to rather than the instrument. For example if the strategy is applied to ES, which has a trading hours template of default 24x7 selected, exit on close set to 60 seconds will exit at 9:59PM MST time rather than 2:59PM.

        Please let us know if you need further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ballboy11, Today, 09:35 AM
        0 responses
        1 view
        0 likes
        Last Post ballboy11  
        Started by Conall, Today, 06:11 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by CaptainAmericaXX, Today, 07:41 AM
        3 responses
        7 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by Longhornmark, Today, 07:06 AM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by 2sureshk, Today, 07:29 AM
        0 responses
        6 views
        0 likes
        Last Post 2sureshk  
        Working...
        X