Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CrossBelow/Above

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

    CrossBelow/Above

    I am confused about the difference betweem Cross Below/Above and if (Close[0] > or < EMA.

    Also in this example:
    if(CrossAbove(EMA(High,PeriodoEMAmedia),EMA(High,P eriodoEMAlarga),1))

    What's the meaning of the 1)? I know that is the previous bar, but I don't get how it works, if you could illustrate with an example I would really appreciate.

    Thanks

    Daniel

    #2
    Hello,

    Mainly its there to make sure a condition only runs once. For example if you run this live with calculate on bar close = false. With each tick up and down aat the cross above point you would get an entry signal then no entry signal. Bak and forth until it finally becomes true. The CrossAbove method makes ure that it crosses over in the lookback period instead, this way you get one confirmed signal.

    -Brett
    BrettNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    51 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    32 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    99 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    177 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    170 views
    0 likes
    Last Post CarlTrading  
    Working...
    X