How to optimize on today's data ?

 


When running on the Strategy Tester
the optimization results are up to yesterday even if you mark the today/next day in Custom period.

How to optimize on M1 today's data ?


Thanks in advance

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • 2011.05.18
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
 
toto900:
optimize on M1 today's data ?
To optimize on M1 today's data - not possible, must wait till tomorrow.
 
Today's data is not complete until tomorrow
 
toto900:


When running on the Strategy Tester
the optimization results are up to yesterday even if you mark the today/next day in Custom period.

How to optimize on M1 today's data ?

You can create a custom symbol based on the original symbol but with timestamps (for all ticks) shifted to 1 day left, then use it for optimization. Of course, this will not work for stategies looking into economic calendar (unless you make a tweaked copy of the news array as well).
 
Stanislav Korotky #:
You can create a custom symbol based on the original symbol but with timestamps (for all ticks) shifted to 1 day left, then use it for optimization. Of course, this will not work for stategies looking into economic calendar (unless you make a tweaked copy of the news array as well).
Thanks, the custom symbol data is deleted after importing/requesting and clicking ok , how to save it ?
 
toto900 #:
Thanks, the custom symbol data is deleted after importing/requesting and clicking ok , how to save it ?

Please, describe you procedure and exact settings, because custom symbol should be imported normally if created from its original.

Also if you edited tick data (for adjusting time marks) you could probably corrupt data formatting or consistency somehow. Try with a small subset of data first and make sure it works.

 
Stanislav Korotky #:

Please, describe you procedure and exact settings, because custom symbol should be imported normally if created from its original.

Also if you edited tick data (for adjusting time marks) you could probably corrupt data formatting or consistency somehow. Try with a small subset of data first and make sure it works.

1.
Symbols > Ticks > Request > The ticks are loading > ok

2.
Symbols >  Ticks  > The table is empty
 
toto900 #:
1.
Symbols > Ticks > Request > The ticks are loading > ok

2.
Symbols >  Ticks  > The table is empty

Follow the procedure below, and identify the step(s) that you're having issues with:

Custom Financial Instruments - For Advanced Users - Trading Operations - MetaTrader 5 Help
Custom Financial Instruments - For Advanced Users - Trading Operations - MetaTrader 5 Help
  • www.metatrader5.com
The trading platform allows creating custom financial symbols. You can view charts of such symbols and perform technical analysis , as well as use...
 
toto900 #:
1.
Symbols > Ticks > Request > The ticks are loading > ok

2.
Symbols >  Ticks  > The table is empty

It seems you're doing something strange. If you want it done manually, then open Symbols dialog, choose required original symbol, request bars and/or ticks for required time range and then press Request. Please note that the dialog may apply limitations for the number of bars/ticks returned (actual range is indicated), that is you'll not receive all requested data - this is how MT5 works. Then press Export Bars or Export Ticks button at the bottom left corner of the dialog. This will produce a csv-file with the history.

To create a custom symbol manually you can press Create Custom Symbol button, then use Copy from drop down box to choose required original symbol (for proper specification initialization). After this you need to choose the custom symbol in the dialog and press Import bars or Import Ticks button, and choose a CSV-file from disk.

Please note that if you want to prepare the custom symbol for tests on "today" day, you need to edit the timestamps in the CSV-files accordinginly - that is subtract 1 day from all dates.

I think it's a bit complicated to edit the big data without some sort of automation. So...

It's much more simple to create and populate the custom symbol programmaticaly by a script in MQL5.

 
Stanislav Korotky #:

It seems you're doing something strange. If you want it done manually, then open Symbols dialog, choose required original symbol, request bars and/or ticks for required time range and then press Request. Please note that the dialog may apply limitations for the number of bars/ticks returned (actual range is indicated), that is you'll not receive all requested data - this is how MT5 works. Then press Export Bars or Export Ticks button at the bottom left corner of the dialog. This will produce a csv-file with the history.

To create a custom symbol manually you can press Create Custom Symbol button, then use Copy from drop down box to choose required original symbol (for proper specification initialization). After this you need to choose the custom symbol in the dialog and press Import bars or Import Ticks button, and choose a CSV-file from disk.

Please note that if you want to prepare the custom symbol for tests on "today" day, you need to edit the timestamps in the CSV-files accordinginly - that is subtract 1 day from all dates.

I think it's a bit complicated to edit the big data without some sort of automation. So...

It's much more simple to create and populate the custom symbol programmaticaly by a script in MQL5.

Your recommendation is strange, no wonder the OP is doing strange things.

 
Stanislav Korotky #:

It seems you're doing something strange. If you want it done manually, then open Symbols dialog, choose required original symbol, request bars and/or ticks for required time range and then press Request. Please note that the dialog may apply limitations for the number of bars/ticks returned (actual range is indicated), that is you'll not receive all requested data - this is how MT5 works. Then press Export Bars or Export Ticks button at the bottom left corner of the dialog. This will produce a csv-file with the history.

To create a custom symbol manually you can press Create Custom Symbol button, then use Copy from drop down box to choose required original symbol (for proper specification initialization). After this you need to choose the custom symbol in the dialog and press Import bars or Import Ticks button, and choose a CSV-file from disk.

Please note that if you want to prepare the custom symbol for tests on "today" day, you need to edit the timestamps in the CSV-files accordinginly - that is subtract 1 day from all dates.

I think it's a bit complicated to edit the big data without some sort of automation. So...

It's much more simple to create and populate the custom symbol programmaticaly by a script in MQL5.

It turns out that the imported data into the custom symbol is saved as .tkc file even though it is not displayed in the user interface.

Thanks again for the detailed answers .