Young algorithmic trader

mcbusrider
Trader
Posts: 23
Joined: Sun Mar 15, 2015 4:37 pm

Young algoritmic trader

Post by mcbusrider »

SebastianCaan, have you had any luck with this so far? Setting up a socket with node.js might be an option for sending data?

It sounds like you want to use Python as the server, with Empty4 as the client, is this correct?

How about running two VPS - one on Linux, one on Windows?

The Windows VPS runs Empty4.

The Linux VPS runs your python script.

A node.js Web server runs on both systems.

On Linux, when the Python logic wants to (for example) open a new order, it would call the node.js script, which opens a socket between both systems and transmits the order to the Windows server.

The Windows node.js script reads the command and invokes an OrderSend() on the Empty4 platform.

I don't know enough about networking to know if this is possible, but I have written a web app which connects to an email API and I used socket.io for that, which is an extension of node.js

If anyone on here knows more about http networking, maybe they would be able to elaborate a bit more on the possibility of doing something like this, or if there is a better alternative solution?

Just an idea I had with my limited knowledge of how this kind of thing works.

You could probably even run it on one (Windows) platform, cutting out the need for http between servers, I just like the way Python sits on Linux.
SebastianCaan
Posts: 4
Joined: Tue May 09, 2017 6:21 am

Young algoritmic trader

Post by SebastianCaan »

Hello,

Thanks for sharing the idea. So far, I am looking about the solutions already in place.

For example, a bridge exists for python and Interactive Brokers. QuantConnect had a bridge with FXCM and Oanda and IB at the moment.

I am going to contact big Empty4 brokers in order to know which conditions are necessary in order to access directly to their API.

But by default, I would use QuantConnect, Quantopian or the like to run my algos, even if I don't like their intellectual property policy.

If nothing satisfaying already existed, so I would explore to do everything from scratch. In general, traders with means have special priveleges with good brokers, in term of API.

The simpler solution would be to build a bridge python/Empty4 by hiring a professional programmer.

Here are my thoughts about the subject so far.
User avatar
tomele
Administrator
Posts: 1208
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Young algorithmic trader

Post by tomele »

Hi.

With all respect.

I learned a lot of programming languages in my life. At the end, they are all very similar. They are all made of variables and their scopes, functions, loops and statements. I really cant see that much differences between Python and MQL. The somehow complicated part in MQL is the communication with the brokers server. I doubt that a bridge can handle that all for your Python program in the background.

My approach would be to learn MQ5 and code the algos right there. Coming from Python, learning MQL took me a few weeks. Of course I learned a lot from looking at and capturing code of stars like Steve, Rene, Tommaso and many others. This should be more rewarding than fiddling around with a more or less working bridge programmed by someone else.

Cheers
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
SebastianCaan
Posts: 4
Joined: Tue May 09, 2017 6:21 am

Young algorithmic trader

Post by SebastianCaan »

Hello,

I agree with you about learning MQL4/5, it is on my To-Do list. I am learning Python and R because I want to do some marchine learning and econometric modeling for my algo trading.

So I would like not to code in MQL4/5 after backtesting with Python/R, like I did with VBA/MQL4 for my stat arb strategies.

Anyhow, I already had some ideas to explore further in order to know which way to go.

Thanks for advice!
Post Reply

Return to “Coders Hangout”