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 GussJ, 03-04-2020, 03:11 PM
|
16 responses
3,279 views
0 likes
|
Last Post
by Leafcutter
Today, 04:14 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
2 responses
19 views
0 likes
|
Last Post
by WHICKED
Today, 03:36 PM
|
||
Started by Tim-c, Today, 02:10 PM
|
1 response
8 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
5 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
4 responses
51 views
0 likes
|
Last Post
by chbruno
Today, 02:38 PM
|
Comment