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

Understanding Trading House and IsFirstBarofSession

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

    Understanding Trading House and IsFirstBarofSession

    Hello there, I'm having difficulty understanding what hours each value in a chart's TimeFrame -> TradingHours represents, and it's relationship to IsFirstBarofSession.

    I'm trading the NQ series, which closes down from 5-6 PM EST. It was my understanding that IsFirstBarofSession would be true after the marketplace opens after 6 PM EST. However, I see that IsFirstBarofSession is true during multiple points during the day, such as 11 PM EST or 7 AM EST. Ideally, I want IsFirstBarofSession to return True only within the first hour or so after the market opens. This leads me to a couple of questions:

    - Is my understanding of IsFirstBarofSession accurate? That it should return true only at the start of a session, and not at multiple times over the course of a day?
    - How do I learn what the exact hours are for each option under TimeFrame -> TradingHours: <Use Instrument Settings>, CBOE US Futures Index ETH, CFD AEX, and others?
    - Can I configure my own custom TradingHours template?

    As always, thanks for your support.

    #2
    Hello timmbbo,

    Yes, I would expect Bars.IsFirstBarofSession to be true only on the first bar of a session for the bar series.

    Do you have multiple series added to the script with AddDataSeries()?
    If so, are you checking the BarsInProgress to be 0?

    You can view the trading hours for a TradingHours template in the Tools > Trading Hours window.


    Yes, you can create a custom Trading Hours template in this window.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by JackyP, 07-25-2023, 08:39 AM
    3 responses
    317 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Started by TiffanyMiller, Yesterday, 10:19 PM
    0 responses
    6 views
    0 likes
    Last Post TiffanyMiller  
    Started by algospoke, 05-13-2024, 06:53 PM
    12 responses
    138 views
    0 likes
    Last Post algospoke  
    Started by psangram, Yesterday, 06:35 PM
    0 responses
    6 views
    0 likes
    Last Post psangram  
    Started by Alaina19, 07-14-2024, 04:38 PM
    2 responses
    17 views
    0 likes
    Last Post Alaina19  
    Working...
    X