Backtesting Python Bot with MT5

Javad Zafar  
I write a python bot and it's working fine with mt5.all the functions that i write is correct and i use lib like metatrader5, pandas and ect for my code.
the only problem is backtesting. i know i can write a data loader and reporting system myself with python but it's too much useless work right now.
is there any backtester for mt5 that i can connect my code to it with terminals and other stuffs ?

I haven't tried it myself, as I am working completely within metatrader environment,

But I have came across this-

(Video Tutorial)

(Direct youtube link to the above video, because I seem to have problems embedding it in the message)

(The github project of the above tutorial)

I would appreciate if you could report back if it did or didn't work,

As I am curious to know, as I myself might migrate the python in the future, but would hate losing the ability to use metatrader's strategy tester.

Good luck mate.

GitHub - mkhushi/MQL5-Python-Backtesting: MQL5 based backtesting using python
GitHub - mkhushi/MQL5-Python-Backtesting: MQL5 based backtesting using python
  • mkhushi
How to run the Strategies: open and import the trading strategy which is intended to run Update the strategy and the signal line Start the backtesting in Metatrader 5 Copy the python files along with the...
Shahryar Ashiq  

hello i am trying to build a bot in python i create vrtual envirmnent then import libraries and now i can able to connect to my mt5 account i try to run code 


fail counldnt go through

name error occured

i try this method too but still fail

mt.initialize(path ="users\shahryar\documents\mt5 bot\bot\venv\lib\site-packages",


tell me solution i am not coder but i am learning to build a bot for my self. its been 6 month now i am able to get all this thing but on stuck on this please anyone help me out

Shahryar Ashiq  
from datetime import datetime
import matplotlib.pyplot as plt
import pandas as pd
from pandas.plotting import register_matplotlib_converters
import MetaTrader5 as mt5
import as px