  The forecast method introduced by Kors\'os et al.(2014) is generalised from
the horizontal magnetic gradient (GM), defined between two opposite polarity
spots, to all spots within an appropriately defined region close to the
magnetic neutral line of an active region. This novel approach is not limited
to searching for the largest GM of two single spots as in previous methods.
Instead, the pre-flare conditions of the evolution of spot groups is captured
by the introduction of the weighted horizontal magnetic gradient, or W_GM. This
new proxy enables the potential of forecasting flares stronger than M5. The
improved capability includes (i) the prediction of flare onset time and (ii) an
assessment whether a flare is followed by another event within about 18 hours.
The prediction of onset time is found to be more accurate here. A linear
relationship is established between the duration of converging motion and the
time elapsed from the moment of closest position to that of the flare onset of
opposite polarity spot groups. The other promising relationship is between the
maximum of the W_GM prior to flaring and the value of W_GM at the moment of the
initial flare onset in the case of multiple flaring. We found that when the
W_GM decreases by about 54%, then there is no second flare. If, however, when
the W_GM decreases less than 42%, then there will be likely a follow-up flare
stronger than M5. This new capability may be useful for an automated flare
prediction tool.
