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 proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
25 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
2 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
268 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Comment