Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

there has been a LH bar within last 10 bars

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

    there has been a LH bar within last 10 bars

    i've tried
    Code:
    [FONT=Courier New][SIZE=2]
    && High[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]]<High[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]]
    [/SIZE][/FONT]
    but that just gives me a LH from one bar back

    #2
    What do you define as an LH Bar exactly?

    Comment


      #3
      a LH bar would be identified as soon as the current bar closed higher.
      here's a pic with most current bar being a HH bar
      World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

      Comment


        #4
        Are you looking to recreate the lines on this pic in NinjaScript - it would be helpful to see the code to help you convert, thanks!

        Comment


          #5
          those lines are from the swing indicator...
          i'm trying to find a way to look for that LH bar so i can filter around it.

          example: && there has been a LH bar within the last 10 bars.
          i don't have any code for this.

          Comment


            #6
            Originally posted by duck_CA View Post
            those lines are from the swing indicator...
            i'm trying to find a way to look for that LH bar so i can filter around it.

            example: && there has been a LH bar within the last 10 bars.
            i don't have any code for this.
            You still have not explained what is LH or HH bar... You probably know it but we don't

            Comment


              #7
              sorry about that

              LH= lower high
              HH= higher high

              Comment


                #8
                You can try something like this:




                private bool DoWeHaveLowerHigh(int barsago)
                {
                for(int i = 0; i<=barsago; i++)
                {
                if (High[i-1] > High[i]) return true;
                }
                return false;
                }
                Last edited by roonius; 02-15-2009, 07:13 PM.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by cmoran13, Yesterday, 01:02 PM
                0 responses
                29 views
                0 likes
                Last Post cmoran13  
                Started by PaulMohn, 04-10-2026, 11:11 AM
                0 responses
                21 views
                0 likes
                Last Post PaulMohn  
                Started by CarlTrading, 03-31-2026, 09:41 PM
                1 response
                160 views
                1 like
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                95 views
                1 like
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                148 views
                2 likes
                Last Post CaptainJack  
                Working...
                X