Connection To MT5

The engine wakes up and knows exactly where it is.

No login is hard coded. On start the engine reads the account behind the terminal, resolves the installation and opens the door, before a single order is ever considered.

Connection.py
# identify, then connect
account = read_account()      # who am I
kind    = classify(account)   # demo / prop

path    = resolve_terminal()  # which install
session = open_connection(path)

if session.alive:
    load_strategies(account)  # discover

Five steps to ready

The same handshake runs every time. The engine learns the account, discovers the strategies that live there, reads how each one thinks, opens the line and stamps its signature.

Account identifiedbroker · server · account type
Strategies discoveredfound on the terminal, never hard coded
Config readlogic · risk matched to the account
Connection openthe line to the terminal is live
Magic ready

One terminal, many strategies

They share the same connection, yet each one carries its own signature.

EXECUTION TERMINAL · ONE CONNECTION Trend strategy momentum · core risk magic 1001 Reversal strategy mean reversion · core risk magic 1002 Breakout strategy range break · reduced risk magic 1003 Session strategy time window · reduced risk magic 1004

The magic number never lies

It is the signature stamped on every order. Share one terminal across many strategies and the journal, the tools and the engine still know exactly whose position is whose.

Order fired Stamped with magic Traced back to its strategy