Data Engineering
Bug Report
Backtest looked great, live results flat: look-ahead bias from using the candle close
A moving-average strategy showed strong backtest returns and nothing like it in paper trading. The backtest computed the signal from a candle's close and filled the order at that same close, a price nobody could trade at once the signal was known. Shifting signals to the next bar fixed the simulation.