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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    152 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    89 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    131 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X