Convert a mql4 .set files to forextester .dat

Examples step by step how to make your own automated strategy or user indicator
Message
Author
omarloren
Posts: 5
Joined: Wed Nov 23, 2011 1:08 pm

Convert a mql4 .set files to forextester .dat

#1 Postby omarloren » Thu Jan 12, 2012 5:00 pm

Hello everyone, at my work we have a long time using MetaTrader for testing and for the last month we are giving to FT a try, since we have lots of logs (.SET) we need to use all this files on FT, so to solve this issue I have made a java programm that kind of convert metatrader .set files to .dat files, I'm not sure if there's someone out there that could find this useful,so if it is please advice and I'd write a tutorial or something. I have in mind to do a github repository for this, so again please advice me. Thanks :wink:



**Note: English not my fist language, sorry for the misspeling.

User avatar
Tantalus
Posts: 302
Joined: Fri Mar 23, 2007 3:51 pm
Contact:

#2 Postby Tantalus » Fri Jan 13, 2012 10:33 am

I'm curious - what information does MT4 store in a .set file?

Also, what format is a .dat file using to store info? I've looked inside them using a text editor and it's clearly a binary file. I'd be interested in learning how to access them directly.
Tantalus Research - Developing 21st Century Trading Systems.

omarloren
Posts: 5
Joined: Wed Nov 23, 2011 1:08 pm

#3 Postby omarloren » Mon Jan 16, 2012 11:56 am

Tantalus wrote:I'm curious - what information does MT4 store in a .set file?

Also, what format is a .dat file using to store info? I've looked inside them using a text editor and it's clearly a binary file. I'd be interested in learning how to access them directly.


You have a strategy that calculates bollinger bands for order sell/buy, lets say that this strategy have several external variables (those declared with mql4 "extern" keyword), and you want to make several tests of this estrategy using metatrader for testing you are able to save/load the values of this variables saving/loading a .SET file, wich store all this data. At work we accumulate lots of this files, because we make lots of strategy testing.
In the other hand a .DAT file store the same, external values of variables for Forex Tester.
if you have a FT strategy who has a variable named stop_loss
RegOption ("stop_loss", ot_Integer, &stop_loss);
when you load this strategy within FT and give this variable a value FT Will generate a file .DAT with the following.
stop_loss=75
(75 is the given value), If you run several tests for this strategie with different values of stop loss FT rewrite this file. In my particular case I have long time using a metatrader for testing but now I want to give FT a try so I rewrite my strategy fot FT but this strategy have like 30 varibles so, one of the problems is that I need to run testing with my old .SET files beacause is annoy write by hand all this values, so I need to convert .SET to . DAT files.
My little convert is writed in java if you are interested I could make a best explained tutorial and make the code public. So let me know.
Cheers!

User avatar
Tantalus
Posts: 302
Joined: Fri Mar 23, 2007 3:51 pm
Contact:

#4 Postby Tantalus » Mon Jan 16, 2012 5:27 pm

That's pretty cool, but the information in the .dat file looks like random gibberish to me. How do you decode it?
Tantalus Research - Developing 21st Century Trading Systems.

omarloren
Posts: 5
Joined: Wed Nov 23, 2011 1:08 pm

#5 Postby omarloren » Tue Jan 17, 2012 12:18 pm

Tantalus wrote:That's pretty cool, but the information in the .dat file looks like random gibberish to me. How do you decode it?


I dont know what are you talking about, When I open a .dat file it looks with simple text to me, are you opening the files within the strategies folder? because I can see that FT generates several .dat file for differents purposes so, be sure of look at this folder in particular.


Return to “Programming lessons”

Who is online

Users browsing this forum: No registered users and 15 guests