Bibliotecas: BestInterval - página 9

 
fxsaber:

Sim, praticamente qualquer TC tem uma bela imagem em um ou dois cliques. Quanto mais bonita ela for, mais ela se compromete. Portanto, é bom para o resultado final.

Mas, na realidade, quase ninguém fará nada.

Sim, a melhor coisa a fazer é ferrar todo mundo.

 

1. eu executo com parâmetros padrão, na primeira passagem recebo OnTester Critical Error, linha 53, como no primeiro comentário



2. na segunda passagem, a otimização funciona bem

2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   Profit = -9408.19 = -9408.19 + 0.00 (0.00%) - Amount of Delete Intervals = 0
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   00:00:00 - 23:59:59 : Profit = -9408.19 (100.00%), Total = 1552 (42.85%), PF = 0.27, Mean = -6.06, DD = 11981.00, RF = -0.79
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   SUMMARY: 00:00:00 - 23:59:59 : Profit = -9408.19 (100.00%), Total = 1552 (42.85%), PF = 0.27, Mean = -6.06, DD = 11981.00, RF = -0.79
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   Profit = 1832.70 = -9408.19 + 11240.89 (-119.48%) - Amount of Delete Intervals = 1
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   00:00:00 - 05:26:38 : Profit = 730.60 (39.86%), Total = 137 (41.61%), PF = 16.68, Mean = 5.33, DD = 38.25, RF = 19.10
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   15:43:31 - 23:59:59 : Profit = 1102.10 (60.14%), Total = 762 (41.60%), PF = 2.39, Mean = 1.45, DD = 400.95, RF = 2.75
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   SUMMARY: 00:00:00 - 23:59:59 : Profit = 1832.70 (100.00%), Total = 899 (41.60%), PF = 3.18, Mean = 2.04, DD = 400.96, RF = 4.57
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   Profit = 2272.64 = 1832.70 + 439.94 (24.01%) - Amount of Delete Intervals = 2
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   00:00:00 - 05:26:38 : Profit = 730.60 (32.15%), Total = 137 (41.61%), PF = 16.68, Mean = 5.33, DD = 38.25, RF = 19.10
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   15:43:31 - 18:15:27 : Profit = 1339.72 (58.95%), Total = 326 (48.16%), PF = 5.86, Mean = 4.11, DD = 156.95, RF = 8.54
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   21:07:40 - 23:59:59 : Profit = 202.32 (8.90%), Total = 157 (24.84%), PF = 14.31, Mean = 1.29, DD = 19.97, RF = 10.13
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   SUMMARY: 00:00:00 - 23:59:59 : Profit = 2272.64 (100.00%), Total = 620 (40.81%), PF = 7.74, Mean = 3.67, DD = 156.96, RF = 14.48
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   final balance - InitBalance (10000.00) + Profit (-9408.19) without BestInterval.
2018.10.20 00:02:35.785 Core 1  2017.05.16 15:49:00   OnTester - Profit (2272.64) with BestInterval.

3. Escolho o intervalo com o maior lucro e negocio somente nele, mas as negociações não são abertas, provavelmente a biblioteca está tentando proteger o usuário de brincar com o Martin :)

if (!IsTradingTime(15, 45, 18, 15)) return; // 15:45 - 18:15

4. escolho o intervalo apenas com lucro médio, o Expert Advisor passa por 2017 sem perdas.

5. eu mudo para OOS, ou seja, 2018, o intervalo é otimizado para 2017, o Expert Advisor também passa por 2017 sem travar, embora o perfil caia significativamente


 
...:

1. eu executo com parâmetros padrão, na primeira passagem recebo OnTester Critical Error, linha 53, como no primeiro comentário

Mais perto de novembro, verei o motivo.

3. Escolho o intervalo com o maior lucro e negocio somente nele, mas as negociações não são abertas, provavelmente a biblioteca está tentando proteger o usuário de brincar com o Martin :)

Essa implementação de descarte viola a lógica do TS original. Isso foi mencionado por

Fórum sobre negociação, sistemas de negociação automatizados e teste de estratégias de negociação.

Bibliotecas: BestInterval

fxsaber, 2018.10.18 10:28 AM

Se o EA não for do estilo MT4, a biblioteca usará 90% de seus recursos. E os intervalos serão obtidos. No entanto, não será possível ver sua aplicação no testador de uma só vez. O programador terá de inventar algo grande para esse fim. É por isso que somente o estilo MT4 pode revelar 100% das possibilidades bíblicas.

Portanto, ou o estilo MT4 ou você mesmo. Sem o ambiente de negociação virtual, essa tarefa não pode ser resolvida em geral.
 

Muito provavelmente a biblioteca será finalizada. O status atual é beta.


SZY

1 undeleted objects left
1 object of type ORDERS left
504232 bytes of leaked memory

Se essas mensagens aparecerem no Tester, é um bug da compilação 1930.

 
Verifiquei todas as funcionalidades atuais da bibla no MT4-tester. Ela funciona.
 
