Libraries: BestInterval - page 25

 
traveller00:

It looks like you are right. BestInterval gives different results both in terms of potential profit and time intervals for netting and hedging. I haven't looked at the details yet, but the Deals list looks incorrect at first glance, the opening time for CloseBy closes mostly falls on the opening time of the closing order.

There is no CloseBy on netting.

 
I mean that on a hedge using CloseBy theopening time is not always correctly recorded in the array. And as a consequence it counts incorrectly.
 

@fxsaber

I updated Bestinterval, Mt4Orders and Virtual (mqh), to the last version.

For testing I use the example. Any help?



 
Nelk0n:

@fxsaber

I updated Bestinterval, Mt4Orders and Virtual (mqh), to the last version.

For testing I use the example. Any help?

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

#include <fxsaber\Virtual\Virtual.mqh> // https://www.mql5.com/ru/code/22577

#define BESTINTERVAL_ONTESTER // Критерий оптимизации - прибыль лучшего интервала.
#include <fxsaber\BestInterval\BestInterval.mqh> // https://www.mql5.com/ru/code/22710

#include <MT5Bridge.mqh> // https://www.mql5.com/ru/articles/8321

#include <..\Experts\Examples\MACD\MACD Sample.mq5>
 
BestInterval can fully work with MT5-style Expert Advisors.

Forum on trading, automated trading systems and testing trading strategies

Libraries: BestInterval

fxsaber, 2020.10.02 22:01

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

#include <fxsaber\Virtual\Virtual.mqh> // https://www.mql5.com/en/code/22577

#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

#include <MT5Bridge.mqh> // https://www.mql5.com/en/articles/8321

#include <..\Experts\Examples\MACD\MACD Sample.mq5>

The code is somewhat surprising. Four libraries, which muddle quite tricky to MT5-style EA without changes to get new functionality.

MT5-style is converted to MT4-style via MT4Orders. Then Virtual is picked up, which works through MT4-style. Then BestInterval is built in, which again works with MT4-style. And finally, this whole nesting doll is converted to MT5-style via MT5Bridge and enters the standard MT5-advisor correctly.

But the result looks nice and fulfils its task.

[Deleted]  

I apologise for my ignorance, I only found out about this library today. I didn't read the whole thread...

Could you please explain what it means?

2020.10.06 01:36:55.839 Core 1  2020.05.29 23:54:59   Amount of Delete Intervals = 3 (2020.03.01 - 2020.05.22)
2020.10.06 01:36:55.839 Core 1  2020.05.29 23:54:59   11:17:22 - 14:07:37 : Profit = 127.25 (29.94%), Total = 9 (44.44%), PF = 6.43, Mean = 14.14, DD = 21.49, RF = 5.92
2020.10.06 01:36:55.839 Core 1  2020.05.29 23:54:59   14:57:47 - 16:31:40 : Profit = 191.84 (45.13%), Total = 6 (50.00%), PF = 5.71, Mean = 31.97, DD = 21.45, RF = 8.94
2020.10.06 01:36:55.839 Core 1  2020.05.29 23:54:59   17:30:28 - 19:33:01 : Profit = 105.99 (24.93%), Total = 11 (36.36%), PF = 2.80, Mean = 9.64, DD = 41.26, RF = 2.57
2020.10.06 01:36:55.839 Core 1  2020.05.29 23:54:59   SUMMARY: 00:00:00 - 23:59:59 : Profit = 425.08 (100.00%), Total = 26 (42.31%), PF = 4.46, Mean = 16.35, DD = 30.20, RF = 14.08

And this despite the fact that after the test Net profit is shown as 165.....

 
Сергей Таболин:

I apologise for my ignorance, I only found out about this library today. I didn't read the whole thread...

Can you please explain what this means?

And this despite the fact that after the test Net profit is shown as 165.....

This is the details of the result of bad intervals ejection. It is better to read the thread - only my posts.

[Deleted]  
fxsaber:

These are the details of the result of throwing out bad intervals. Better still to read the thread - just my posts.

I will. ))

One small question - is the specified time the bad interval?

 
Сергей Таболин:

One small question - is the specified time the bad interval?

A good one.

[Deleted]  
fxsaber:

It's a good one.

Read it.

More questions ))))

On the above log:

The first line is clear, the number of intervals removed.

Next line. The time from 11:17 to 14:07. This is the trading time. But then the number of deleted intervals is not 3, but 4! Inconsistency...


In the description of the library, in the example, two inclusions are specified.

#include <MT4Orders.mqh> // https://www.mql5.com/en/code/16006
#include <fxsaber\BestInterval\BestInterval.mqh> // Calculation of the best trading interval

But in post 235 it is different. What is the correct way?


And the BestInteval Action does not appear in the input parameters. What am I doing wrong?