Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CrossAbove()

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

    CrossAbove()

    Hi,

    Even Though I use the funtion CrossAbove() & CrossBelow(), sometimes gets true just when touching the specified level, and some other times becomes true when the level is crossed, (as expected).

    How can be that sometimes the Cross functions acts when the level has only be touched?

    Thanks

    #2
    Hi CJS, in which code context are you using those methods?

    Comment


      #3
      In the unmanaged approach.

      Comment


        #4
        CJS, ok do you have a code snippet of which scenario you're trying to evaluate?

        Comment


          #5
          Something like this:

          if (CrossAbove(High,upper+(TickSize*(RiskLevel)),1))
          {
          contadorNeutral=
          0; // counter
          CruceAlcista=
          false; // bool variable
          CruceBajista=
          true; // bool variable
          contador=
          0; // another counter


          if (SrtOrder1 != null)
          {
          CancelOrder(SrtOrder1);
          }
          }

          Any clue?

          Thanks

          Comment


            #6
            CJS, I looked into and your findings are accurate, it can also return 'true' on a touch in those scenarios. You can add a custom check here to include an offset for example to trigger your condition.

            Comment


              #7
              ok,

              I' ll do that.

              Thanks.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              651 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              370 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              109 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              574 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              577 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X