Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Higher Lows/Lower Highs on pullback

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

    Higher Lows/Lower Highs on pullback

    I am looking for some help/ideas on how I can do this. I want to identify when a pullback has a "smooth" move, i.e. each bars low is higher than the previous bars low, if during the pullback, any bars low moves lower than the previous bars low, it's invalid. I have tried if Low[0] > Low[1] but the problem is, I don't know how many bars there could be in the pullback, they vary. I have wracked my brain trying to figure out a way to accomplish this. Any ideas would be appreciated. I included screenshots of a good & bad pullback. Thanks in advance
    Attached Files

    #2
    Hello mlarocco,

    Thank you for your post.

    Some members of our forum community may feel free to chime in with their ideas, although it does seem like you will need to use additional logic in your conditions to define what you determine to be a good pullback. For example, if you decide how many bars in a row the low must be higher than the previous low and add additional logic, this could help to narrow down the definition of what you are looking for in a good pullback. You could check not only for Low[0] > Low[1], but also for Low[1] > Low[2] && Low[2] > Low[3], etc. if you would like to check for several increasing lows over the course of a few bars.

    Please let us know if we may be of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_Emily View Post
      Hello mlarocco,

      Thank you for your post.

      Some members of our forum community may feel free to chime in with their ideas, although it does seem like you will need to use additional logic in your conditions to define what you determine to be a good pullback. For example, if you decide how many bars in a row the low must be higher than the previous low and add additional logic, this could help to narrow down the definition of what you are looking for in a good pullback. You could check not only for Low[0] > Low[1], but also for Low[1] > Low[2] && Low[2] > Low[3], etc. if you would like to check for several increasing lows over the course of a few bars.

      Please let us know if we may be of further assistance.
      Thanks, but that's my dilemma, there could be 2 bars or 5, maybe it just can't be done

      Comment


        #4
        Hello mlarocco,

        You will need to define the exact rules that qualify a 'good pullback'.

        We can help with turning the logic you come up with into c#, but you need to define the rules of what you are wanting.


        "there could be 2 bars" This would mean any amount of bars greater than 2 in a row where the low is greater than the previous low would meet the condition correct? This would include 3, 4, 5, 6, etc..
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Hello mlarocco,

          You will need to define the exact rules that qualify a 'good pullback'.

          We can help with turning the logic you come up with into c#, but you need to define the rules of what you are wanting.


          "there could be 2 bars" This would mean any amount of bars greater than 2 in a row where the low is greater than the previous low would meet the condition correct? This would include 3, 4, 5, 6, etc..
          "This would mean any amount of bars greater than 2 in a row where the low is greater than the previous low would meet the condition correct?"... that is correct and if any of those lows were lower than a previous low, it would be invalid.

          Comment


            #6
            Hello mlarocco,

            That would mean if the Low[0] is greater than Low[1] and Low[1] is greater than Low[2], then it wouldn't matter how many bars before that the low is greater than the previous bar.

            You could certainly count and find how many bars back this condition is true using a loop.. but if you don't care about the number of bars back it goes and you just want to know there are at least 2 bars in a row where the low is greater than the previous bar, then thats all you need in the condition.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello mlarocco,

              That would mean if the Low[0] is greater than Low[1] and Low[1] is greater than Low[2], then it wouldn't matter how many bars before that the low is greater than the previous bar.

              You could certainly count and find how many bars back this condition is true using a loop.. but if you don't care about the number of bars back it goes and you just want to know there are at least 2 bars in a row where the low is greater than the previous bar, then thats all you need in the condition.
              That was my original thought, but then I realized that if I set the lookback to say 5 bars and there were only 3 bars to where my signal (EMA) would trigger, it would be considered invalid, even though it would be valid. Hope I'm making sense.

              Comment


                #8
                Hello mlarocco,

                If you are checking there are 2 bars in a row where the low is higher than the previous bar, this would also be true when there are 5 or 10, or how ever many bars are in a row.

                For example if you are asking if there is 1 green ball in a backest of balls, it wouldn't matter if there are 500 green balls or 1 green ball. As long as there is 1 green ball, then the condition is true.

                If you want to make sure there are 5 bars where the condition is true, then compare for 5 bars. If the condition can be true or 2 or greater, then measure for 2.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hello mlarocco,

                  If you are checking there are 2 bars in a row where the low is higher than the previous bar, this would also be true when there are 5 or 10, or how ever many bars are in a row.

                  For example if you are asking if there is 1 green ball in a backest of balls, it wouldn't matter if there are 500 green balls or 1 green ball. As long as there is 1 green ball, then the condition is true.

                  If you want to make sure there are 5 bars where the condition is true, then compare for 5 bars. If the condition can be true or 2 or greater, then measure for 2.
                  The problem would be if I choose 2 bars to lookback and there were 5 or 6 bars in the pullback, 2 bars could be valid, then another bar could be invalid, then 2 more bars could be valid, it wouldn't be a valid pullback but it would be treated as if it were. I think it just isn't possible. Thanks

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Today, 05:17 AM
                  0 responses
                  52 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  130 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  70 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  43 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  47 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X