Real time slope and peak detection and calculation I have a signal that I sample at 500khz. I am trying to detect a rise, fall and the peak in the incoming data. The base of the peak could be  for 250 usec or 2.5msec, amplitude could be 6db or 15db above the noise floor. I don't have good snr unfortunately.  The dc level of the signal is not constant but move much more slower  than the ac component.  

At the decision point, I need to know the slope of the rise and fall. This is a hard realtime system and I really need to make a decision in the 100usec after the downward slope reach to dc level. 

I am looking for suggestions how can I efficiently implement an algorithm that is decent.  

Currently I do a running average (past 25 data points added together) and try to detect the trend. Once I detect the trend up I start seeking trend down and once I do that I collect perhaps another 50 samples and start calculating. 

Noise now easily screws this algorithm, hence the question. 

UPdate

For the benefit of others, I have end up implementing a Moving Average followed by integrator. Moving average of past 64 data smoothed enough but lost rise to a degree, integrating last 8 values gained back the rise and I simply seek for rise and fall, later I did a linear regression for the slope. Works ok, not great but ok.
You should start with a bandlimited differentiator (equivalent to a differentiator followed by a low-pass filter). The differentiator will remove the low frequency trend and will respond sharply to your peaks and slopes. The low-pass component will remove noise beyond the cutoff frequency.

You should design your cutoff frequency so that you get clean pulses for your slopes.

Positive slopes will slow as positive pulses; negative slopes as negative pulses, and the peak will correspond to the zero-crossing between positive and negative.

This type of filter is normally implemented as a FIR filter. The number of samples for your filter will then depend on your real-time constraints, the sharpness at the cutoff frequency, and the cutoff frequency itself.