• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 swcooke, Yesterday, 10:39 PM
    0 responses
    5 views
    0 likes
    Last Post swcooke
    by swcooke
     
    Started by Fernand0, Yesterday, 09:53 PM
    0 responses
    5 views
    0 likes
    Last Post Fernand0  
    Started by traderpards, Yesterday, 09:55 AM
    4 responses
    24 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Started by franco12364, Yesterday, 06:49 PM
    0 responses
    6 views
    0 likes
    Last Post franco12364  
    Started by fx.practic, Yesterday, 03:55 PM
    0 responses
    1 view
    0 likes
    Last Post fx.practic  
    Working...
    X