I would record the maximum value. The time of creating the next TesterTradeState-record probably depends on the frequency chosen by the developers and some other conditions.
If I had a task to create a very similar tst-file to the original one, I would not achieve identical TesterTradeState[].
After running the SingleTesterCache_Example.ex5 script, the Test.tst result does not open in the Strategy Tester when I click the ‘Previous Results’ button.
I have attached the file containing the script’s output and the account history on which I ran the script.
If you need to discuss backtest results without advertising (for example, an expert advisor from the Market), you can anonymise the tst file and post it on the forum without any issues.
Here’s how to do it.
#include <fxsaber\SingleTesterCache\SingleTesterCache.mqh> // https://www.mql5.com/en/code/27611#include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/en/code/26132template <typename T>
void ChangeComments( T &Array[], conststring NewComment = NULL )
{
for (uint i = ArraySize(Array); (bool)i--;)
Array[i].comment = NewComment;
return;
}
void ChangeName( SINGLETESTERCACHE &SingleTesterCache, conststring Name = "Deleted", constbool Comments = false )
{
SingleTesterCache.Header.expert_name = Name; // expert’s name
SingleTesterCache.Header.expert_path = Name; // expert name with path from MQL5if (!Comments)
{
ChangeComments(SingleTesterCache.Deals);
ChangeComments(SingleTesterCache.Orders);
}
return;
}
voidOnStart()
{
uchar Bytes2[];
if (MTTESTER::GetLastTstCache(Bytes2) != -1) // If the last cache entry for a single run was successfully read
{
SINGLETESTERCACHE SingleTesterCache(Bytes2); // Assign it to the relevant object.
ChangeName(SingleTesterCache);
SingleTesterCache.Save("ForumBacktest.tst");
}
}
First, carry out the backtest, then run this script in the Terminal. The result will be your backtest file with all identifying details removed. Consequently, all the backtest statistics will be preserved, and you can post them on the forum without any concerns.
При составлении портфеля ТС стараются опираться на статистику. Например, пробуют составлять таблицу корреляции на основе вычислений соответствующих коэффициента (КК). Основная причина такого подхода -
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I would record the maximum value. The time of creating the next TesterTradeState-record probably depends on the frequency chosen by the developers and some other conditions.
If I had a task to create a very similar tst-file to the original one, I would not achieve identical TesterTradeState[].
After running the SingleTesterCache_Example.ex5 script, the Test.tst result does not open in the Strategy Tester when I click the ‘Previous Results’ button.
I have attached the file containing the script’s output and the account history on which I ran the script.
I updated the library today.
MT5 build 6230.
I haven’t used the Save method since the library was created (it’ll soon be seven years). During that time, MQ has most likely made some changes.
You need to take the original TST file, read it and then save it. After that, check what the differences are.
I’m not ready to look into this myself just yet. I don’t use this functionality.
In other words, when it comes to ‘writing TST files’ , it’s best not to usethis library. It’s only suitable for ‘reading’. Am I right?
If the code is intended to be read by a tester, it clearly needs some refinement. We’ll need to see what sort.
with 505.
If you need to discuss backtest results without advertising (for example, an expert advisor from the Market), you can anonymise the tst file and post it on the forum without any issues.
Here’s how to do it.
First, carry out the backtest, then run this script in the Terminal. The result will be your backtest file with all identifying details removed. Consequently, all the backtest statistics will be preserved, and you can post them on the forum without any concerns.
Here, in the source code, you can see how to organise operations to run concurrently with any number of single-pass caches.
In particular, this is how transactions are isolated.
Replace this number
with 505.
The transactions have been calculated, but there’s something wrong with the totals: