We formulate an equilibrium model of intraday trading in electricity markets. Agents face balancing constraints between their customers consumption plus intraday sales and their production plus intraday purchases. They have continuously updated forecast of their customers consumption at maturity with decreasing volatility error. Forecasts are prone to idiosyncratic noise as well as common noise (weather). Agents production capacities are subject to independent random outages, which are each modelled by a Markov chain. The equilibrium price is defined as the price that minimises trading cost plus imbalance cost of each agent and satisfies the usual market clearing condition. Existence and uniqueness of the equilibrium are proved, and we show that the equilibrium price and the optimal trading strategies are martingales. The main economic insights are the following. (i) When there is no uncertainty on generation, it is shown that the market price is a convex combination of forecasted marginal cost of each agent, with deterministic weights. Furthermore, the equilibrium market price follows Almgren and Chriss’s model and we identify the fundamental part as well as the permanent market impact. It turns out that heterogeneity across agents is a necessary condition for the Samuelson’s effect to hold. (ii) When there is production uncertainty, the price volatility becomes stochastic but converges to the case without production uncertainty when the number of agents increases to infinity. Further, on a two-agent case, we show that the potential outages of a low marginal cost producer reduces her sales position.