Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Distance from an EMA

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

    Distance from an EMA

    Is there some way to quantify how far price is away from an EMA? or some way to running percent of deviation from some indicator's midline? Example: to see that price is x percent of deviation away from the mid line... (this would be used as a number to establish a no-trade area..."no trades unless price is x amount away from mid line"...(used as a reversion setup.)

    #2
    The VWAP indicator does that. If you have it.

    Comment


      #3
      I have the VWAP8 free indicator. It does not seem to offer a way to measure the distance. Does the Ninja premium version off that?

      Comment


        #4
        Hello StevenNelson,

        You can do what you are asking by using simple math in an indicator, I am otherwise not aware of a specific indicator that has both of these calculations as you specified.

        If you wanted to know how far a price is away from the close or the difference you can subtract one number from the other to get a difference. The Close[0] - emaValue would result in the difference in prices.

        If you needed to make that into a percent you could do that as well by converting the result to a whole value or decimal number depending on what scale you wanted it to be in. The mid line being used would just require that you use its value in your calculation. You can find many examples of calculating percent change in C# or doing other percent related operations by searching online, here is a public stackoverflow post that has one way to accomplish that task: https://stackoverflow.com/a/26533363


        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        83 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        47 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        66 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X