You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I avoided using frames. There were some limitations like the passing of only an array of doubles that had me switch tactics.
...There is no limitation at all when you can use a file. What can't be passed in a file ?
Forum on trading, automated trading systems and testing trading strategies
FrameAdd using data file
Alain Verleyen, 2017.05.21 13:42
I checked against following your post and finally figured out how it works :
Thanks @Stanislav KorotkyThere is no limitation at all when you can use a file. What can't be passed in a file ?
Yes, using a file to pass information will work. In fact, your code snippet and what I do are very similar. We both open, write, and close from OnTester().
A different limitation I ran into:
I could not changing input parameters on-the-fly, specifically with ParameterSetRange(). This worked in theory, but I could only set it in OnTesterInit(), and the changed values were not recognized by the running optimization threads. It's possible I was doing something wrong. Global variables didn't work because they weren't shared between the calling instance and the optimization threads. So, passing information through files was the only possibility (further underscoring the correctness of your answer).
And since that was the case, I didn't see any value in using OnTesterInit(),OnTesterPass(),OnTesterDeinit() when I could simply dump data into a CSV from OnTester().
Alain Verleyen:
There is no limitation at all when you can use a file. What can't be passed in a file ?
Thanks Alain, but just one more question, maybe a dumb on...
In every pass of the optimization the file will be write, so it gets overwriten by next pass?
or it is managed that the file content bellowing to that pass of optimization will be read by the framenext?
I dont get it...
Thanks
Anthony Garot 2018.03.27 13:50 #10 PT
See my comment here:
https://www.mql5.com/en/forum/35683#comment_6397172
I so use the optimizer, yes, and blend my results (CSV file) with the optimizer's results (XML file).
Python is nice for automating all of this because it has libraries for handling CSV, XML, and even INI files.
Thanks for the response...
But I prefer an mql only way.
Your way I need to tell metatrader to create the report, than save the parameters and compare with the xml to know from what pass is the results...
Maybe I do it if I automate the tests.
But I will try an mql only option first.
Thanks
Of course. I can fully understand and appreciate that.
Thanks everyone, saving to a file works!
There is no limitation at all when you can use a file. What can't be passed in a file ?
I dug into this a little more today.
It appears that when using Local Network Farm agents a file cannot be opened in the OnTester() event.
I know OnTester() is firing because data set in OnTester() is passed back to OnTesterPass() from the agents via frames.
So my approach of dumping data to a file from OnTester() only works for Local Agents, not Local Network Farm Agents, and presumably not for MQL5 Cloud Network Agents.
fxsaber:
. . .
#include <TypeToBytes.mqh> // https://www.mql5.com/ru/code/16280
This is an interesting approach to passing non-double data through Frames.
Thank you for the suggestion.
This is an interesting approach to passing non-double data through Frames.
Thank you for the suggestion.
And for custom events
Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
Библиотеки: TypeToBytes
fxsaber, 2018.03.31 09:24