Forecasting based on air pressure

Hi,
I have a digital barometer which feeds data into a database.
I am trying to make a rudimentary forecasting system based on the trending of the air pressure.

But I am a bit stuck with how to calculate these trends.

Say for example, now at this time of writing my pressure is 100953 Pa, but one hour ago it was 100893 Pa, and 24 hours ago it was 101723Pa.

This all shows that the pressure has been sinking the last day, but is now rising again.

I have seen some that check if the actual pressure is above or less than 101325 at any given time, and if it is deviating significantly (250Pa) it may mean sun or rain. The only problem here is that my readings has been way over 101325, even when raining and storming.
So I need to check for deviations from the past X hours/readings to calculate if it has been a significant rise or drop. But this is where I get stuck, I have no idea how to do this math, or how far back I should look.

There must be some already finished algorithms somewhere?

PS: I am altitude compensating local pressure with this formula: pressure / pow(( 1-( altitude /44330) ), 5.256);

As you state you can only get a very rudimentary forecast with just barometric pressure. This page shows a set of simple baro based forecast conditions. Pressure tendency definitions can be found here.

For a better forecast add in wind information, as described here, and for more sophisticated amateur forecasting google “sager” or “zambretti” forecaster.