One measure of financial markets is order book imbalance (OBI), defined as the number of buy orders minus the number of sell orders in the order book around the best quote. Thus, OBI is an indicator of an imbalance in supply and demand, which can potentially impact the price as price movements in the financial market. There is known to be a positive correlation between OBI and returns, and some investors attempt to exploit this characteristic to improve their investment performance. In financial markets, an investor sometimes want to place a large order. When the investor places the large order at one time, some other investors find out someone wants to trade large amount and trade ahead of time, or the market price gets rough and losses are incurred. Therefore, execution algorithms are used, by which a machine automatically divides orders into smaller lots to avoid distorting the market price. Execution algorithms could be expected to achieve improved performance when OBI is taken into account, but no such findings have been reported so far. One reason for the lack of research findings is that it is virtually impossible to measure the impact of OBI alone on the performance of execution algorithms, since there are many external factors that can affect financial markets. Multi-agent simulation is one way to solve problems that are difficult to analyse using empirical research and conventional methods. In a multi-agent simulation, individual actors in the world are regarded as agents and the behavioural rules and interactions of these agents constitute a model. In this context, a financial market constructed using multi-agent simulation is called an artificial market. In this study, we modelled an execution algorithm considering OBI, investigated how the model is affected by the market under several market patterns using artificial markets, and analysed the mechanism. The results showed that in stable markets, the performance of the execution algorithm with the OBI strategy varied with the number of orders placed. In contrast, in markets with unstable prices, the performance of the execution algorithm with the OBI strategy was higher than that of the conventional execution algorithm. Even in markets with manipulation by spoofing, the performance of the execution algorithm with the OBI strategy was not significantly less than that of the conventional execution algorithm, demonstrating that the model is not easily affected by spoofing.