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

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 judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    57 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    20 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    9 views
    0 likes
    Last Post cre8able  
    Working...
    X