Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

9 EMA, 21 EMA both are above 50 EMA

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

    9 EMA, 21 EMA both are above 50 EMA

    Hello,

    I know how to check if the 9 EMA crosses 21 EMA but how do I make sure that both of these EMAs are above 50 EMA also. So far I got this but not sure how to incorporate the third 50 EMA check with this code:

    if (CrossAbove(emaFast9, emaSlow21, 1)

    Thanks

    John

    #2
    Hello JohnZee

    You would have to add two more conditions which check that each of the ema's are greater than the 50 ema in addition to the cross above.

    Code:
    if(emaFast9[0] > emaSlow50[0] && emaSlow21[0] > emaSlow50[0] && CrossAbove(emaFast9, emaSlow21, 1))

    Comment


      #3
      OK thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      47 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X