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 Rogers101, Today, 11:30 AM
    1 response
    13 views
    0 likes
    Last Post WaleeTheRobot  
    Started by AndreiBig, Yesterday, 12:30 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Started by nicthe, Today, 07:38 AM
    2 responses
    15 views
    0 likes
    Last Post WaleeTheRobot  
    Started by stalt, 12-28-2015, 01:36 PM
    7 responses
    1,550 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Started by marcus2300, Today, 12:38 PM
    0 responses
    2 views
    0 likes
    Last Post marcus2300  
    Working...
    X