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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      166 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      321 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      246 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X