# How to detect if a signal raises sharply or slowly?

so how can i detect if a signal raises sharply or not ? Are there easy solutions (i suppose there are) ?

the problem is that if a signal raises sharply, i need less data to not pollute the dataset and if the signal raises slowly then i need more data. But how to determine the number of data, without knowing if it's sharp or not?

Also I need to know if it raises sharply when i'm at the top of the curve, NOT afterwards (in realtime if you want)

thanks so much

Jeff

• I think you should add more information about the type of signal and what exactly is sharp and what not (what is the threshold between these states?). Some examples would be helpful too. – Irreducible May 15 '19 at 13:40
• thank you for that answer. here is an example of a sharp signal, and here is an example of a slow signal (to filter). I was thinking maybe just look at the max slope of the past few bars ? (then the number of past bars doens't matter so much, i can look from a zero cross). khaelis.com/downloads/screenshotSharp.jpg and khaelis.com/downloads/screenshotSlow.jpg (positiveness doesn't matter , sorry it's reversed) – Jeff May 15 '19 at 14:14
• Edit your question and add these examples. Additionally it sustains unclear what the boarder between slow and sharp is? – Irreducible May 15 '19 at 14:28
• yes that's exactly my point. that's why i'm asking the questions. Maybe calculate the standart deviation bewteen all the past slopes (fropm a zero crossing?). a high standart deviation would means the difference between the slopes angle is high (what occurs in sharp signals) whereas if the STD DEV is low it means all the slopes are kinda the same. What do you think? That plus using the max slope – Jeff May 15 '19 at 14:31
• It is difficult to help you, as no one besides you has experience with the data. How comparable or equal are all slow and sharpe slopes in general. We have no idea about the variability of your data. This information is missing – Irreducible May 15 '19 at 14:34

$$x'[k] = x[k]-x[k-1]$$
• If you integrate (sum up) the derivatives $x'[k]$ as described in the answer, you get a single figure that describes how strong the overall fluctuation is. – applesoup May 15 '19 at 15:29