Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

checking back over a range of bars.

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

    checking back over a range of bars.

    I'm working on a scan indicator and I need to go back over a number of bars, barsback[0] to barsback [x], to see if my condition occurred. I don't want to check a specific bar, I want to check every bar going back, for example, 50 bars to see if my condition occurred on one of those 50 bars. Is there a simple way to do this?

    Thank you.

    #2
    Hello imalil,

    Thanks for your post.

    Without further information on the condition, the simplest approach would be to do a for-loop.

    There may be other ways but it depends on the condition itself.

    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bubblegum, Today, 12:00 AM
    0 responses
    1 view
    0 likes
    Last Post bubblegum  
    Started by eseorvuda, Yesterday, 10:28 PM
    0 responses
    1 view
    0 likes
    Last Post eseorvuda  
    Started by ctrent, Yesterday, 09:58 PM
    0 responses
    4 views
    0 likes
    Last Post ctrent
    by ctrent
     
    Started by cxbnbvc, Yesterday, 09:25 PM
    0 responses
    2 views
    0 likes
    Last Post cxbnbvc
    by cxbnbvc
     
    Started by Realsmooth3, Yesterday, 09:10 PM
    0 responses
    9 views
    0 likes
    Last Post Realsmooth3  
    Working...
    X