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
Problem with premature termination of the session
Collapse
X
-
Problem with premature termination of the session
Good afternoon! Please tell me how I can avoid placing an order if the session ends earlier. How do I determine the end time of a session programmatically? At the moment my robot is working in unmanaged mode and when the session ends before the set settings it tries to place an order until it reaches the deposit limitTags: None
-
Hello Papercut110,
Thanks for your post.
You can access and use the "session Iterator" to pull the next session's Open/close times.
References:
All session iterator methods and properties: https://ninjatrader.com/support/help...oniterator.htm
Actual session begin: https://ninjatrader.com/support/help...ssionbegin.htm
Actual session end: https://ninjatrader.com/support/help...sessionend.htmPaul H.NinjaTrader Customer Service
- Likes 1
-
-
Hello Papercut110,
Thanks for your reply.
Yes.
All instruments have defined trading hours and all trading days that are "scheduled" to be less than full trading days are also defined in the database. When the session iterator is run it will access that information which you can then create your logic to react to.
Paul H.NinjaTrader Customer Service
- Likes 1
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by frslvr, 04-11-2024, 07:26 AM
|
7 responses
109 views
1 like
|
Last Post
by caryc123
Today, 10:17 AM
|
||
Started by rocketman7, Today, 09:41 AM
|
3 responses
7 views
0 likes
|
Last Post Today, 10:07 AM | ||
Started by traderqz, Today, 09:44 AM
|
2 responses
4 views
0 likes
|
Last Post Today, 10:00 AM | ||
Started by stafe, 04-15-2024, 08:34 PM
|
8 responses
41 views
0 likes
|
Last Post
by stafe
Today, 10:00 AM
|
||
Started by rocketman7, Today, 02:12 AM
|
7 responses
31 views
0 likes
|
Last Post Today, 09:23 AM |
Comment