• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars since an Event

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

    Bars since an Event

    Hi,
    I would like to count the number of bars since a specific event took place - like Low crossing MA (or any other indicator). Or to check whether this happened in the past X bars. Is it possible in Strategy Builder or do I have to switch to script?

    Thank you

    Petr

    #2
    Hello Domek_69,
    Thanks for your post.

    NinjaScript offers the Most Recent Occurrence (MRO) function for this purpose, but one would have to write this in a script, it can not be used in the Strategy Builder. Making a function of this type would require looping so making multiple sets would be the only way to emulate a loop in the Strategy Builder.

    There is a sample use case of MRO on it's help guide page:

    Help Guide - Most Recent Occurrence (MRO)
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Hello Josh,
      I was afraid this would be the answer. Thank you anyway.

      Petr

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by brucerobinson, Today, 05:52 AM
      2 responses
      4 views
      0 likes
      Last Post brucerobinson  
      Started by margandi, 10-09-2019, 03:01 AM
      9 responses
      25 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by 2Look4me, Today, 08:50 AM
      2 responses
      5 views
      0 likes
      Last Post 2Look4me  
      Started by marcara, 10-11-2019, 03:08 AM
      4 responses
      24 views
      0 likes
      Last Post NinjaTrader_ChristopherD  
      Started by TheWhiteDragon, Today, 07:37 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Kate  
      Working...
      X