Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Filtering a swing high or low

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

    Filtering a swing high or low

    I'm using this to filter out a condition for a strategy. Any thoughts on a more efficient way to code this so that I can input the number of lookback bars instead of brute force coding this?

    && ((Low[1] == (MIN(Low,HLbars))[0]) || (Low[2] == (MIN(Low,HLbars))[0]) || (Low[3] == (MIN(Low,HLbars))[0]) || (Low[4] == (MIN(Low,HLbars))[0]) || (Low[5] == (MIN(Low,HLbars))[0]) )

    #2
    Baseheadz, to write this more efficiently you could use a looping command in C# - http://www.ninjatrader.com/support/h...g_commands.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    651 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    577 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X