Erlang trading game engine