1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Determining Likelihood of Divergance

  1. Dec 7, 2011 #1
    Currently utilizing very simple logic in determining the directional trend of a signal line, and was hoping someone might be able to offer a suggestion as to a more effective method of filtering false signals.

    As it stands the logic being used for determining the direction of a trend is if the prior data point's (generally 1-2) value are less than the current bar it signals an up trend and vice versus. The issue I am having is the sensitivity of the logic is such that tiny spikes aren't being completely smoothed out by the moving average.

    Any suggestions on what might be a more effective way to qualify the variation's likelihood for divergance? Possibly a minimum threshold for slope or percentage change?


    The areas of issue are those circled in red ... the sharp transitions like the type highlighted by the blue arrow are more valid.

    I would greatly appreciate any suggestions
  2. jcsd
  3. Dec 7, 2011 #2

    I like Serena

    User Avatar
    Homework Helper

    Welcome to PF, Aston08! :smile:

    I recommend using a median filter.
    It's perfect for removing spiked noise without changing the signal.

    It means replacing each point by the middle value of the point and its neighbours.
  4. Dec 8, 2011 #3
    Thanks for the help ...that was just about what I was looking for.
  5. Dec 8, 2011 #4

    I like Serena

    User Avatar
    Homework Helper

    You're welcome! :)

    I see you have another thread that seems similar.
    I did not respond since I simply did not understand what you were saying and what you were asking.

    Can it be that the median filter also helps you with that thread?
  6. Dec 8, 2011 #5
    I was basically asking what type of math the issue most likely applied to...didn't get any responses so I posted it written a little differently here on the physics board.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook