Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
ExitOnSessionCloseSeconds has no effect in backtest
Collapse
X
-
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.
-
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:
-
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:
-
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."
Leave a comment:
-
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:
-
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:
-
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
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, 04:25 AM.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by FrancisMorro, Today, 03:24 AM
|
0 responses
1 view
0 likes
|
Last Post
by FrancisMorro
Today, 03:24 AM
|
||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
10 responses
1,769 views
0 likes
|
Last Post
by Leafcutter
Today, 03:01 AM
|
||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, 04-23-2024, 07:51 PM
|
2 responses
30 views
0 likes
|
Last Post
by Max238
Today, 02:25 AM
|
||
Started by Shansen, 08-30-2019, 10:18 PM
|
24 responses
943 views
0 likes
|
Last Post
by spwizard
Today, 01:29 AM
|
||
Started by Max238, Today, 01:28 AM
|
0 responses
10 views
0 likes
|
Last Post
by Max238
Today, 01:28 AM
|
Leave a comment: