Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Create simple indicator

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

    Create simple indicator

    Hello, guys!

    How to make an indicator that would count the number of points from the highest point to the lowest point for "n" number of candles? "N" - is a variable parameter, which is set by me.

    Thanks!
    Last edited by U0000999; 06-04-2021, 05:00 AM.

    #2
    Hello U0000999,

    Thanks for your post.

    As a suggestion, going forward, you may want to rethink your topic titles as this is the same as your other thread (title wise) and we almost removed it thinking it was a duplicate of https://ninjatrader.com/support/foru...eate-indicator.

    If I understand correctly you want to know the High to low of a given period. I would suggest using the MAX() and MIN() methods and provide the High data series to the MAX() and the Low data series to the MIN().

    In both cases, you can specify the period.

    For example:

    double highOfperiod = MAX(High, 30)[0]; // get the high over the last 30 bars
    double lowOfPeriod = MIN(Low, 30)[0]; // get the low over the last 30 bars

    Reference:

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    628 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    359 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    562 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X