![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
In general, we can say that the secret of TC fitting on perceptrons is solved:
Suppose we have three adjacent sections of historical data: A, B, C
If we have fitting at B and C, and OOS at A, then false signals will be cut off by the filter: PerceptronA = signum(signum(PerceptronB) + signum(PerceptronC))
If we have fitting at A and B and OOS at C, false signals are cut out by the filter: PerceptronC = signum(signum(PerceptronA) - signum(PerceptronB))
The laws of arithmetic apply here, i.e.: if A = B + C, then: C = A - B
where:
signum(x) is a signum function, i.e. its value is equal depending on the argument:
signum(x) = 0 if x = 0
signum(x) = 1 if x > 0
signum(x) = -1 if x < 0
I.e. trade signals must be consistent for a successful OOS test in the past and inconsistent for a successful OOS test in the future.
Now it is quite clear why the TS on perceptrons, if optimized only for one single history section, will have a fit in the future. After all, if we divide the optimized part into two parts and take into account that the signals on them must be mismatched, we will get 0 on the difference, i.e. no signal, as we deal with uncertainty. As a result, instead of a trading signal we get SB, which leads to the loss of approximately the spread.
Very cool !
Suppose we have three neighbouring sections of historical data: A, B, C and a future section D
If we have a fit on B and C, then
1. To make profit on plot A, we must open when B- and C-signals are consistent,
2. And to make a profit on the D area we should open when B- and C-signals are discordant.
What the fuck is this, t. Reshetov ? Here is the implementation of the algorithm to open/close positions:
Юрий Васильевич, хотелось бы обратить ваше внимание, что история самого последнего/правого интервала подгонки-оптимизации
не учитывается в вашей программе автоматизации подгонки-оптимизации.
Если я в 23 часа сегодня готовлю программу gold_dust для работы с начала следующего дня, то для Н1 пропадают 23 бара.
more:
Yuri Vasilievich, I would like to draw your attention to the fact that the history of the most recent/rightest fitting-optimisation interval
is not taken into account in your fitting-optimization automation program.
If I am preparing a gold_dust program at 11pm today to work from the beginning of the next day, then 23 bars are missing for H1.
1. Not Vasilyevich, but Vyacheslavovich.
2. Not in my program, but in the MT4 strategy tester
1. Not Vasilyevich, but Vyacheslavovich.
2. Not in my programme, but in the MT4 strategy tester
1. I apologize for the typo.
2. Whenever you load the MT4 terminal for execution, because it is you who sets the rightmost date of the interval for the strategy tester equal to the current date,
thus excluding the current day. It would be more natural to set the next day as the right border of the whole testing interval,
then the current day will be included into the testing interval.
Now, please elaborate on this point, Sergei. What needs to be checked and for what kind of randomness?
Please go into details from this point, Sergei. What is to be checked and for what kind of randomness?
I may have said something stupid, but I'm not a mathematician, I'm just learning :o) My reasoning is: what is trading? I can give many definitions, but one of them, for example, may be - it is a process of transformation of "quote curve" into "deposit curve". After all, it is clear that one can judge the quality of a trading process by the deposit (or balance) curve. The ideal trading process transforms the quote curve into the ideal positively sloping balance line.
I borrowed the balance curve from other for clarity (though without permission):
If I, for example, am an investor or a trader, and I think to buy/trust/verify a particular trading system, in other words make some kind of objective assessment of the trading process itself, there are probably plenty of options to accomplish this. I'm just trying to examine the resulting curve to see if the result is random. After all, the fact that a positive balance has been obtained now does not really say anything.
I use the following to investigate the time series of the balance curve:
I always check this way, exactly this check and rejects many of my beautiful curves with positive balance, because there are random fragments.
PS: here are my doubts looking at such a curve. It's too crooked :o)
Addendum
I forgot to add, one of the important criteria. If fractal characteristics of a quote process coincide with/are close to fractal characteristics of a trade process - the strategy is rejected.
Today I found an interesting feature in the EA which is in GD2. It turns out that in the future you should not trade in 3rd mode (pass = 3), but in 1st or 2nd mode.
We take the EA and the history for 12 months, i.e. a year. We divide the history into 4 parts of 3 months: I, II, III and IV quarters.
I and IV quarters - this is OOS, II and III - Samples.
Stage 1. First we find optimal values of p and sl, i.e. we set dates for II and III quarters, tick the first perceptron x11, x21, x31, x41, and also tick p and sl. Mode pass = 1. Optimize and set best result.
Stage 2. Set dates to Q2, uncheck p and sl and optimize settings for the first perceptron. Set the best result in the settings.
Stage 3. Set dates for III quarter, remove ticks from x11, x21, x31, x41, set x12, x22, x32, x42, pass = 2 and optimize settings for the second perceptron. We set the best result in the settings.
4th step. Switch on pass = 3, set the dates for I quarter and run the test. If the test is successful, it means that at least one of the perceptrons will be robust.
I.e. all steps above as in GD2 methodology.
Step 5. Set dates to Q4, pass = 1. Run the test.
Step 6. Set dates for Q4, pass = 2. Run the test.
At least one of the tests in paras. 5 or paras. 6 should be successful.
But we ran the tests in the future, i.e. Q4, so to speak, to test. And GD runs everything in the past, i.e. first 3 quarters. How do we know which pass = 1 or pass = 2 will produce better results? We set the dates for the first 3 quarters and run it first in mode 1 and then in mode 2. And then we look at the better results for all 9 months - the mode is the most robust.
To investigate the time series of the balance curve, I use the following:
- trend and randomness criteria (rank, series, inversion, autocorrelation criterion, etc. there are many of them)
- fractal analysis
I always check this way, exactly this check rejects many of my beautiful curves with positive balance, because there are random fragments.Why is it so hard (I mean the highlighted in blue)? Don't you think you can reject a good system that way? Yeah, I get it: you seem to be an extreme perfectionist...
imho, the sequence of trades expressed as "success-failure" is overwhelmingly a Bernoulli process. So how do you remove randomness from there?