...:

1. eu executo com parâmetros padrão, na primeira passagem recebo OnTester Critical Error, linha 53, como no primeiro comentário

Ele não é reproduzido.

 
fxsaber:
Verifiquei todas as funcionalidades atuais da bibla no MT4-tester. Ela funciona.

Fiz um retoque cosmético para corrigir a saída no registro do MT4-tester. Se você estiver interessado no MT4, ele tem a seguinte aparência


Calculado

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

Profit = 196.25 = 196.25 + 0.00 (0.00%) - Amount of Delete Intervals = 0
00:00:00 - 23:59:59 : Profit = 196.25 (100.00%), Total = 1436 (70.19%), PF = 1.01, Mean = 0.14, DD = 3335.13, RF = 0.06
SUMMARY: 00:00:00 - 23:59:59 : Profit = 196.25 (100.00%), Total = 1436 (70.19%), PF = 1.01, Mean = 0.14, DD = 3335.13, RF = 0.06

Profit = 9111.81 = 196.25 + 8915.56 (4543.06%) - Amount of Delete Intervals = 1
00:00:00 - 02:53:38 : Profit = 7422.16 (81.46%), Total = 262 (86.26%), PF = 10.58, Mean = 28.33, DD = 127.97, RF = 58.00
17:45:41 - 23:59:59 : Profit = 1689.65 (18.54%), Total = 257 (67.32%), PF = 1.33, Mean = 6.57, DD = 1366.75, RF = 1.24
SUMMARY: 00:00:00 - 23:59:59 : Profit = 9111.81 (100.00%), Total = 519 (76.88%), PF = 2.56, Mean = 17.56, DD = 861.31, RF = 10.58

Profit = 10303.79 = 9111.81 + 1191.98 (13.08%) - Amount of Delete Intervals = 2
00:00:00 - 02:53:38 : Profit = 7422.16 (72.03%), Total = 262 (86.26%), PF = 10.58, Mean = 28.33, DD = 127.97, RF = 58.00
17:45:41 - 18:32:36 : Profit = 1558.95 (15.13%), Total = 44 (70.45%), PF = 2.35, Mean = 35.43, DD = 367.52, RF = 4.24
19:12:02 - 23:59:59 : Profit = 1322.68 (12.84%), Total = 189 (70.90%), PF = 1.57, Mean = 7.00, DD = 456.22, RF = 2.90
SUMMARY: 00:00:00 - 23:59:59 : Profit = 10303.79 (100.00%), Total = 495 (78.99%), PF = 3.42, Mean = 20.82, DD = 583.22, RF = 17.67

final balance - InitBalance (10000.00) + Profit (196.25) without BestInterval.
OnTester - Profit (10303.79) with BestInterval.
OnTester returns 10303.79000000000087
2714656 tick events (64659 bars, 2714756 bar states) processed in 0:00:40.670 (total time 0:00:41.169)


Aplicado


BestInterval Action(true - single pass & MT4-style is required) = true
Calculation time activated intervals is 2018.11.02 21:30:10 - Test (common folder)  ago.

Amount of Delete Intervals = 2
00:00:00 - 02:53:38 : Profit = 7422.16 (72.03%), Total = 262 (86.26%), PF = 10.58, Mean = 28.33, DD = 127.97, RF = 58.00
17:45:41 - 18:32:36 : Profit = 1558.95 (15.13%), Total = 44 (70.45%), PF = 2.35, Mean = 35.43, DD = 367.52, RF = 4.24
19:12:02 - 23:59:59 : Profit = 1322.68 (12.84%), Total = 189 (70.90%), PF = 1.57, Mean = 7.00, DD = 456.22, RF = 2.90
SUMMARY: 00:00:00 - 23:59:59 : Profit = 10303.79 (100.00%), Total = 495 (78.99%), PF = 3.42, Mean = 20.82

final balance - InitBalance (10000.00) + Profit (10351.44) with BestInterval.
OnTester - Virtual InitBalance (10000.00) + Profit (5003.00) without BestInterval. Profit is calculated with TickValue=1 and w/o Commission+Swap.
OnTester returns 15003.00000000000000

2714862 tick events (64668 bars, 2714962 bar states) processed in 0:00:30.997 (total time 0:00:31.434)


O destaque não corresponde. Não analisei os motivos.


ZY A segunda variante foi calculada 25% mais rápido.

 

No MT5-Hedge, as ordens de limite são deslizantes, o que cria grails de teste, que não podem deixar de ser irritantes.

Mudar para o MT5-Exchange-Netting resolve esse problema. Mas as TP ainda estarão deslizando. Portanto, eles precisam ser substituídos por negociações de limite. O que pode muito bem gerar negociações de entrada/saída que o MT4Orders não vê na implementação atual...


