How can I get End Of Session Time for that particular day? The reason I am asking this, it because for some holidays, day is cut in half, and I want to avoid margin increase that happens 1 hour before close. So how can I calculate End Of Session Time (so I could be able to get 1 hour before it ends later)?
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
Get End Of Session Time
Collapse
X
-
Get End Of Session Time
Hello,
How can I get End Of Session Time for that particular day? The reason I am asking this, it because for some holidays, day is cut in half, and I want to avoid margin increase that happens 1 hour before close. So how can I calculate End Of Session Time (so I could be able to get 1 hour before it ends later)?Tags: None
-
Hello UltraNIX, thanks for writing in.
One can use the SessionIterator to get this kind of information. See here for an example:
https://ninjatrader.com/support/help...oniterator.htm
If you implement that example on an indicator and run it on a 15 minute chart, for example, it would print:
The Current Trading Day 11/23/2020 starts at 11/22/2020 4:00:00 PM and ends at 11/23/2020 3:00:00 PM
The Current Trading Day 11/24/2020 starts at 11/23/2020 4:00:00 PM and ends at 11/24/2020 3:00:00 PM
The Current Trading Day 11/25/2020 starts at 11/24/2020 4:00:00 PM and ends at 11/25/2020 3:00:00 PM
The Current Trading Day 11/26/2020 starts at 11/25/2020 4:00:00 PM and ends at 11/26/2020 11:00:00 AM
Please let me know if I may provide any further information.Chris L.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by KonAdams, Today, 10:53 PM
|
0 responses
1 view
0 likes
|
Last Post
by KonAdams
Today, 10:53 PM
|
||
Started by JGriff5646, Today, 10:02 PM
|
0 responses
10 views
0 likes
|
Last Post
by JGriff5646
Today, 10:02 PM
|
||
Started by AdamDJ8, Today, 09:18 PM
|
0 responses
5 views
0 likes
|
Last Post
by AdamDJ8
Today, 09:18 PM
|
||
Started by knowmad, Today, 03:52 AM
|
2 responses
33 views
0 likes
|
Last Post
by knowmad
Today, 09:03 PM
|
||
Started by ETFVoyageur, Today, 07:05 PM
|
0 responses
11 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:05 PM
|
Comment