Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Close > highest high of last 10 bars

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

    Close > highest high of last 10 bars

    How would I say..
    Close > highest high of last 10 bars

    is this correct?

    if(Close[0] > HighestBar(High, 10))

    #2
    Almost correct, but HighestBar() will return a bars ago value, not the actual high value.

    change it to something like this:

    if(Close[0] > High[HighestBar(High, 10)])



    Let me know if I can further assist.
    Last edited by NinjaTrader_Lance; 01-24-2014, 09:25 AM.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Thanks and is there anyway to specify that the Highest high bar is on Index 0 or Index 1. Can I somehow get BarsArray[0] in there?

      Comment


        #4
        Try this:

        Highs[0][HighestBar(Highs[0], 10)]
        LanceNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        149 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        84 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        129 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        125 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        102 views
        0 likes
        Last Post CarlTrading  
        Working...
        X