Portanto, tivemos que aprender a calcular e aplicar o BestInterval no MT5-Exchange-Netting, onde é muito mais difícil criar o graal. Descobrimos que essa tarefa pode ser resolvida, mas somente no MT5, porque o MT5-tester, ao contrário do MT4-tester, permite trabalhar com um cronômetro. E não há como trabalhar com negociações de limite sem um cronômetro. Em geral, é difícil explicar todas as armadilhas para uma pessoa comum. No final, o resultado foi o seguinte


Calculado

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

Profit = 18238.00 = 18238.00 + 0.00 (0.00%) - Amount of Delete Intervals = 0 (2018.07.01 - 2018.11.08)
00:00:00 - 23:59:59 : Profit = 18238.00 (100.00%), Total = 1618 (71.76%), PF = 1.46, Mean = 11.27, DD = 2286.00, RF = 7.98
SUMMARY: 00:00:00 - 23:59:59 : Profit = 18238.00 (100.00%), Total = 1618 (71.76%), PF = 1.46, Mean = 11.27, DD = 2286.00, RF = 7.98

Profit = 22915.00 = 18238.00 + 4677.00 (25.64%) - Amount of Delete Intervals = 1 (2018.07.01 - 2018.11.08)
00:00:00 - 10:18:47 : Profit = 3586.00 (15.65%), Total = 306 (72.22%), PF = 1.49, Mean = 11.72, DD = 1117.00, RF = 3.21
11:17:57 - 23:59:59 : Profit = 19329.00 (84.35%), Total = 1134 (73.28%), PF = 1.87, Mean = 17.04, DD = 1204.00, RF = 16.05
SUMMARY: 00:00:00 - 23:59:59 : Profit = 22915.00 (100.00%), Total = 1440 (73.06%), PF = 1.77, Mean = 15.91, DD = 1331.00, RF = 17.22

Profit = 24543.00 = 22915.00 + 1628.00 (7.10%) - Amount of Delete Intervals = 2 (2018.07.01 - 2018.11.08)
02:50:42 - 10:18:47 : Profit = 4854.00 (19.78%), Total = 280 (75.36%), PF = 1.86, Mean = 17.34, DD = 683.00, RF = 7.11
11:17:57 - 23:53:05 : Profit = 19689.00 (80.22%), Total = 1130 (73.36%), PF = 1.90, Mean = 17.42, DD = 1204.00, RF = 16.35
SUMMARY: 00:00:00 - 23:59:59 : Profit = 24543.00 (100.00%), Total = 1410 (73.76%), PF = 1.89, Mean = 17.41, DD = 1279.00, RF = 19.19
BestInterval is saved in "Test"-file in common(MT5)/base(MT4) folder.

final balance - InitBalance (10000.00) + Profit (18238.00) without BestInterval.
OnTester - Profit (24543.00) with BestInterval.
final balance 28238.00 USD
OnTester result 24543
Test passed in 0:00:00.639 (including ticks preprocessing 0:00:00.078).


Aplicado


BestInterval Action(true - single pass & MT4-style is required) = true
Calculation time activated intervals is 2018.11.08 15:09:56 - Test (common folder) 00:31:30 ago.

Amount of Delete Intervals = 2 (2018.07.01 - 2018.11.08)
02:50:42 - 10:18:47 : Profit = 4854.00 (19.78%), Total = 280 (75.36%), PF = 1.86, Mean = 17.34, DD = 683.00, RF = 7.11
11:17:57 - 23:53:05 : Profit = 19689.00 (80.22%), Total = 1130 (73.36%), PF = 1.90, Mean = 17.42, DD = 1204.00, RF = 16.35
SUMMARY: 00:00:00 - 23:59:59 : Profit = 24543.00 (100.00%), Total = 1410 (73.76%), PF = 1.89, Mean = 17.41

final balance - InitBalance (10000.00) + Profit (24543.00) with BestInterval.
OnTester - Virtual InitBalance (10000.00) + Profit (18216.00) without BestInterval. Profit is calculated with TickValue=1 and w/o Commission+Swap.
final balance 34543.00 USD
OnTester result 28216
Test passed in 0:00:00.749 (including ticks preprocessing 0:00:00.078).


Nos registros, enfatizei (em amarelo) que o backtest de quatro meses no modo "real ticks" com > 1.000 negociações e muitos milhares de OrderSend + cálculo (e aplicação) do melhor intervalo leva menos de um segundo.

 

Para os fãs do mercado. Você pode pegar absolutamente qualquer EA (estilo MT4) e torná-lo "bonito" em poucos segundos, basta descartar mais intervalos ruins. A biblioteca fará tudo automaticamente.


Antes



Depois (a tarefa é descartar 20 intervalos - quanto mais, mais bonito).



Eu mesmo não uso mais de dois intervalos. Se estiver escrevendo para sua própria negociação e não para o mercado, use valores baixos.

[Excluído]  
Não ofereça ópio a uma nação de amantes de marquette ))