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 Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                566 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                330 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                547 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                548 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X