Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Price trending above/below de EMA

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

    Price trending above/below de EMA

    Hello!
    I am trying to build a strategy, but I am missing a function. To be clear, I want enter the position when the price is trending above oder below the EMA. I have tried CrossAbove()/CrossBelow(), but it is not what I need.
    Could someone help and just tell me which function I should use? The price has already crossed above/below the EMA and not just crossing.

    Best regrads,

    Stan.

    #2
    Hello Stanfillirenfro,

    Thanks for your post.

    What means are you using to determine if the price is trending above or below the moving average?

    Can you post a screenshot that illustrates what you want to accomplish?

    Comment


      #3
      Hallo Paul!
      Thanks for your reply.
      I have the price trending above the EMA on the chart. (see picture).
      I want to make a code such as:

      if(Price.Above(EMA)
      {
      xxxxx
      }

      But such function does not exist in Ninja Trader.
      Is there an appropriate function?

      Best regards,

      Stan
      Attached Files

      Comment


        #4
        Hello Stanfillirenfro,

        Thanks for your reply.

        I don't see anything that would provide a signal that the price is trending above the moving average.

        You can check to see if any of the price types are greater than the moving average, for example:

        if (Close[0] > EMA(8)[0]) // did the bars close above the moving average
        {
        // do something
        }

        Reference: https://ninjatrader.com/support/help...riceseries.htm

        Comment


          #5
          Hallo Paul!
          Many thanks for your reply!
          Your proposition seems very good. I go back right now to implement and I will revert to you very soon to let you know if it is that.

          Best regards,

          Stan

          Comment


            #6
            Hallo Paul!
            Many thanks for your help. It is what I wanted to have. It works now.

            Many thanks!

            Best regards,
            Stan

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            576 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X