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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      217 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      133 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      147 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      233 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      192 views
      0 likes
      Last Post CarlTrading  
      Working...
      X