Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

CrossAbove Below Logic

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

    CrossAbove Below Logic

    When using CrossAbove and CrossBelow, how would a condition that is equal one bar ago, and above/below on the current bar be handled on Bar Update.

    For example, you have two indicator plots that are exactly equal for one bar. On the next bar one indicator is 1 tick above the other.

    a) Does a CrossAbove return true on the bar when they are equal?

    OR

    b) Does CrossAbove return true on the next bar when one is 1 tick higher than the other, having just left a condition of being exactly equal?

    #2
    Hello,

    It would depend on the lookback period, however if you're using a look back of 1, CrossAbove would return true on the next bar.

    Are you asking what would happen if you have a CrossAbove signal and CrossBelow signal on the same bar?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Matthew View Post
      Hello,

      Are you asking what would happen if you have a CrossAbove signal and CrossBelow signal on the same bar?

      No... I am trying to narrow down what exactly happens when the two indicators are exactly equal...

      Lets say CrossBelow occurs, lets say a CrossBelow Condition now exits.... when exactly does that condition end and a CrossAbove condition replace it...

      (a) When they are exactly equal after one has been below ( in a CrossBelow condition) ?

      (b) Or only when one indicator that was below is now at least 1 tick above the other? (CrossAbove has occurred, and we are now in a CrossAbove condition).

      Comment


        #4
        It would be B in this case.

        A CrossAbove/Below wouldn't be true until it is at least1 tick above/below the other.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mestor, 03-10-2023, 01:50 AM
        16 responses
        388 views
        0 likes
        Last Post z.franck  
        Started by rtwave, 04-12-2024, 09:30 AM
        4 responses
        31 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by yertle, Yesterday, 08:38 AM
        7 responses
        29 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        22 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Working...
        X