Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting price from current EMA

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

    Getting price from current EMA

    I need to get the market price where the current EMA is at. For example if i set the period to 15.

    double value= EMA(period)[0];

    How can i get the current market value where the EMA(15)[0] is at?

    #2
    Hello majanua,

    Are you looking for the difference between the EMA value and the last price? This is expressed with:

    double EMADiff = Close[0] - EMA(15)[0];


    If you want to capture EMA value, you had it correct with:
    double value= EMA(period)[0];


    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I want to get the current market price at EMA value

      Comment


        #4
        Sorry, I don't follow what you're looking for. Can you please clarify?
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          For example if the current market price is at 9768 and emas are below 9768 by 10 pips thus ema have current price at 9758. How can i find the current price where ema is at? meaning based on my code i want to get 9758 back(which is price ema is at.)

          Comment


            #6
            You had it in your first post.

            double value= EMA(period)[0];


            That's the price that the ema is at.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 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
            548 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            549 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X