Libraries: BestInterval - page 21

 

The full BestInterval log is below. There was a run with a balance of 100,000 pips, selected in MetaTrader to calculate in pips.


BestInterval Action(true - single pass & MT4-style & Virtual is required) = false

Profit = 5435.00 = 5435.00 + 0.00 (0.00%) - Amount of Delete Intervals = 0 (2019.08.01 - 2019.11.15)
00:00:00 - 23:59:59 : Profit = 5435.00 (100.00%), Total = 2967 (65.86%), PF = 1.03, Mean = 1.83, DD = 21250.00, RF = 0.26
SUMMARY: 00:00:00 - 23:59:59 : Profit = 5435.00 (100.00%), Total = 2967 (65.86%), PF = 1.03, Mean = 1.83, DD = 21250.00, RF = 0.26

Profit = 29910.00 = 5435.00 + 24475.00 (450.32%) - Amount of Delete Intervals = 1 (2019.08.01 - 2019.11.15), 13:00 - 10:00, CountHours = 20
00:00:00 - 10:00:36 : Profit = 6050.00 (20.23%), Total = 71 (30.99%), PF = 2.32, Mean = 85.21, DD = 2310.00, RF = 2.62
12:55:59 - 23:59:59 : Profit = 23860.00 (79.77%), Total = 1884 (71.23%), PF = 1.26, Mean = 12.66, DD = 7300.00, RF = 3.27
SUMMARY: 00:00:00 - 23:59:59 : Profit = 29910.00 (100.00%), Total = 1955 (69.77%), PF = 1.31, Mean = 15.30, DD = 9170.00, RF = 3.26

Profit = 35865.00 = 29910.00 + 5955.00 (19.91%) - Amount of Delete Intervals = 2 (2019.08.01 - 2019.11.15)
00:00:00 - 10:00:36 : Profit = 6050.00 (16.87%), Total = 71 (30.99%), PF = 2.32, Mean = 85.21, DD = 2310.00, RF = 2.62
12:55:59 - 18:01:33 : Profit = 18345.00 (51.15%), Total = 1577 (71.97%), PF = 1.26, Mean = 11.63, DD = 7980.00, RF = 2.30
18:26:42 - 23:59:59 : Profit = 11470.00 (31.98%), Total = 146 (76.71%), PF = 2.85, Mean = 78.56, DD = 1140.00, RF = 10.06
SUMMARY: 00:00:00 - 23:59:59 : Profit = 35865.00 (100.00%), Total = 1794 (70.74%), PF = 1.44, Mean = 19.99, DD = 7055.00, RF = 5.08

Profit = 40490.00 = 35865.00 + 4625.00 (12.90%) - Amount of Delete Intervals = 3 (2019.08.01 - 2019.11.15)
00:00:00 - 10:00:36 : Profit = 6050.00 (14.94%), Total = 71 (30.99%), PF = 2.32, Mean = 85.21, DD = 2310.00, RF = 2.62
12:55:59 - 15:30:20 : Profit = 10175.00 (25.13%), Total = 670 (72.69%), PF = 1.35, Mean = 15.19, DD = 3580.00, RF = 2.84
16:17:44 - 18:01:33 : Profit = 12795.00 (31.60%), Total = 701 (74.47%), PF = 1.45, Mean = 18.25, DD = 2545.00, RF = 5.03
18:26:42 - 23:59:59 : Profit = 11470.00 (28.33%), Total = 146 (76.71%), PF = 2.85, Mean = 78.56, DD = 1140.00, RF = 10.06
SUMMARY: 00:00:00 - 23:59:59 : Profit = 40490.00 (100.00%), Total = 1588 (71.98%), PF = 1.59, Mean = 25.50, DD = 3860.00, RF = 10.49
BestInterval is saved in "TesterEA"-file in common(MT5)/base(MT4) folder.

final balance - InitBalance (100000.00) + Profit (543.50) without BestInterval.
OnTester - Profit (40490.00) with BestInterval.
final balance 105435.00 pips
OnTester result 40490
 

And in this log it is not clear at all how such "+ Profit (5333.00)" was obtained.


BestInterval Action(true - single pass & MT4-style & Virtual is required) = false

Profit = 2935.00 = 2935.00 + 0.00 (0.00%) - Amount of Delete Intervals = 0 (2019.08.01 - 2019.11.15)
00:00:00 - 23:59:59 : Profit = 2935.00 (100.00%), Total = 2201 (66.47%), PF = 1.02, Mean = 1.33, DD = 17835.00, RF = 0.16
SUMMARY: 00:00:00 - 23:59:59 : Profit = 2935.00 (100.00%), Total = 2201 (66.47%), PF = 1.02, Mean = 1.33, DD = 17835.00, RF = 0.16

Profit = 24555.00 = 2935.00 + 21620.00 (736.63%) - Amount of Delete Intervals = 1 (2019.08.01 - 2019.11.15), 13:00 - 10:00, CountHours = 20
00:00:00 - 10:00:36 : Profit = 5780.00 (23.54%), Total = 59 (76.27%), PF = 3.35, Mean = 97.97, DD = 1890.00, RF = 3.06
12:41:32 - 23:59:59 : Profit = 18775.00 (76.46%), Total = 1407 (70.65%), PF = 1.26, Mean = 13.34, DD = 7065.00, RF = 2.66
SUMMARY: 00:00:00 - 23:59:59 : Profit = 24555.00 (100.00%), Total = 1466 (70.87%), PF = 1.33, Mean = 16.75, DD = 8255.00, RF = 2.97

Profit = 28760.00 = 24555.00 + 4205.00 (17.12%) - Amount of Delete Intervals = 2 (2019.08.01 - 2019.11.15)
00:00:00 - 10:00:36 : Profit = 5780.00 (20.10%), Total = 59 (76.27%), PF = 3.35, Mean = 97.97, DD = 1890.00, RF = 3.06
12:41:32 - 16:36:59 : Profit = 6585.00 (22.90%), Total = 746 (69.97%), PF = 1.18, Mean = 8.83, DD = 5820.00, RF = 1.13
16:47:14 - 23:59:59 : Profit = 16395.00 (57.01%), Total = 615 (71.87%), PF = 1.57, Mean = 26.66, DD = 2745.00, RF = 5.97
SUMMARY: 00:00:00 - 23:59:59 : Profit = 28760.00 (100.00%), Total = 1420 (71.06%), PF = 1.43, Mean = 20.25, DD = 6830.00, RF = 4.21

Profit = 31935.00 = 28760.00 + 3175.00 (11.04%) - Amount of Delete Intervals = 3 (2019.08.01 - 2019.11.15)
00:00:00 - 10:00:36 : Profit = 5780.00 (18.10%), Total = 59 (76.27%), PF = 3.35, Mean = 97.97, DD = 1890.00, RF = 3.06
12:41:32 - 15:30:20 : Profit = 6085.00 (19.05%), Total = 525 (71.24%), PF = 1.24, Mean = 11.59, DD = 3880.00, RF = 1.57
16:17:44 - 16:36:59 : Profit = 3675.00 (11.51%), Total = 69 (79.71%), PF = 4.77, Mean = 53.26, DD = 315.00, RF = 11.67
16:47:14 - 23:59:59 : Profit = 16395.00 (51.34%), Total = 615 (71.87%), PF = 1.57, Mean = 26.66, DD = 2745.00, RF = 5.97
SUMMARY: 00:00:00 - 23:59:59 : Profit = 31935.00 (100.00%), Total = 1268 (72.24%), PF = 1.55, Mean = 25.19, DD = 5340.00, RF = 5.98
BestInterval is saved in "TesterEA"-file in common(MT5)/base(MT4) folder.

final balance - InitBalance (100000.00) + Profit (5333.00) without BestInterval.
OnTester - Profit (31935.00) with BestInterval.
final balance 102935.00 pips
OnTester result 31935
 
traveller00:

The full BestInterval log is below.

Please redo the logs in the posts, inserting them as a source - ALT+S. It is more convenient to perceive.

MT4/MT5, Hedge/Netting?

 

The logs have been corrected. I apologise, only recently on this forum.

MT5, Exchange, Stocks, Exchange Stocks. Netting, as far as I understand.

 
traveller00:

MT5, Exchange, Stocks, Exchange Stocks. Netting, as far as I understand.

The pips mode on netting is lying.

Moreover, BestInterval on netting only in one specific case (I made it for myself) takes the trading history correctly. This is due to the fact that BestInterval generates trading history through MT4Orders, and that MT4Orders can correctly show history only for hedges.

 
fxsaber:

On netting, the pips mode is lying.

Does it lie in MetaTrader at all? Or in these scripts/advisors?

And what are the options? Apart from creating a custom symbol essentially duplicating the real one. Is there any way to fix it? Are there any planned fixes? Or where to pick, maybe I can fix it myself?

 
traveller00:

In the first line, BestInterval confused the initial balance (which is in pips) and the profit (which he took from Equity and which is in the account currency) and essentially added up bricks and bats.

This is a bug of MT5 pip mode.

 
traveller00:

Does it lie in MetaTrader at all? Or in these scripts/advisors?

In general. There was a description on the forum.

And what are the options? Apart from creating a custom character essentially duplicating the real one. Is there any way to fix this? Planned fixes? Or where to pick, maybe I can fix it myself?

There is nothing to fix. MT4Orders can work with history only on hedge. It can only trade on netting.

For BestInterval you need to fill in the trading history correctly on the input.

 
fxsaber:

On netting, the pips mode is lying.

Moreover, BestInterval on netting only in one specific case (I made it for myself) takes the trading history correctly. This is due to the fact that BestInterval generates the trading history via MT4Orders, and this MT4Orders can correctly show the history only for hedges.

I.e. if you add
to a pure MQL5 Expert Advisor for hedge.
#define  BESTINTERVAL_ONTESTER // The optimisation criterion is the profit of the best interval.
#include <fxsaber\BestInterval\BestInterval.mqh> // Calculation of the best trading interval

- will not work?

Will the MT4Orders library work if the MQL4 Expert Advisor uses standard or custom indicators?

 
Vasiliy Pushkaryov:
So, if I add
to a pure MQL5 Expert Advisor for hedge, it won't work?

- will not work?

It will work fully if you make an MT4Orders enclode before BestInterval.

Will the MT4Orders library work if the MQL4 Expert Advisor uses standard or custom indicators?

The library deals only with trading operations and their history. Moreover, it can work in parallel with SB and others.

So the indicators do not affect it in any way.