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 charlesugo_1, 05-26-2026, 05:03 PM
                0 responses
                51 views
                0 likes
                Last Post charlesugo_1  
                Started by DannyP96, 05-18-2026, 02:38 PM
                1 response
                142 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 05-11-2026, 05:56 AM
                0 responses
                160 views
                0 likes
                Last Post CarlTrading  
                Started by CarlTrading, 05-10-2026, 08:12 PM
                0 responses
                96 views
                0 likes
                Last Post CarlTrading  
                Started by Hwop38, 05-04-2026, 07:02 PM
                0 responses
                275 views
                0 likes
                Last Post Hwop38
                by Hwop38
                 
                Working...
                X