Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RTH/ETH question

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

    RTH/ETH question

    Hello,

    I am trying to make an indicator that calculates the regular (only the trading hours without the night sesión) Begining and End time of current Session for the future ES. As I am working with an ETH chart the result is always a begin and end times that included the night hours. So, my question is if there is a way to get only the begin and end times without the night hours?.

    Thanks

    #2
    Hello Sangu,

    Thanks for your post.

    Yes, you can specify the begin and end times you wish to use for calculation and create a time filter for the indicator to only process between the begin and end times. For example (pseudo code)

    if (Time[0] >= starttime && Time[0] <= endtime)
    {
    // perform RTH calculations here
    }
    You can replace starttime and entime with the actual session times or you can create input variables that you can set (in case you might wish to change them without needing to re-write the strategy)

    Here is a link to a working example of a time filter: https://ninjatrader.com/support/help...to_limit_t.htm

    Comment


      #3
      Hi Paul,

      Yes I am already using what you say but my idea is to have something automatic. Here in Spain (using CME futures) we have time differences twice a year due to the time change in winter and summer. There are around 5-6 days and twice a year where the sesión starts at 14:30 instead of 15:30 that is the regular starting time for the CME futures.

      I have already solved the problema using: the SessionIterator with BarsArray and ActualSessionBegin and AtualSessionEnd.

      Thanks a lot.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      72 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X