A new method of forecasting geomagnetic activity and proton showers