This library for Metatrader 4 will create a network interface for RPC with msgpack. You can write Metatrader scripts in programming languages of your choice.