Risk Expert Advisor

MQL4 Experts

Trabalho concluído

Tempo de execução 1 dia
Comentário do cliente
A very professional and competent developer - very good work! Thank you!

Termos de Referência

Specification Risk Expert Advisor:

Our idea is to design an expert advisor (EA) that manages the risk of different EAs as well as the entire account. Each EA will have a unique magic number.

This new EA should work as follows:

a.)   For every EA check the maximal drawdown of each sell/short and buy/long currency pair, running on the account.

b.)   If one currency pair of an EA does have more drawdown as specified in an input table (field: max. DD robot), start to hedge all negative positions of this robot (means, if the robot opened for example a buy/long position 0,01 lot for eur/usd and buy/long 0,03 eur/usd, the risk EA should open a sell/short position 0,01 lot eur/usd and a sell/short position 0,03 lot sell.

c.)   Calculate the weighted drawdown on currency pair bases over all EAs. Please consider long and short position individually.

i.e. sell/short 0.39 lot for eur/usd = -2% and sell/short 0.34 lot for eur/usd = -1.8% the weighted drawdown = (0.39/0.74 x -2% + 0.34/0.74 x -1.8% = -1.881%)

If the drawdown of one sell/short or buy/long currency pair over all EAs is more than x% (this value should as well be variable und should be set in the input table- field: max. weighted DD) OR if the drawdown of the portfolio is >X% (field: max DD account), the risk EA should hedge all negative  positions of this sell/short or buy/long currency pair of all EAs.  

d.)   Check the correlation between all currency pairs of all EAs running on these account. If the correlation between currency pairs is more than specified in our input box (field: max allowed correl), the RISK-EA should also hedge all negative sell/short and long/buy positions of the correlated currency pairs, where c) was triggered. Therefore a query should be done to a specific webpage (for example: investing.com) where the correlations will be requested from.

e.)   The logic of closing the hedges should be as follows:

It should be done in reverse order of how it was opened. Means, the hedge position should be closed if the hedge will turn from a positive amount to a negative amount. Ideally it should be closed, when the hedge is equal to zero (0 pips). If the hedge never turn in the positive direction, because it was the highest or lowest point of a chart (depend on buy or sell), the hedge should closed at a predefined value (field: max allowed pips hedge).

f.)    If the hedge were opened because of just one EA which exceeded the limit, the closing of the hedge should be same then described in e.)

  Inputbox Risk-Expert Advisor

expert advisors magic numbers

 

magic-nr 1

1

magic-nr 2

14

magic-nr 3

24

magic-nr 4

120

… till magic-nr 20

 

 

 

max DD robot

9%

max weighted DD

25%

max DD account

50%

max allowed pips hedge

-3

 

 

timeframe correlation

1H

max allowed correl:

+/- 0,8

 

QUERY:

Investing.com

https://de.investing.com/tools/correlation-calculator


Arquivos anexados:

Respondido

1
Desenvolvedor 1
Classificação
(12)
Projetos
16
31%
Arbitragem
0
Expirado
0
Livre
2
Desenvolvedor 2
Classificação
(15)
Projetos
14
36%
Arbitragem
10
0% / 90%
Expirado
4
29%
Livre
3
Desenvolvedor 3
Classificação
(188)
Projetos
212
58%
Arbitragem
9
11% / 89%
Expirado
8
4%
Livre
4
Desenvolvedor 4
Classificação
(461)
Projetos
490
52%
Arbitragem
10
60% / 20%
Expirado
3
1%
Livre
5
Desenvolvedor 5
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre

Informações sobre o projeto

Orçamento
500 - 1000 USD
Desenvolvedor
450 - 900 USD
Prazo
de 1 para 7 dias