Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do you find the HighestBar() not including the current bar?

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

    How do you find the HighestBar() not including the current bar?

    What is the syntax for finding the highest bar "not including the current bar"? I expected "private int highbar = HighestBar(High,10)[1]" to work but I get a compile error saying " cannont apply indexing to an expression of type int"

    #2
    Right. You can't use [] with HighestBar(). What you can try doing is putting HighestBar() inside MRO(). http://www.ninjatrader-support.com/H...urenceMRO.html

    Code:
    MRO(delegate {return HighestBar(High, 10) != 0;}, 1, 10);
    I haven't tried this code, but I think it should work. Give it a try. You may or may not want to tweak the lookback period.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by timmbbo, 01-08-2020, 08:09 PM
    3 responses
    395 views
    0 likes
    Last Post bltdavid  
    Started by ntbone, Today, 02:30 PM
    0 responses
    5 views
    0 likes
    Last Post ntbone
    by ntbone
     
    Started by tuliomgui, Yesterday, 10:07 PM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by Learner Trader, Today, 08:36 AM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by GeorgeW, Today, 03:15 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Working...
    X