Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting the indicator to a specific session and then testing each bar update

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

    Setting the indicator to a specific session and then testing each bar update

    Hi-

    I have managed to add a property that allows me to load up the trading hours object - I can choose to use whatever the instrument uses, or set it to something specific. However I am unsure how to take a TradingHours object and use it to see if a bar is within a legit session. For example if I only want the indicator to work using RTH but the instrument is set by default to ETH, then I am not sure how to check that a bar is legal based on its time and this TradingHours object.

    I did some scouring but I couldnt find what I was looking for before posting.

    Many thanks,

    Nick.

    #2
    Hello ptpatrader,

    What code are you currently using?

    The IsInSession() method from the SessionIterator may provide what you are looking for.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    546 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X