Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

High of last N bars , excluding currentbar.

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

    High of last N bars , excluding currentbar.

    Hi ,
    I want to calculate High of last N bars , excluding the latest bar , please help.

    I am using the below code but it's including the last bar.


    var periodHigh = MAX(High,period)[0];


    #2
    Hello shishir_nse,

    Thanks for your post.

    To exclude the current bar, change the barsago from 0 to 1.

    var periodHigh = MAX(High,period)[1];
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by starcd, Today, 04:17 AM
    0 responses
    4 views
    0 likes
    Last Post starcd
    by starcd
     
    Started by satoyama, Today, 03:46 AM
    3 responses
    15 views
    0 likes
    Last Post hbolorin  
    Started by VEGA23, Today, 03:39 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by EggsIgino, Today, 02:04 AM
    2 responses
    12 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by Oracletrades, Today, 01:46 AM
    0 responses
    9 views
    0 likes
    Last Post Oracletrades  
    Working...
    X