Hello,
You can convert an MT4 code to MT5 using the FXdreema tool. However, it may not always work perfectly because FXdreema doesn't include several MT4 functions, which can be manually resolved. Your project sounds very interesting, and I hope you manage to solve it. If you like, you can share the link to the MQ4 version that you mentioned works well, and I'll help you convert it to MQ5 if possible.