Backtesting on Market Replay Data (like if I was using Playback in NinjaTrader)

Hello There!

I am seeking guidance on backtesting my trading strategy using Python, specifically on market replay data, rather than traditional historical data. While historical data provides a valuable overview, I aim to leverage market replay data to achieve near-perfect accuracy in my backtesting process. Market replay data captures the intricacies of live market conditions, including order flow and intraday price movements, offering a more realistic and precise simulation for evaluating my strategy’s performance.

To achieve this, I am using the NRD to CSV software from the GitHub repository (GitHub - eugeneilyin/nrdtocsv: NinjaTrader 8 AddOn to convert NRD (*.nrd) market replay files to CSV (*.csv)) to transform the .nrd market replay data from NinjaTrader into .csv format. This allows me to access the data within Python. However, I am finding it challenging to reproduce the entire process with the same functionality and visual appeal as NinjaTrader’s market replay feature. Specifically, I am struggling to generate a comprehensive and visually appealing chart that includes all the necessary functionalities for effective backtesting.

I am interested in integrating this market replay feature into my current Python project, which already includes sophisticated trading algorithms optimized with machine learning and deep learning techniques. The goal is to replicate the functionality of NinjaTrader’s Playback feature within my Python environment, ensuring my strategy is rigorously tested under conditions that closely mirror real-time trading. This approach will help refine and validate the strategy with high fidelity, ultimately enhancing its reliability and profitability in live market scenarios.

Any help appreciated,
Thanks in advance!

Amir