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

  • koganam
    replied
    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.

    Leave a comment:


  • marty087
    replied
    Thanks eDanny.

    Leave a comment:


  • eDanny
    replied
    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.

    Leave a comment:


  • 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

Latest Posts

Collapse

Topics Statistics Last Post
Started by Aviram Y, Today, 05:29 AM
4 responses
11 views
0 likes
Last Post Aviram Y  
Started by algospoke, 04-17-2024, 06:40 PM
3 responses
26 views
0 likes
Last Post NinjaTrader_Jesse  
Started by bmartz, 03-12-2024, 06:12 AM
3 responses
30 views
0 likes
Last Post NinjaTrader_Zachary  
Started by gentlebenthebear, Today, 01:30 AM
1 response
8 views
0 likes
Last Post NinjaTrader_Jesse  
Started by cls71, Today, 04:45 AM
1 response
7 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X