Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get End Of Session Time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • UltraNIX
    replied
    Nevermind, I found .AddHours(-1).

    Leave a comment:


  • UltraNIX
    replied
    I added it to a strategy, thanks for the code.

    By the way, can you share me a code which would subtract 60 minutes from that endTime? Like endTime.Subtract......

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    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.

    Leave a comment:


  • UltraNIX
    started a topic Get End Of Session Time

    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)?

Latest Posts

Collapse

Topics Statistics Last Post
Started by fscabrera03, Today, 05:46 PM
0 responses
1 view
0 likes
Last Post fscabrera03  
Started by jleira, Today, 05:45 PM
0 responses
2 views
0 likes
Last Post jleira
by jleira
 
Started by AaronKoRn, Today, 03:05 PM
1 response
11 views
0 likes
Last Post NinjaTrader_Emily  
Started by zacharydw00, Today, 02:21 PM
2 responses
15 views
0 likes
Last Post zacharydw00  
Started by Harvard, Today, 12:01 PM
2 responses
15 views
0 likes
Last Post Harvard
by Harvard
 
Working...
X