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!
See more
See less

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
    Paul H.NinjaTrader Customer Service

    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 zstheorist, Today, 07:52 PM
      0 responses
      3 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      149 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      5 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Started by tkaboris, Today, 05:13 PM
      0 responses
      5 views
      0 likes
      Last Post tkaboris  
      Working...
      X