Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnSessionCloseSeconds has no effect in backtest

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

  • MojoJojo
    replied
    Hello Chelsea,

    thanks for the reply. Fair enough, I stand corrected, the help guide contains the information.
    The IsExitOnSessionCloseStrategy note in the documentation could be merged with the warning paragraph.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello MojoJojo,

    When backtesting, it would be expected that the position is exited at the end of the trading session as defined by the trading hours. The ExitOnSessionCloseSeconds is ignored as stated in the help guide.

    At what time does the trading hours template end the session for that day?

    Leave a comment:


  • MojoJojo
    replied
    Hello Chelsea,

    thanks the reference, it's good to inform the user that NT might not be able to exit a position at the end of the session because of the choice of bars.

    Referencing my screenshot, what I am trying to convey is:
    * data series NQ 5 min
    * 17:00 session close time
    * ExitOnSessionCloseSeconds 7200 -> 2hrs

    The expected behavior would be for any position to be exited at around 15:00 and no new entries should occur until 18:00.

    The result is that the value of ExitOnSessionCloseSeconds doesn't matter, open positions are exited at 17:00.
    My question therefore is, am I doing something wrong? Does ExitOnSessionClosesSeconds not apply to my use case or are there steps that could be taken to bring what actually happens in line with the expected behavior?

    Because it's not too complicated and I don't want to wait, my strategy handles the situation now manually, everything is fine, at least for me.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello MojoJojo,

    Are you referring to the warning in the help guide:

    "On historical data, IsExitOnSessionCloseStrategy will cause positions to be exited at the close of the last bar of the session. If you are using a non time-based Bar Type, such as Renko, and have "Break at EOD" set to False on the Data Series, this means that IsExitOnSessionCloseStrategy could trigger after the session close, since the last bar of the session can extend beyond the session close time in this scenario."
    https://ninjatrader.com/support/help...sestrategy.htm

    Leave a comment:


  • MojoJojo
    replied
    Hi Roland,

    thanks for your advice, I'll implement a manual exit.
    If this is intended behavior for simulations, the documentation should be updated to reflect the limitations of the parameter.

    Leave a comment:


  • NT-Roland
    replied
    Hi MojoJojo,
    To my understanding, ExitOnSessionCloseSeconds is a real time property.
    For backtests, you will have to specify an exit time, compare current time to exit time, then exit.
    NT-Roland

    Leave a comment:


  • MojoJojo
    started a topic ExitOnSessionCloseSeconds has no effect in backtest

    ExitOnSessionCloseSeconds has no effect in backtest

    Dear NT support team,

    I'm currently failing to get positions to exit at a certain time before the session close in backtests.
    https://ninjatrader.com/support/help...oseseconds.htm
    Click image for larger version  Name:	Exit on Session Close.jpg Views:	10 Size:	224.2 KB ID:	1124391
    Is there something that I have overlooked? My timezone is EST and session definitions are NT default.
    Thanks.
    Last edited by MojoJojo; 10-25-2020, 03:25 AM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by marianderson, Today, 12:25 AM
0 responses
1 view
0 likes
Last Post marianderson  
Started by GloriaRineye, Yesterday, 11:59 PM
0 responses
2 views
0 likes
Last Post GloriaRineye  
Started by Paul Penton, Yesterday, 10:42 PM
0 responses
1 view
0 likes
Last Post Paul Penton  
Started by mo_fi, Yesterday, 10:08 PM
0 responses
2 views
0 likes
Last Post mo_fi
by mo_fi
 
Started by Oracletrades, Yesterday, 10:02 PM
0 responses
1 view
0 likes
Last Post Oracletrades  
Working...
X