Import Data & Virtual Tester (Development)

 

Inspired by the topic here, in my opinion MT5 with all its power is missing some viable options. This is not a thread about why MetaQuotes didn't give me. But rather how can I find solutions to the problem. It appears that having control of tick-data and market-info would not be implemented within our generation of meta-trader. So why is it important? I'll give a few reasons below.

1) My brokers average spreads on EURJPY for example is much lower than that of default-data how can I test with this average lower spreads and vice-versa? Non-mt5 broker.

2) My system is designed for ranging markets, how would my system handle a prolonged trending market. Is my algorithm good enough to keep it out-of-phase? Vice-versa for Trending.

3) I believe markets are Random, how do I test this system on some Random-Data and compare the results to the Real-Data?

4) My broker/seller ... give/sold me tons of high-quality data but they do-not have a mt5 server, how could I get these into mt5 for performing my back-tests?

5) I believe in Real-Ticks not algorithm generated ticks. I've saved my ticks for the last x-years and would prefer using that, what are my options?

6) I want confidence and better control of the Environment[market-info] and Data[price|time|spreads], what do I do about this?

I had more reasons, but somehow cannot recall all of them right now. Hope to hear your reasons :)

 

The Goal:

I believe the goal should be simple. And the simple goal I have in mind is getting the mt5 strategy tester to use data within a .csv | .hst format. All the other goodies can come later. 

I believe the first phase of discussion should be "is this viable". The obvious question here "why mt5". As I mentioned, its more powerful than its predecessor. Most of us [who-care], are heavily invested in the mql* language. Also, discussing other platform is-not gonna go down well on this site. And lastly re-inventing the wheel is outside-of the question.

As such, I'm looking for Ideas to incorporate as-much-as-possible from what we have. So lets hear those bright ideas people!

1> I'm thinking if those EMULATION_MODES could be harness fully within the back-tester it'll make allot possible. Also, having the ability to Sleep within the back-tester would also be a useful tool. I'm still researching this and taking a look at the current Virtual Stuff already developed. Sorry if it doesn't seem like I know my stuff, but there's a demand for this topic and thats why I need you guys. Cheers.

 
Ubzen:

The Goal:

I believe the goal should be simple. And the simple goal I have in mind is getting the mt5 strategy tester to use data within a .csv | .hst format. All the other goodies can come later. 

I believe the first phase of discussion should be "is this viable". The obvious question here "why mt5". As I mentioned, its more powerful than its predecessor. Most of us [who-care], are heavily invested in the mql* language. Also, discussing other platform is-not gonna go down well on this site. And lastly re-inventing the wheel is outside-of the question.

As such, I'm looking for Ideas to incorporate as-much-as-possible from what we have. So lets hear those bright ideas people!

1> I'm thinking if those EMULATION_MODES could be harness fully within the back-tester it'll make allot possible. Also, having the ability to Sleep within the back-tester would also be a useful tool. I'm still researching this and taking a look at the current Virtual Stuff already developed. Sorry if it doesn't seem like I know my stuff, but there's a demand for this topic and thats why I need you guys. Cheers.

Please be aware that the Strategy Tester is still,  as far as I can see, a work in progress.  I have found out first hand that some things just don't work, many Object types are supported but you can't right click on the chart and see a list of Objects,  so be a little cautious when designing a solution,  what you design may not be supported.  If for example you created some products for the Market which relied on Button Objects or  ChartGetInteger() with CHART_FIRST_VISIBLE_BAR,  CHART_VISIBLE_BARS,  CHART_WIDTH_IN_PIXELS and CHART_HEIGHT_IN_PIXELS,  then you would have products which could not be tried as Demo products as these functions/features do not work in the Strategy Tester.  

What else doesn't work in the Strategy Tester ?

What we really need is for Metaquotes to code a local History Data Server application.  Not only would it manage our stored History data but it would also allow us to create our own Symbols by customizing the Symbol properties . . . back testing with offline charts would be easy.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5
 
Ubzen:

The Goal:

I believe the goal should be simple. And the simple goal I have in mind is getting the mt5 strategy tester to use data within a .csv | .hst format. All the other goodies can come later. 

...

How can this be possible ? We don't have any control on the Strategy Tester. We have only 2 options I think:

  1. Use the Strategy Tester as is, and trying to work on the data. ST use .hcs file, which structure is unknown at the moment AFAIK. Is this possible to replace these file with your own and get some results ?
  2. Use a Virtual Strategy Tester, on which we have total control. This means more work but also more independence, while no longer depend on format hcs changes for example.

We can investigate on the 2 options. My idea was more on the second.

 

Writing complete system is not a simple task, but it is a achievable goal.

However, the moment you start writing such a system, you will be spending your time on developing this system, and not on trading or developing trading systems. Because the amount of work is endless.

The main decision to be made, is to decide to build your own system. You have to move completely outside of MT5, otherwise you will always and continuously have to make some kind of compromises, and write double code (like it is now for MT4-MT5). Also, some great things like strategy tester agents are not so easy to implement.

There is at least one already existing framework, so something like that should be used.

Let me google that for you
Let me google that for you
  • bit.ly
Let Me Google That For You
 
graziani:

Writing complete system is not a simple task, but it is a achievable goal.

I'm interested in understanding how you would make it work with mql5 coded EA's and indicators ?
 
