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

CurrentBar changes in NT8. No longer updating with chart scroll

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

    CurrentBar changes in NT8. No longer updating with chart scroll

    Hi,

    I have noticed that there is a difference in behavior of the "CurrentBar" in NT8 as opposed to NT7.

    CurrentBar in NT7 always represented the lastbarpainted. This was very handy as it meant that I could simulate how my indicator would perform in a live market bar by bar by just scrolling back, hitting F5 and then clicking the keyboard right arrow one by one. Provdided that the condition was set to only run my logic when lastBarPainted = Currentbar this is a great way to see an indicators behavior and backtest in a quick and easy way for a process hungry indicator.

    Now NT8 appears to cycle through every CurrentBar upon indicator loading until it meets the Count of the chart irrespective of where the chart is scrolled to when the indicator is initiated.

    In reading the NT8 ninjascript documentation i have noticed that there is a feature to read the last painted bar which is "ChartBars.ToIndex" which is solution to force the indicator to only run on the current scrolled bar by using the following statement

    if (CurrentBar != ChartBars.ToIndex)return;

    The issue with this is that in scrolling further through the chart from this point the indicator will no longer run on each subsequent bar as the CurrentBar is already at the end of the chart. All my logic is written to work backwards from currentbar so I am really hoping to be able to replicate the NT7 behaviour as described above.

    Any suggestions?

    Cheers.

    Marty

    #2
    The ability to step bar by bar has been has already been brought up and I hope they will add this feature back. Add my vote again.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #3
      Thanks eDanny.

      Comment


        #4
        Originally posted by eDanny View Post
        The ability to step bar by bar has been has already been brought up and I hope they will add this feature back. Add my vote again.
        My vote needs to be added 10 times more.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kevinenergy, 02-17-2023, 12:42 PM
        115 responses
        2,699 views
        1 like
        Last Post kevinenergy  
        Started by prdecast, Today, 06:07 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by Christopher_R, Today, 12:29 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by chartchart, 05-19-2021, 04:14 PM
        3 responses
        577 views
        1 like
        Last Post NinjaTrader_Gaby  
        Started by bsbisme, Yesterday, 02:08 PM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X