ntungufhadzeni/MT5-Python-Trading ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python project that connects to MetaTrader 5 and lets me automate simple trading strategies from scripts.

I want a clean setup where I can load my MT5 login details from a config file, then run a demo trading script or a live trading script. It should be able to get historical price data, open and close positions, manage existing trades, and move a stop loss to break even when a trade goes in my favor. Please include a basic backtesting flow too, so I can try a strategy on past data before using it live.

Make it easy to edit the strategy logic in one place, and include a few example scripts that show how to use it. I’d like the code organized in a way that is easy to extend later, with clear logging and sensible defaults. If you need to check the current MT5 Python docs or best practices, look them up online.

Are you gonna build this?

make sure you review the code using arcumet

Try freeSponsored — opens Arcumet in a new tab