MQL4 and XML

 

Hello everyone.

I need to make a mql4 script, that can take indicators from an XML script.

The script is updated once a day, through a Excel file that is parsed to XML.

I will make the XML and other systems myself, but I don't really know too much about MT4, or MQL4. Therefore i'm actually looking for someone that wants to make the script for me.
We can talk about a price, when you know how long it will take etc.

Anyone interested?

 
unold:

Hello everyone.

I need to make a mql4 script, that can take indicators from an XML script.

The script is updated once a day, through a Excel file that is parsed to XML.

I will make the XML and other systems myself, but I don't really know too much about MT4, or MQL4. Therefore i'm actually looking for someone that wants to make the script for me.
We can talk about a price, when you know how long it will take etc.

Anyone interested?

Why not make a connection MT4 <-> Excel ?
 
Don't use XML. Exchange your data through CSV files. If you have full control over all components and are not forced to use XML because of some odd requirement that you cannot influence then there is absolutely no need to use XML for anything at all. Instead use the pragmatic approach and use simple and easy to parse text files (CSV or similar).
 

robofx - I prefer to have the data stored in a SQL database, to have historical data etc.
Is it possible to make a connection between MSSQL <-> MT4?

7bit - That was an option too. How to get data from a CSV into MT4? This has to be very easy to install in MT4, because it is a stratigy the company i work for, want to offer customers.

 
mql4 has built in functions to read csv files. you find them in the file functions section of the reference manual.
 

Ok, but since it has to be updated automaticly everyday, from several independent traders, i think it has to be some online service.

The CSV file could be on a link, or in html, but then there has to be some funtion in the MT4 that is updating it automaticly.

 

You will most probably end up having parts of your code written in something else than mql4. You can either make a dll (mql4 can load dlls and import functions from it (but be prepared for many hours of work and much frustration and crashing MT4 100 times a day until you figured out all the pitfalls¹ and how to work around them)) or you can make a separate external program (*much* easier) that will connect to your web service and writes mql4-friendly csv files.


________
¹) You will most likely start separate threads in your DLL and synchronize them with the function calls that come from mql4 and this will open up a whole can of worms and you can easily crash the entire MT4 process either immediately or on DLL unload if you make the slightest mistake and you cannot even attach a debugger because instead of fixing bugs and implementing features they chose to waste their (and your) time (and money) by "protecting" MT4 with this useless Themida anti debugging crap whose sole purpose (by definition!) is to intentionally create problems where there wouldn't have been ones for absolutely no reason other than filling the pockets of the Themida folks and satisfying the totally screwed ideas of the MetaQuotes bosses (who don't seem to be programmers²).

²) Even their programmers don't seem to be real programmers.

 

Ok, i have made a CSV now. What should it look like, to be MT4 friendly?

http://npforex.com/asp/dailytradingsignals.asp

 
This is already quite mql4 friendly. You don't need so send the column header if only mql4 will ever see this file, you would simply skip the first line (of course if you also want to be able to import it with excel or other software the header might be useful. If you need to process date and time in mql4 you should format it in such a way that the mql4 date and time functions can easily parse it and for the commands "GO LONG", etc. I personally would use numeric constants but this is a matter of taste.
 

The header was actually just so you knew what the values ment. :)

I will try to do some reading about the MT4 and CSV.. Thanks for your help so far. I might start posting again, when i need help with the CSV implementation.. ;)

Reason: