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.

        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        30 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        943 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        9 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        4 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        28 views
        0 likes
        Last Post wzgy0920  
        Working...
        X