...so that I can use that to name a csv-file which the EA produces. Is there already a built-in variable for that?
- put TimeFrame into variable?
- my backtest runs faster and then slow down
- Is it possible to export Backtest to CSV including screenshots
datetime timeval = TimeLocal(); string filename = "file-" + timeval + ".csv"; ...
... This will return a string similar to "file-142414233.csv", where this crippled number shows the seconds since 1st of january 1970 until now. You can modify the datetime value to show more representative things like e.g. "file-20151130123359.csv" if you wish.
datetime start=0,end=0; ... int start() { if (start==0) start = TimeCurrent(); end = TimeCurrent(); } ... double OnTester() { string FrTo = TimeToString(start)+"-"+TimeToString(end); // no seconds: 2015.08.12 08:12 int fnd = StringReplace(FrTo,":",""); //get rid of : }
...
gooly:
Thanks, gooly. I guess there is no way to have the end date right from the start because the csv-file is written on the fly (output at each bar) and not at the end of the test?
Alexnice:
Thanks, gooly. I guess there is no way to have the end date right from the start because the csv-file is written on the fly (output at each bar) and not at the end of the test?
Thanks, gooly. I guess there is no way to have the end date right from the start because the csv-file is written on the fly (output at each bar) and not at the end of the test?
1) You can enter the dates as parameters of the EA,
2) Write a tmp-file and rename it at the end
Nr.2 works for me, thanks a lot.
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