Next, the following terms will be used:
Master PC – the PC on which NinjaTrader with the Network Bridge(TCP/IP Server) is running;
Slave PC – PC on which Metatrader with Expert Advisor(TCP/IP Client) is running.
Since the TCP/IP is used for the operation of the Network Bridge, in the Metatrader 5 settings you need to add the host name of the PC or its IP address to the list of allowed URLs. This can be done in the terminal settings: Main Menu->Tools->Options, tab ‘Expert Advisors’.
It is also necessary to allow algorithmic trading, to allow the import of DLL files in Metetrader 5(4) and enable checkbox “One Click Trading” on the “Trade” tab:
For the properly work of the expert, add the necessary symbols to the “Market Watch” window:
Using on the local PC
*This action needed only for the Metatrader 5.
By default, the Network Bridge is configured to work on a local PC, so you need to specify IP address 127.0.0.1, as shown in the figure below:
Using over local network or Internet
If you use the Network Bridge in a local network or via the Internet, you need to specify the IP address of the Master PC.
In the case of working via the Internet, the required port must be forwarded to the Master PC.
For example, if your Master PC has the address 192.168.1.122, you need to add this address: