Libraries: BestInterval - page 7

 
Aleksey Panfilov:

And how does a week, in principle, differ from a day, if we introduce (designate) the first hour of the week.

Some market patterns depend on the day of the week. This is the fundamental difference.

 
fxsaber:
These percentages are how much profit was given by throwing out another interval.

A question has arisen.

In the thrown intervals all the work of the Expert Advisor is blocked or only the opening of new positions?

Or the interval starts only after closing the last open position? I.e. is it not possible to have a situation with a hung open order on the thrown interval?

I have encountered thrown out intervals of several seconds in size. Clearly a throw out of one very unsuccessful entry. What is the probability of hitting those few seconds again? Fitting?

I define my working/non-working hours to the nearest hour and I am happy with such accuracy.

Again, let's not forget about summer/winter time....

 
Mikola_2:

In thrown intervals all work of the Expert Advisor is blocked or only opening of new positions?

open positions that fit the calculated intervals is calculated there. Then it synchronises its netting position with the virtual one in the real environment.


Or the interval starts only after the last open position is closed? I.e. is it not possible to have a situation with a hung open order on the thrown out interval?

Action= true - mode for the Tester.

I have encountered thrown out intervals of several seconds in size. It is an obvious throw out of one very unsuccessful entry. What is the probability of hitting those few seconds again? Fitting?

Of course, fitting. As the number of thrown intervals increases, you will reach situations when one or two losing trades will be thrown. It is not for nothing that the details on the next step of throwing out are displayed in the log.

I define my working/non-working hours to the nearest hour and I am satisfied with such accuracy.

You can narrow the found intervals to any size of time quantisation.

Again, let's not forget about summer/winter time....

Summer/winter time is not taken into account because it is unnecessary.

 
...:
An example of an EA that could not be optimised, perhaps all the results are dropped because in martin-like systems the drawdown usually exceeds the profit?

Insert these lines

#include <MT4Orders.mqh> // https://www.mql5.com/en/code/16006

#define  VIRTUAL_TESTER // Run in a virtual trading environment
#define  BESTINTERVAL_ONTESTER // The optimisation criterion is the profit of the best interval.
#include <fxsaber\BestInterval\BestInterval.mqh> // https://www.mql5.com/en/code/22710


right after

#include <Trade\PositionInfo.mqh>
#include <Trade\Trade.mqh>
#include <Trade\SymbolInfo.mqh>  
#include <Trade\AccountInfo.mqh>
 
fxsaber:
You can narrow the intervals found to any size of time quantisation.
That's what I do. I use the found intervals as a skeleton.

fxsaber:

Summer/winter is not taken into account for needlessness.

It should be taken into account when choosing the range of optimisation, and the peculiarities of work of a particular brokerage house.

But this is the user's concern, not the programme's.

[Deleted]  
2018.10.20 02:26:18.726 2018.10.18 23:59:59   Amount of Delete Intervals = 3
2018.10.20 02:26:18.726 2018.10.18 23:59:59   00:00:00 - 03:44:59 : Profit = 318.32 (18.18%), Total = 114 (93.86%), PF = 12.53, Mean = 2.79, DD = 63.67, RF = 5.00
2018.10.20 02:26:18.726 2018.10.18 23:59:59   13:45:01 - 16:29:59 : Profit = 450.78 (25.75%), Total = 155 (73.55%), PF = 6.43, Mean = 2.91, DD = 272.64, RF = 1.65
2018.10.20 02:26:18.726 2018.10.18 23:59:59   16:45:01 - 20:44:59 : Profit = 898.54 (51.33%), Total = 182 (96.15%), PF = 20.46, Mean = 4.94, DD = 75.30, RF = 11.93
2018.10.20 02:26:18.726 2018.10.18 23:59:59   21:30:01 - 23:59:59 : Profit = 82.96 (4.74%), Total = 72 (86.11%), PF = 1.97, Mean = 1.15, DD = 112.21, RF = 0.74
2018.10.20 02:26:18.726 2018.10.18 23:59:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = 1750.60 (100.00%), Total = 523 (87.57%), PF = 8.23, Mean = 3.35
2018.10.20 02:26:18.726 2018.10.18 23:59:59   
2018.10.20 02:26:18.726 2018.10.18 23:59:59   final balance - InitBalance (10000.00) + Profit (1878.30) with BestInterval.
2018.10.20 02:26:18.726 2018.10.18 23:59:59   OnTester - Virtual InitBalance (10000.00) + Profit (349.44) without BestInterval. Profit is calculated with TickValue=1 and w/o Commission+Swap.

Thank you for being you :)

 
Maxim Dmitrievsky:

We should add the Tester interval and the name of the symbol on which BestInterval was found to the log in the library. And don't forget the name of the server. I will do it later.

2018.10.20 02:26:18.726 2018.10.18 23:59:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = 1750.60 (100.00%), Total = 523 (87.57%), PF = 8.23, Mean = 3.35
2018.10.20 02:26:18.726 2018.10.18 23:59:59   
2018.10.20 02:26:18.726 2018.10.18 23:59:59   final balance - InitBalance (10000.00) + Profit (1878.30) with BestInterval.

The highlighted things don't match - different testing periods?


The log of false mode is more clear, of course. And a graph of false vs true equity. By analogy.


PF is off the scale for >500 positions...

[Deleted]  
fxsaber:

We should add the Tester interval and the name of the symbol on which BestInterval was found to the log in the library. And don't forget the name of the server. I will do it later.

What is highlighted does not coincide - different testing periods?


The log of false-mode is more clear, of course. And a graph of false vs true equity. By analogy.


PF is off the scale for >500 positions...

2018.10.20 03:39:38.206 2018.10.18 23:59:59   BestInterval Action(true - single pass & MT4-style is required) = false
2018.10.20 03:39:38.206 2018.10.18 23:59:59   
2018.10.20 03:39:38.206 2018.10.18 23:59:59   Profit = -56.44 = -56.44 + 0.00 (0.00%) - Amount of Delete Intervals = 0
2018.10.20 03:39:38.206 2018.10.18 23:59:59   00:00:00 - 23:59:59 : Profit = -56.44 (100.00%), Total = 335 (65.37%), PF = 0.95, Mean = -0.17, DD = 313.74, RF = -0.18
2018.10.20 03:39:38.206 2018.10.18 23:59:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = -56.44 (100.00%), Total = 335 (65.37%), PF = 0.95, Mean = -0.17, DD = 313.74, RF = -0.18
2018.10.20 03:39:38.206 2018.10.18 23:59:59   
2018.10.20 03:39:38.206 2018.10.18 23:59:59   Profit = 384.85 = -56.44 + 441.29 (-781.87%) - Amount of Delete Intervals = 1
2018.10.20 03:39:38.206 2018.10.18 23:59:59   00:00:00 - 05:59:59 : Profit = 167.30 (43.47%), Total = 54 (85.19%), PF = 8.67, Mean = 3.10, DD = 15.70, RF = 10.66
2018.10.20 03:39:38.206 2018.10.18 23:59:59   17:15:01 - 23:59:59 : Profit = 217.55 (56.53%), Total = 85 (89.41%), PF = 2.05, Mean = 2.56, DD = 171.99, RF = 1.26
2018.10.20 03:39:38.206 2018.10.18 23:59:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = 384.85 (100.00%), Total = 139 (87.77%), PF = 2.68, Mean = 2.77, DD = 168.72, RF = 2.28
2018.10.20 03:39:38.206 2018.10.18 23:59:59   
2018.10.20 03:39:38.206 2018.10.18 23:59:59   Profit = 516.73 = 384.85 + 131.88 (34.27%) - Amount of Delete Intervals = 2
2018.10.20 03:39:38.206 2018.10.18 23:59:59   00:00:00 - 05:59:59 : Profit = 167.30 (32.38%), Total = 54 (85.19%), PF = 8.67, Mean = 3.10, DD = 15.70, RF = 10.66
2018.10.20 03:39:38.206 2018.10.18 23:59:59   17:15:01 - 21:29:59 : Profit = 285.54 (55.26%), Total = 59 (96.61%), PF = 6.05, Mean = 4.84, DD = 75.30, RF = 3.79
2018.10.20 03:39:38.206 2018.10.18 23:59:59   21:30:01 - 23:59:59 : Profit = 63.89 (12.36%), Total = 22 (86.36%), PF = 4.44, Mean = 2.90, DD = 17.77, RF = 3.60
2018.10.20 03:39:38.206 2018.10.18 23:59:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = 516.73 (100.00%), Total = 135 (90.37%), PF = 6.33, Mean = 3.83, DD = 69.20, RF = 7.47
2018.10.20 03:39:38.206 2018.10.18 23:59:59   
2018.10.20 03:39:38.206 2018.10.18 23:59:59   Profit = 573.23 = 516.73 + 56.50 (10.93%) - Amount of Delete Intervals = 3
2018.10.20 03:39:38.206 2018.10.18 23:59:59   00:00:00 - 05:59:59 : Profit = 167.30 (29.19%), Total = 54 (85.19%), PF = 8.67, Mean = 3.10, DD = 15.70, RF = 10.66
2018.10.20 03:39:38.206 2018.10.18 23:59:59   17:15:01 - 19:14:59 : Profit = 202.45 (35.32%), Total = 32 (100.00%), PF = Max, Mean = 6.33, DD = 23.17, RF = 8.74
2018.10.20 03:39:38.206 2018.10.18 23:59:59   19:15:01 - 21:29:59 : Profit = 139.59 (24.35%), Total = 25 (100.00%), PF = Max, Mean = 5.58, DD = 33.10, RF = 4.22
2018.10.20 03:39:38.206 2018.10.18 23:59:59   21:30:01 - 23:59:59 : Profit = 63.89 (11.15%), Total = 22 (86.36%), PF = 4.44, Mean = 2.90, DD = 17.77, RF = 3.60
2018.10.20 03:39:38.206 2018.10.18 23:59:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = 573.23 (100.00%), Total = 133 (91.73%), PF = 15.20, Mean = 4.31, DD = 25.94, RF = 22.10
2018.10.20 03:39:38.206 2018.10.18 23:59:59   
2018.10.20 03:39:38.206 2018.10.18 23:59:59   Profit = 591.80 = 573.23 + 18.57 (3.24%) - Amount of Delete Intervals = 4
2018.10.20 03:39:38.206 2018.10.18 23:59:59   00:00:00 - 05:59:59 : Profit = 167.30 (28.27%), Total = 54 (85.19%), PF = 8.67, Mean = 3.10, DD = 15.70, RF = 10.66
2018.10.20 03:39:38.206 2018.10.18 23:59:59   17:15:01 - 19:14:59 : Profit = 202.45 (34.21%), Total = 32 (100.00%), PF = Max, Mean = 6.33, DD = 23.17, RF = 8.74
2018.10.20 03:39:38.206 2018.10.18 23:59:59   19:15:01 - 21:29:59 : Profit = 139.59 (23.59%), Total = 25 (100.00%), PF = Max, Mean = 5.58, DD = 33.10, RF = 4.22
2018.10.20 03:39:38.206 2018.10.18 23:59:59   21:30:01 - 22:44:59 : Profit = 43.28 (7.31%), Total = 9 (100.00%), PF = Max, Mean = 4.81, DD = 0.11, RF = 393.45
2018.10.20 03:39:38.206 2018.10.18 23:59:59   23:00:01 - 23:59:59 : Profit = 39.18 (6.62%), Total = 10 (100.00%), PF = Max, Mean = 3.92, DD = 0.70, RF = 55.97
2018.10.20 03:39:38.206 2018.10.18 23:59:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = 591.80 (100.00%), Total = 130 (93.85%), PF = 28.15, Mean = 4.55, DD = 25.94, RF = 22.81
2018.10.20 03:39:38.206 2018.10.18 23:59:59   
2018.10.20 03:39:38.206 2018.10.18 23:59:59   final balance - InitBalance (10000.00) + Profit (-56.44) without BestInterval.
2018.10.20 03:39:38.206 2018.10.18 23:59:59   OnTester - Profit (591.80) with BestInterval.
2018.10.20 03:39:38.206 final balance 9943.56 USD
2018.10.20 03:39:38.206 OnTester result 591.8

2018.10.20 03:41:42.414 2018.10.18 23:59:59   BestInterval Action(true - single pass & MT4-style is required) = true
2018.10.20 03:41:42.414 2018.10.18 23:59:59   Calculation time activated intervals is 2018.10.20 03:39:38 - Fuzzy_logic_for_fuzzy_algotraders (common folder) 00:02:04 ago.
2018.10.20 03:41:42.414 2018.10.18 23:59:59   
2018.10.20 03:41:42.414 2018.10.18 23:59:59   Amount of Delete Intervals = 4
2018.10.20 03:41:42.414 2018.10.18 23:59:59   00:00:00 - 05:59:59 : Profit = 167.30 (28.27%), Total = 54 (85.19%), PF = 8.67, Mean = 3.10, DD = 15.70, RF = 10.66
2018.10.20 03:41:42.414 2018.10.18 23:59:59   17:15:01 - 19:14:59 : Profit = 202.45 (34.21%), Total = 32 (100.00%), PF = Max, Mean = 6.33, DD = 23.17, RF = 8.74
2018.10.20 03:41:42.414 2018.10.18 23:59:59   19:15:01 - 21:29:59 : Profit = 139.59 (23.59%), Total = 25 (100.00%), PF = Max, Mean = 5.58, DD = 33.10, RF = 4.22
2018.10.20 03:41:42.414 2018.10.18 23:59:59   21:30:01 - 22:44:59 : Profit = 43.28 (7.31%), Total = 9 (100.00%), PF = Max, Mean = 4.81, DD = 0.11, RF = 393.45
2018.10.20 03:41:42.414 2018.10.18 23:59:59   23:00:01 - 23:59:59 : Profit = 39.18 (6.62%), Total = 10 (100.00%), PF = Max, Mean = 3.92, DD = 0.70, RF = 55.97
2018.10.20 03:41:42.414 2018.10.18 23:59:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = 591.80 (100.00%), Total = 130 (93.85%), PF = 28.15, Mean = 4.55
2018.10.20 03:41:42.414 2018.10.18 23:59:59   
2018.10.20 03:41:42.414 2018.10.18 23:59:59   final balance - InitBalance (10000.00) + Profit (593.97) with BestInterval.
2018.10.20 03:41:42.414 2018.10.18 23:59:59   OnTester - Virtual InitBalance (10000.00) + Profit (-42.35) without BestInterval. Profit is calculated with TickValue=1 and w/o Commission+Swap.
2018.10.20 03:41:42.414 final balance 10593.97 USD
2018.10.20 03:41:42.414 OnTester result 9957.65

Let's add OOS

This is a new run, the old one was lost. Test at opening prices.

 
fxsaber:

We should add the Tester interval and the name of the symbol on which BestInterval was found to the log in the library. And don't forget the name of the server. I'll do it later.

I can't manage to start testing your library, I'm busy with nothing, to say that the potential is great ... it's nothing ... it's really very cool! And in free access and with your support... imho, some kind of dream ... it does not happen like that, but it is! )))

I would like such chips, if it is real:

- ability to save to BestInterval file

- ability to read from the BestInterval file

- ability to "flip" trades outside the BestInterval.

is it realistic?

what is it for? - you can try to evaluate the TS outside of BestInterval, I suspect that if you "flip" trades outside of BestInterval and there will be a more beautiful balance chart.... then the TS itself does not see anything and there is an adjustment, if turning the TS outside the BestInterval does not change the balance chart much, it means... what does it mean? - There is a separate topic to study here, your approach is quite new.

 
Igor Makanu:

Would love fics like that, if it's realistic:

- ability to save to BestInterval file

- ability to read from the BestInterval file

Saving/reading is implemented almost immediately. Action-mechanism is based on it.

- possibility to "flip" trades outside the BestInterval

To flip the worst intervals is to write ten lines. But it will be self-deception. The picture will be prettier, but there will be almost no sense in it.