RaptorUK:
I'm interested in understanding how you would make it work with mql5 coded EA's and indicators ?

you can't. you have to move out of MT5. all future EA's/indicator's are written outside of MT4/MT5, then you use MT4/MT5 as tick stream provider and for order execution.

for backtest purposes, you can reverse engineer database format (forbidden but achievable), and replace M1 with S1 (one second, not one tick) records, and then just run through M1 history in ST. but i don't see any use for this, because for live stream, you have to write a completely different EA, which has to use internal indicators as it should be processing the collected tick stream, and not history arrays.

My point was that by starting such project, one would be concentrating on building another 'MT4/5' and not on trading. 

 
graziani:

you can't. you have to move out of MT5. all future EA's/indicator's are written outside of MT4/MT5, then you use MT4/MT5 as tick stream provider and for order execution.

for backtest purposes, you can reverse engineer database format (forbidden but achievable), and replace M1 with S1 (one second, not one tick) records, and then just run through M1 history in ST. but i don't see any use for this, because for live stream, you have to write a completely different EA, which has to use internal indicators as it should be processing the collected tick stream, and not history arrays.

My point was that by starting such project, one would be concentrating on building another 'MT4/5' and not on trading. 

Thank you for the reply,  I thought I understood what you were suggesting I just wanted you to be clear,  and you have been.

 

@RaptorUK: Thanks, I understand every-thing may not be supported. I don't know everything which doesn't work within the strategy tester. I'm not making a product for the market. Someone making products have their own sets of problems. They can either modify the codes we make or wait for mq. Mq does not participate in these discussions, (ignores us), I'm done asking them for anything.

@angevoyageur: I agree we need something like option#2. I don't mind doing a little more work for more independence. What ever we come up with, needs to be easily adopted and accepted. Otherwise all the work will be in vain. I don't think we could make it as-easy-as : [code your ea in mql5] [start the strategy tester] [and virtual strategy tester takes over]. However, we could use drop-in replacement for functions which already exists by putting a 'v' in front of the function's name.

@graziani: How about this for simple. FileRead( my.csv ); FileRead( my.market.info ). Replace your Marketinfo() with vMarketInfo(). DrawObjects as strategy tester moves. Make a Report.......Done. :), So what u think? Easier said than done right?

Moving outside of mt4 or mt5 wouldn't work because I'm trying to gather support from coders similar to myself moving from mql4-mql5. In order to keep motivated about such projects, it need successful adaptation by others, if only for testing|bug-reporting purposes. I like the Agents and the Optimizers, I was hoping someone would say it's easy to implement (here's how) :(. Lets face it, all the feature within mt4/mt5 is-not going to be supported with the first version of this VST.

Getting support for data, market-info, market-execution, multi-currency and a simple reporting is what's needed at this time. The more people who can volunteer anytime on this project the more successful it'll be. If the project becomes about moving outside mt, we'll have to built all the above + allot of other things we'd never had to consider before.

I was really hoping we could use ready-built mql5 codes. If no-one suggests a way of doing this angevoyageur#1, then we'll move on to angevoyageur#2.

 
RaptorUK:

Thank you for the reply,  I thought I understood what you were suggesting I just wanted you to be clear,  and you have been.


There is no question of doing something outside MT5. There is no question to reprogram everything already works with the Strategy Tester. There is no question to replace the Strategy Tester. The idea is to develop something that complements the Strategy Tester, by one or other of the two options (see above), or a combination of two.
 
Ubzen:

@RaptorUK: Thanks, I understand every-thing may not be supported. I don't know everything which doesn't work within the strategy tester. I'm not making a product for the market. Someone making products have their own sets of problems. They can either modify the codes we make or wait for mq. Mq does not participate in these discussions, (ignores us), I'm done asking them for anything.

@angevoyageur: I agree we need something like option#2. I don't mind doing a little more work for more independence. What ever we come up with, needs to be easily adopted and accepted. Otherwise all the work will be in vain. I don't think we could make it as-easy-as : [code your ea in mql5] [start the strategy tester] [and virtual strategy tester takes over]. However, we could use drop-in replacement for functions which already exists by putting a 'v' in front of the function's name.

@graziani: How about this for simple. FileRead( my.csv ); FileRead( my.market.info ). Replace your Marketinfo() with vMarketInfo(). DrawObjects as strategy tester moves. Make a Report.......Done. :), So what u think? Easier said than done right?

Moving outside of mt4 or mt5 wouldn't work because I'm trying to gather support from coders similar to myself moving from mql4-mql5. In order to keep motivated about such projects, it need successful adaptation by others, if only for testing|bug-reporting purposes. I like the Agents and the Optimizers, I was hoping someone would say it's easy to implement (here's how) :(. Lets face it, all the feature within mt4/mt5 is-not going to be supported with the first version of this VST.

Getting support for data, market-info, market-execution, multi-currency and a simple reporting is what's needed at this time. The more people who can volunteer anytime on this project the more successful it'll be. If the project becomes about moving outside mt, we'll have to built all the above + allot of other things we'd never had to consider before.

I was really hoping we could use ready-built mql5 codes. If no-one suggests a way of doing this angevoyageur#1, then we'll move on to angevoyageur#2.

We're on the same wavelength.
Reason: