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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      157 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      91 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      143 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      130 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X