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 cmoran13, 04-16-2026, 01:02 PM
    0 responses
    42 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    25 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    162 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    98 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    157 views
    2 likes
    Last Post CaptainJack  
    Working...
    X