According to trading hour, one day can be several sessions. If I use exit on session close, it can not do the position exit I wanted. I need exit on eod close. Please advise how I can do it?
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
Why having exit on session close but no exit on eod close?
Collapse
X
-
Why having exit on session close but no exit on eod close?
When I write strategy, I can't find "exit on eod close"?
According to trading hour, one day can be several sessions. If I use exit on session close, it can not do the position exit I wanted. I need exit on eod close. Please advise how I can do it?Tags: None
-
Hello cyjoe,
Thanks for your post.
Correct, each session will issue the ExitOnClose.
You can create a time filter to exit your positions when you wish.
if (Time > this and Time < that)
{
ExitLong();
ExitShort();
}
These methods will only activate if there is an actual long or short position.
An overall Flatten all can also be set under Tools>Options>Misc> https://ninjatrader.com/support/help.../?misc_tab.htmPaul H.NinjaTrader Customer Service
-
Originally posted by cyjoe View PostWhen I write strategy, I can't find "exit on eod close"?
According to trading hour, one day can be several sessions. If I use exit on session close, it can not do the position exit I wanted. I need exit on eod close. Please advise how I can do it?
perhaps 30 seconds before exchange close, and issues the appropriate commands,
as necessary, to flatten your position.
This thread can help get you started on a timer object,
https://ninjatrader.com/support/foru...2-timer-object
Happy coding!
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment