Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Bars with Bools

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

    Using Bars with Bools

    Hello,
    I would like to set a bool to a condition, but only have that bool set for a certain amount of bars. Is there a way to do this? I thought maybe something along the lines of BarSinceSession. Is there a way to make a BarSinceBool()? That would be cool.
    Any suggestions would be greatly appreciated.

    #2
    Hello CaptainAmericaXX,

    That's similar to MostRecentOccurrence MRO()

    Definition
    Returns the number of bars ago that the test condition evaluated to true within the specified look back period expressed in bars. It checks from the current bar works away (back) from it. This method will NOT work on multi-instrument or multi-time frame strategies.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks again Ryan!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      649 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      573 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      576 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X