Trabalho concluído
Tempo de execução 1 dia
Comentário do cliente
Great work, thanks.
Termos de Referência
I need the following function to complete:
double GetMaxLotSize(int cmd, double sl, double risk_margin = 1.0, string symbol = NULL)
Arguments are:
- cmd: Command such as OP_BUY or OP_SELL.
- sl: Stop loss to calculate the lot size for.
- risk_margin: Account margin to risk (in %), e.g. Money = AccountBalance() / 100 * risk_margin (e.g. 1.0%)
- symbol: If NULL, means current.
The output:
- Maximum safe lot size value to use where given SL won't exceed the percentage of risk margin amount.
This should work similar as GetMaxStopLoss() which calculates the maximum SL for given lot size, but GetMaxLotSize should work other way round.
The code should be compatible with MQL4 and MQL5.
Respondido
1
Classificação
Projetos
789
71%
Arbitragem
9
33%
/
33%
Expirado
22
3%
Livre
Publicou: 8 códigos
2
Classificação
Projetos
127
41%
Arbitragem
3
33%
/
67%
Expirado
0
Livre
3
Classificação
Projetos
121
25%
Arbitragem
5
20%
/
60%
Expirado
17
14%
Livre
4
Classificação
Projetos
185
30%
Arbitragem
77
9%
/
73%
Expirado
77
42%
Livre
5
Classificação
Projetos
81
38%
Arbitragem
1
0%
/
0%
Expirado
31
38%
Livre
Informações sobre o projeto
Orçamento
15 - 20 USD
Prazo
de 1 para 3 dias