We propose a novel computational procedure for quadratic hedging in high-dimensional incomplete markets, covering mean-variance hedging and local risk minimization. Starting from the observation that both quadratic approaches can be treated from the point of view of backward stochastic differential equations (BSDEs), we (recursively) apply a deep learning-based BSDE solver to compute the entire optimal hedging strategies paths. This allows us to overcome the curse of dimensionality, extending the scope of applicability of quadratic hedging in high dimension. We test our approach with a classic Heston model and with a multiasset and multifactor generalization thereof, showing that this leads to high levels of accuracy.