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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    68 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    151 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    100 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    288 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X