We present newly discovered pre-flare behaviour of the evolution of sunspot groups by analysing the SOHO/MDI-Debrecen Data (SDD) catalogue. Our method employes the weighted horizontal gradient of magnetic field (WGM) defined between two spot-groups with opposite polarities at the polarity inversion line of ARs. The WGM is an excellent proxy measure of magnetic non-potentiality at the photosphere, derived from the observed line-of-sight component of the magnetic field. The value and temporal variation of this proxy is found to possess important diagnostic information about the intensity of expected flares. This new tool greatly enhances the capability of forecast, including (i) the accuracy of onset time prediction, (ii) CME risk assessment, (iii) whether a flare, stronger than M5 in terms of the GOES classification, is followed by another event within 18 hours. We argue that our method is currently one of the bests to forecast these eruptive events. Finally, we discuss the limitations of our approach and propose how to potentially mitigate these shortcomings.