Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NBarsDown/NBarsUp question

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

    NBarsDown/NBarsUp question

    Hi,
    you have the indicatots NbarsD/U. I set it for example to number 2 and when it detects 2 bars it gives a signal. If the next bar is of the same type then a new signal comes again.
    What change should I make to the code so when a n sequence is detected stop counting until a diferent type of bar comes in?

    #2
    Hello,

    There are probably a bunch of ways to do it, but I suggest tracking whether the indicator plotted or qualified to plot consecutively as the chart is built forward. Then plot or do not plot based on that flag.
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    71 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    43 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    25 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    28 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    56 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X