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 dappa, Today, 09:18 AM
        0 responses
        0 views
        0 likes
        Last Post dappa
        by dappa
         
        Started by bill2023, Yesterday, 08:51 AM
        4 responses
        22 views
        0 likes
        Last Post bltdavid  
        Started by trilliantrader, Today, 08:16 AM
        3 responses
        9 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
        79 responses
        19,662 views
        5 likes
        Last Post zrobfrank  
        Started by funk10101, Today, 08:14 AM
        3 responses
        5 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X