Should I "upgrade" from mql4 to python?

hi guys,

i’m currently using mql4 and i’m thinking about “upgrading”. I’m not a programmer (i only used mql4 so far) so i’m thinking about python since it seems to be on a simpler level compared to other mainstream languages.

what’s your opinion/view about shifting to python? is it worth? any benefits over mql4? mql4 does the job but it’s limited to mostly forex and a couple of cfd’s.
I looked quickly into mql5 coding and…not sure if its a better idea over python.

tnks
L

1 Like

Hi, what goal do you want to achieve by switching to another coding language? Regards Greg

1 Like

mostly to have a wider choice of instruments. stocks for example…

also maybe it will be “easier” to code certain things in python? by easier i mean the structure/approach wmight be different, which may or may not feel easier

1 Like

Ok, you will create strategies in Python, where you want to install these strategies and trade?

2 Likes

what do you mean? i don’t know how python works but I presume you do that through APIs no?

i’m just curious/asking if its worth taking the leap towards it. I can’t really compare myself since I have only used mql4 so I don’t know what other languages have to offer. And as I said i’ve chosen python cause it seems to be rated/reviewed as one of the simpler options out there.

1 Like

Meta 4 and 5 have own language to creating expert advisors mql4 and 5. By api’s ( working with MT5 ) and FIX API which is used to directly connect, faster connect to broker servers. By integrations between Python and MT5 you can get something like manager panel for MT5. Check full documentation from mql5. Regards Greg

2 Likes

thanks will look into that

Just my .0002 cents, but completely changing from an existing platform and language to a different one is no trivial pursuit, and should only be done with reason. That being said, “current platform doesn’t support desired instruments” is a damn good reason. I think the only real question here is MQL5 or Python/API. As far as I know, they wrote MQL5 specifically to address the need to expand beyond forex.

Writing your own Python code and interacting with a broker’s API instead of using MQL has upsides and downsides, like everything else. I would spend some time looking through the capabilities of your broker’s API and how it works. Also check if they even support MQL5. I don’t think mine does.

Personally, I only use MQL4 for trading, but I wear other hats that involve making calls to REST and SOAP APIs. If you’re going to go the API route, I’d recommend checking out Postman. The Postman client can make it super easy to setup authentication headers, submit request body, and examine response. SUPER helpful in testing your API calls and troubleshooting them before you try wrapping a new language around it.

Good luck, and let us know what you decide!

-Nick

3 Likes

And on which platform would you run your python programs?

Thanks

My 0.0001 cents :slight_smile:

Firstly - I am not a Python developer, but I have over 20 years of development experience, so can’t say how easy or hard is to trade via python.

99% sure there are packages which would help you with the basic tasks, but they are not out of the box, you need to find them and to study them.

To work with MQL and MetaTrader is easy, as you are connected all the time, so you don’t think of such trivial stuff as connection, keeping session or how to open or close the trades, you have functions ready to be used.

For python you need to get familiar with a lot of libraries, to make it work.

Python wont make you more successful, but if you want to trade stocks, probably this is the only way, as most Brokers allow mainly Forex with it.

Python is more powerful, but with power come also a big learning curve. Probably is worth to ask your broker if they have Python libs or examples how to trade with that. If they don’t have, you need to find a way to create those connections and trading functions yourself.

The second bit is the data. If you don’t fetch it from your broker, you could analyse wrong data, and therefore attempt to open wrong trades. Probably except if you trade daily data fetching if from other providers could be OK, but if you day trade, for sure you need to use your broker for that.

In conclusion - python wont give you super powers out of the box, so if you don’t prepare yourself for a lot of learning probably it’s not worth the switch, but if you have a nice stock strategy, and you paper traded it and it’s proven positive, probably it’s worth to invest in some learning.

2 Likes

Great post, thanks!!

thanks for the replies ppl i really appreciate it (sorry for late reply but for some reason i never get email notifications despite its turned on)

looks like python is not as ‘easy’ as many reviews/tutorials claim it to be. I mean the fact that its not standard (from what I understood about the library things) it’s already opening endless possiblities. I mean not that its wrong, but its like trying to shop for something online vs a local store, the more options I have the more i’ll get lost. I like Mql4 but its specifically made for trading, but as stated, it hasn’t got stocks. I think mt5 might be a wiser choice considering it will not be a completely new enviornment for mql4 users (tho, 90% of the coding,functions and methodolgy were changed so…)

broker compatibility is another issues which i havent thought about.
my current broker I know they accept mt4/5 but no APIs for small accounts

That’s usually the problem :frowning:

Well, that depends on your requirements. Some people are doing good with mql4 while some believe that python is a better option for them. Based on what you think you will be able to do properly, you can make the decision. Do set your goals before you plan to learn a new language.

Though MQL4 is easy to use, it is not that beneficial as compared to Python which might be more useful for strong calculations, automation, etc.

It is up to you to decide. If there is something that you cannot achieve using MQL4, you can upgrade to python. But if there is nothing like that, I don’t understand the need for the upgrade.

I use both Python and Julia with OANDA which has a relatively mature API allowing for automated trading. There are python libraries to support OANDA API. Introduction — OANDA REST V20 API Wrapper 0.6.3 documentation

If you move outside of the MQL4 framework you are going to have to do a lot more heavy lifting yourself, but you do have a lot more flexibility in processing and control.

MQL is far from your best choice of languages for coding trading strategies. Your time would be far better spent working with Python than working with MQL.

Python is relatively easy to learn. There are a load of tutorials.

There are already some libraries available related to trading.

You can use APIs to interface between Python and your broker, as long as you have a broker with a suitable API. Some brokers have no API available at all.

You can give python a try and see if it works better for you than mql4. There are traders who after learning python haven’t looked back. On the other hand, there’s a segment, who’ve ended up wasting their time and money with it.
Just be careful and wise…