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

Bars.BarsSinceSession in a Backtest?

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

    Bars.BarsSinceSession in a Backtest?

    Hello,

    My indicator tries to find chart patterns as they are printing on screen. I have included "Bars.BarsSinceSession" to mark the the first bar of the pattern and other key bars within the forming pattern as well. Would this property work if implemented in a backtest or does it only work in a real time setting?

    #2
    Hello Don22Trader1,

    Thanks for your post.

    I have moved your post to the NinjaTrader 7 Indicator Development of the NinjaTrader Forums since you are asking about a NinjaTrader 7 item.

    That said, Bars.BarsSinceSession will work for backtests in the Strategy Analyzer.

    This could be seen by creating a simple strategy that prints out Bars.BarsSinceSession, running a backtest on the strategy in the Strategy Analyzer, and monitoring the Tools > Output window.

    Let me know if I may assist further.
    Last edited by NinjaTrader_BrandonH; 09-09-2022, 11:25 AM.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Okay thank you for that.

      I actually need it for for NT8, so what is the newer version?

      Comment


        #4
        Hello Don22Trader1,

        Thanks for your note.

        NinjaTrader 7's BarsSinceSession is known as BarsSinceNewTradingDay in NinjaTrader 8.

        This could be seen using our Code Breaking Changes help guide: https://ninjatrader.com/support/help...ng_changes.htm

        See this help guide page for information about BarsSinceNewTradingDay and sample code: https://ninjatrader.com/support/help...tradingday.htm

        Let me know if I may assist further.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,403 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        94 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        6 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X